Class WebSudoIPAllowListManager
java.lang.Object
com.atlassian.jira.web.component.admin.websudo.WebSudoIPAllowListManager
- All Implemented Interfaces:
InitializingComponent
This class is used to check if the user's IP address is in the allowlist when user is trying to login for websudo.
It uses Atlassian IP for matching the IP address.
Supports matching against IPv4 and IPv6 addresses, and subnets in both wildcard (IPv4 only) and CIDR notation. Examples of valid patterns:
192.168.1.1 192.168.1.0/24 192.168.1.* 0:0:0:1::1 0:0:0:1::/64
- Since:
- 9.15
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after all the beans are constructed and the ApplicationContext is fully populated.isAllowed(jakarta.servlet.http.HttpServletRequest request) Check if the user's IP address is in the allowlist.
-
Field Details
-
WEBSUDO_ALLOWLIST_IP_PROPERTY
- See Also:
-
WEBSUDO_ALLOWLIST_CIDR_PROPERTY
- See Also:
-
REMOTE_IP_HEADER_PROPERTY
- See Also:
-
X_FORWARDED_FOR_HEADER
- See Also:
-
-
Constructor Details
-
WebSudoIPAllowListManager
-
-
Method Details
-
afterInstantiation
Description copied from interface:InitializingComponentCalled after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.- Specified by:
afterInstantiationin interfaceInitializingComponent- Throws:
Exception
-
isAllowed
Check if the user's IP address is in the allowlist.- Parameters:
request- the request- Returns:
- instance of
IPAllowListValidationResultas validation result which returns true inIPAllowListValidationResult.isAllowed()if the user's IP address is in the allowlist, otherwise false along with the IP address for validation and the header from which the IP address is read
-