public class WebSudoIPAllowListManager extends Object
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
| Modifier and Type | Field and Description |
|---|---|
static String |
REMOTE_IP_HEADER_PROPERTY |
static String |
WEBSUDO_ALLOWLIST_CIDR_PROPERTY |
static String |
WEBSUDO_ALLOWLIST_IP_PROPERTY |
static String |
X_FORWARDED_FOR_HEADER |
| Constructor and Description |
|---|
WebSudoIPAllowListManager(ApplicationProperties applicationProperties) |
| Modifier and Type | Method and Description |
|---|---|
IPAllowListValidationResult |
isAllowed(javax.servlet.http.HttpServletRequest request)
Check if the user's IP address is in the allowlist.
|
public static final String WEBSUDO_ALLOWLIST_IP_PROPERTY
public static final String WEBSUDO_ALLOWLIST_CIDR_PROPERTY
public static final String REMOTE_IP_HEADER_PROPERTY
public static final String X_FORWARDED_FOR_HEADER
public WebSudoIPAllowListManager(ApplicationProperties applicationProperties)
public IPAllowListValidationResult isAllowed(javax.servlet.http.HttpServletRequest request)
request - the requestIPAllowListValidationResult as validation result which returns true in
IPAllowListValidationResult.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 readCopyright © 2002-2024 Atlassian. All Rights Reserved.