Class ADInternalHybridUserSource
java.lang.Object
com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrapper
com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfile
com.inductiveautomation.ignition.gateway.authentication.impl.InternalUserSource
com.inductiveautomation.ignition.gateway.authentication.impl.ADInternalHybridUserSource
- All Implemented Interfaces:
SSOCompatibleADUserSource
,UserSourceProfile
,UserSourceProfileKernel
public class ADInternalHybridUserSource
extends InternalUserSource
implements SSOCompatibleADUserSource
-
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.gateway.user.UserSourceProfile
IDENTIFIER_MDC_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
alterUser
(User user, UICallback ui) authenticate
(AuthChallenge challenge) Called to both verify authentication for a given username/password pair, and to find the security roles for that user.authenticateBadge
(String badge, String pwd, boolean passwordRequired) Authenticates a user with a badge.authenticateUsernamePassword
(String uname, String pwd) findSSOUser
(String uname) Used by the SSO helper in order to search for a user with a given username.protected String
findUserInternalId
(User user) Find the internal ID of the user.protected String
Generate a UUID for anInternalUserResource
.Which of the editing functions are supported?Fetch aUser
with the given user name.getUsers()
Retrieve all users from this profile.protected String
selectInternalUserId
(InternalUserResource internalUser) Select the internal user ID from theInternalUserResource
.void
setAllowAnon
(boolean anon) void
setEmailAttribute
(String emailAttribute) void
setExtraUserAttributes
(List<ExtraLdapAttribute> extraUserAttributes) Set the extra LDAP attributes that we have been configured to return when looking up a user.void
setFullNameAttribute
(String fullNameAttribute) void
setLdapHost
(String ldapHost) void
setLdapPort
(String ldapPort) void
setListUsersFromAD
(boolean listUsersFromAD) void
setPageSize
(int size) void
setPhoneAttribute
(String phoneAttribute) void
setPopulateUsersOnDemand
(boolean populateUsersOnDemand) void
setProfilePassword
(SecretConfig profilePassword) void
setProfileUsername
(String profileUsername) void
setReadTimeout
(Long readTimeOut) void
setReferral
(LDAPHelper.ReferralType referral) void
setSaslConfig
(SASLConfig saslConfig) void
setSecondaryLdapHost
(String secondaryLdapHost) void
setSecondaryLdapPort
(String secondaryLdapPort) void
setSecurityAuthentication
(LDAPHelper.AuthType securityAuthentication) void
setSecurityProtocol
(LDAPHelper.ProtocolType securityProtocol) void
setSmsAttribute
(String smsAttribute) void
setSSODomain
(String ssoDomain) void
setSSOEnabled
(boolean enabled) void
setUsePrefixAndSuffixForGatewayUser
(boolean usePrefixAndSuffixForGatewayUser) void
setUserIdAttribute
(LdapAttribute userIdAttribute) void
setUserListFilter
(String userListFilter) void
setUserNameAttribute
(String userNameAttribute) void
setUsernamePrefix
(String usernamePrefix) void
setUsernameSuffix
(String usernameSuffix) void
setUserSearchBase
(String userSearchBase) void
setUserSearchFilter
(String userSearchFilter) void
setUseSSL
(boolean useSsl) void
startup
(UserSourceManager manager) Called when the user source is created before it is used.toString()
Methods inherited from class com.inductiveautomation.ignition.gateway.authentication.impl.InternalUserSource
addRole, addUser, addUserInternal, alterPassword, alterRole, findInternalUser, getRoles, removeRole, removeUser, validatePassword
Methods inherited from class com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfile
getName, getRoles, getUser, getUsers
Methods inherited from class com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrapper
getCacheValidationTimeout, getContext, getManager, getProfileName, isLockedOut, notifyFailedAttempt, shutdown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.gateway.authentication.impl.SSOCompatibleADUserSource
authenticateAD
Methods inherited from interface com.inductiveautomation.ignition.gateway.user.UserSourceProfile
getCacheValidationTimeout, shutdown
-
Constructor Details
-
ADInternalHybridUserSource
-
-
Method Details
-
startup
Description copied from interface:UserSourceProfileKernel
Called when the user source is created before it is used.- Specified by:
startup
in interfaceUserSourceProfile
- Specified by:
startup
in interfaceUserSourceProfileKernel
- Overrides:
startup
in classUserSourceProfileKernelWrapper
-
generateUuid
Description copied from class:InternalUserSource
Generate a UUID for anInternalUserResource
.- Overrides:
generateUuid
in classInternalUserSource
- Returns:
- A UUID string or null if no UUID is generated.
-
selectInternalUserId
Description copied from class:InternalUserSource
Select the internal user ID from theInternalUserResource
.- Overrides:
selectInternalUserId
in classInternalUserSource
- Parameters:
internalUser
- The internal user resource to get the ID of.- Returns:
- The ID of the internal user.
-
alterUser
- Specified by:
alterUser
in interfaceUserSourceProfile
- Overrides:
alterUser
in classInternalUserSource
- Throws:
Exception
-
findUserInternalId
Description copied from class:InternalUserSource
Find the internal ID of the user. This is used to identify the user in the JSON resource.- Overrides:
findUserInternalId
in classInternalUserSource
- Parameters:
user
- The user to find the ID for.- Returns:
- The internal ID of the user.
-
authenticate
Description copied from interface:UserSourceProfile
Called to both verify authentication for a given username/password pair, and to find the security roles for that user.- Specified by:
authenticate
in interfaceUserSourceProfile
- Overrides:
authenticate
in classInternalUserSource
- Returns:
- An AuthenticatedUser that contains the user's roles if authentication succeeded, or null if it did not.
- Throws:
PasswordExpiredException
- if the user's password has expired and must be resetException
- if there was an unexpected problem encountered during authentication
-
getUsers
Description copied from interface:UserSourceProfile
Retrieve all users from this profile. This can execute slowly (block) if need be. It will be called periodically by the manager and the results will be cached. Users from failover sources will be returned if hard failover is configured and triggered.- Specified by:
getUsers
in interfaceUserSourceProfile
- Overrides:
getUsers
in classInternalUserSource
- Throws:
Exception
-
getUser
Description copied from interface:UserSourceProfile
Fetch aUser
with the given user name. If more than one user exists with the given user name, the first user returned from the underlying data source is returned. Failover sources will be queried if hard failover is configured and the primary sources are unable to fetch the user due to an error. Failover sources will also be queried if soft failover is configured and the user is not found in the primary sources.- Specified by:
getUser
in interfaceUserSourceProfile
- Overrides:
getUser
in classInternalUserSource
- Parameters:
userName
- the user name of theUser
to fetch- Returns:
- an
Optional
User
with the given user name. the user may be from a failover user source (checkUser.getProfileName()
to confirm) - Throws:
Exception
- if there is an unexpected problem fetching the user with the given user name- See Also:
-
authenticateUsernamePassword
- Specified by:
authenticateUsernamePassword
in interfaceSSOCompatibleADUserSource
- Throws:
Exception
-
authenticateBadge
public AuthenticatedUser authenticateBadge(String badge, @Nullable String pwd, boolean passwordRequired) throws Exception Authenticates a user with a badge. If the badge is associated with a user in the internal user store, it will return anAuthenticatedUser
instance populated with the user's information. If the badge is not associated with any user, it will return null.- Specified by:
authenticateBadge
in interfaceSSOCompatibleADUserSource
- Parameters:
badge
- the badge to authenticatepwd
- the password associated with the badge, or null if no password is requiredpasswordRequired
- whether a password is required in addition to the badge for authentication- Returns:
- an
AuthenticatedUser
instance if authentication is successful, or null if authentication fails - Throws:
Exception
- if there is an error during the LDAP search or user creation
-
findSSOUser
Description copied from interface:SSOCompatibleADUserSource
Used by the SSO helper in order to search for a user with a given username. Return null if no user with this username is found.- Specified by:
findSSOUser
in interfaceSSOCompatibleADUserSource
- Throws:
Exception
-
toString
- Overrides:
toString
in classInternalUserSource
-
setPopulateUsersOnDemand
public void setPopulateUsersOnDemand(boolean populateUsersOnDemand) -
setListUsersFromAD
public void setListUsersFromAD(boolean listUsersFromAD) -
setLdapHost
-
setLdapPort
-
setSecondaryLdapHost
-
setSecondaryLdapPort
-
setUsernamePrefix
-
setUsernameSuffix
-
setProfileUsername
-
setReadTimeout
-
setProfilePassword
-
setUsePrefixAndSuffixForGatewayUser
public void setUsePrefixAndSuffixForGatewayUser(boolean usePrefixAndSuffixForGatewayUser) -
setUseSSL
public void setUseSSL(boolean useSsl) -
setAllowAnon
public void setAllowAnon(boolean anon) -
setSecurityAuthentication
-
setSecurityProtocol
-
setUserSearchBase
-
setUserSearchFilter
-
setUserListFilter
-
setUserNameAttribute
-
setUserIdAttribute
-
setFullNameAttribute
-
setEmailAttribute
-
setPhoneAttribute
-
setSmsAttribute
-
setPageSize
public void setPageSize(int size) -
setSSOEnabled
public void setSSOEnabled(boolean enabled) -
setSSODomain
-
setSaslConfig
-
setReferral
-
setExtraUserAttributes
Set the extra LDAP attributes that we have been configured to return when looking up a user.- Parameters:
extraUserAttributes
- The configured list of additional user attributes.
-
getEditFlags
Description copied from interface:UserSourceProfile
Which of the editing functions are supported?- Specified by:
getEditFlags
in interfaceUserSourceProfile
- Overrides:
getEditFlags
in classInternalUserSource
-