Class X509AuthenticationProvider
java.lang.Object
org.apache.nifi.web.security.NiFiAuthenticationProvider
org.apache.nifi.web.security.x509.X509AuthenticationProvider
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Authorizer
private X509IdentityProvider
private static final org.slf4j.Logger
(package private) final NiFiProperties
private static final Authorizable
-
Constructor Summary
ConstructorsConstructorDescriptionX509AuthenticationProvider
(X509IdentityProvider certificateIdentityProvider, Authorizer authorizer, NiFiProperties nifiProperties) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
authenticate
(org.springframework.security.core.Authentication authentication) protected static NiFiUser
createUser
(String identity, Set<String> groups, Set<String> idpGroups, NiFiUser chain, String clientAddress, boolean isAnonymous) Returns a regular user populated with the provided values, or if the user should be anonymous, a well-formed instance of the anonymous user with the provided values.private void
logProxyChain
(NiFiUser chain) boolean
Methods inherited from class org.apache.nifi.web.security.NiFiAuthenticationProvider
getMappings, getUserGroups, mapIdentity
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
PROXY_AUTHORIZABLE
-
certificateIdentityProvider
-
authorizer
-
properties
-
-
Constructor Details
-
X509AuthenticationProvider
public X509AuthenticationProvider(X509IdentityProvider certificateIdentityProvider, Authorizer authorizer, NiFiProperties nifiProperties)
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Throws:
org.springframework.security.core.AuthenticationException
-
logProxyChain
-
createUser
protected static NiFiUser createUser(String identity, Set<String> groups, Set<String> idpGroups, NiFiUser chain, String clientAddress, boolean isAnonymous) Returns a regular user populated with the provided values, or if the user should be anonymous, a well-formed instance of the anonymous user with the provided values.- Parameters:
identity
- the user's identitychain
- the proxied entitiesclientAddress
- the requesting IP addressisAnonymous
- if true, an anonymous user will be returned (identity will be ignored)- Returns:
- the populated user
-
supports
-