Class ADtoDBHybridAuthenticator
java.lang.Object
com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrapper
com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfile
com.inductiveautomation.ignition.gateway.authentication.impl.DatabaseExpertUserSource
com.inductiveautomation.ignition.gateway.authentication.impl.ADtoDBHybridAuthenticator
- All Implemented Interfaces:
SSOCompatibleADUserSource,UserSourceProfile,UserSourceProfileKernel
public class ADtoDBHybridAuthenticator
extends DatabaseExpertUserSource
implements SSOCompatibleADUserSource
-
Field Summary
Fields inherited from class com.inductiveautomation.ignition.gateway.authentication.impl.DatabaseExpertUserSource
COL_BADGE, COL_FIRST_NAME, COL_LANGUAGE, COL_LAST_NAME, COL_NOTES, COL_SCHEDULE, COL_USER_UUID, COL_USERNAMEFields inherited from interface com.inductiveautomation.ignition.gateway.user.UserSourceProfile
IDENTIFIER_MDC_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(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) authenticateUsernamePassword(String uname, String pwd) findSSOUser(String uname) Used by the SSO helper in order to search for a user with a given username.getUser(String userName, SRConnection con) protected Collection<User>getUsers(SRConnection con) voidsetAllowAnon(boolean anon) voidsetExtraUserAttributes(List<ExtraLdapAttribute> extraUserAttributes) Set the extra LDAP attributes that we have been configured to return when looking up a user.voidsetLdapHost(String ldapHost) voidsetLdapPort(String ldapPort) voidsetListUsersFromAD(boolean listUsersFromAD) voidsetPageSize(int size) voidsetProfilePassword(SecretConfig profilePassword) voidsetProfileUsername(String profileUsername) voidsetReadTimeOut(Long readTimeOut) voidsetReferral(LDAPHelper.ReferralType referral) voidsetSaslConfig(SASLConfig saslConfig) voidsetSecondaryLdapHost(String secondaryLdapHost) voidsetSecondaryLdapPort(String secondaryLdapPort) voidsetSecurityAuthentication(LDAPHelper.AuthType securityAuthentication) voidsetSecurityProtocol(LDAPHelper.ProtocolType securityProtocol) voidsetSSODomain(String ssoDomain) voidsetSSOEnabled(boolean enabled) voidsetUsePrefixAndSuffixForGatewayUser(boolean usePrefixAndSuffixForGatewayUser) voidsetUserIdAttribute(LdapAttribute userIdAttribute) voidsetUserListFilter(String userListFilter) voidsetUserNameAttribute(String userNameAttribute) voidsetUsernamePrefix(String usernamePrefix) voidsetUsernameSuffix(String usernameSuffix) voidsetUserPropsQuery(String userPropsQuery) voidsetUserSearchBase(String userSearchBase) voidsetUserSearchFilter(String userSearchFilter) voidsetUseSSL(boolean useSsl) booleanDetermine whether we need to fetch the user ID from the database or LDAP.voidstartup(UserSourceManager manager) Called when the user source is created before it is used.toString()Methods inherited from class com.inductiveautomation.ignition.gateway.authentication.impl.DatabaseExpertUserSource
findContactInfo, findExtraProps, findRoles, findScheduleAdjustment, getConnection, getRoles, getUser, getUsers, set, setAuthenticateBadgeQuery, setAuthenticateQuery, setDatasource, setFindUserQuery, setListContactInfoQuery, setListExtraPropsQuery, setListRolesQuery, setListScheduleAdjustmentsQuery, setListUserRolesQuery, setListUsersQueryMethods inherited from class com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfile
addRole, addUser, alterPassword, alterRole, alterUser, getEditFlags, getName, getRoles, getUser, getUsers, removeRole, removeUserMethods inherited from class com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrapper
getCacheValidationTimeout, getContext, getManager, getProfileName, isLockedOut, notifyFailedAttempt, shutdownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.inductiveautomation.ignition.gateway.authentication.impl.SSOCompatibleADUserSource
authenticateADMethods inherited from interface com.inductiveautomation.ignition.gateway.user.UserSourceProfile
getCacheValidationTimeout, shutdown, validatePassword
-
Constructor Details
-
ADtoDBHybridAuthenticator
-
-
Method Details
-
startup
Description copied from interface:UserSourceProfileKernelCalled when the user source is created before it is used.- Specified by:
startupin interfaceUserSourceProfile- Specified by:
startupin interfaceUserSourceProfileKernel- Overrides:
startupin classUserSourceProfileKernelWrapper
-
authenticate
Description copied from interface:UserSourceProfileCalled to both verify authentication for a given username/password pair, and to find the security roles for that user.- Specified by:
authenticatein interfaceUserSourceProfile- Overrides:
authenticatein classDatabaseExpertUserSource- 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
-
authenticateUsernamePassword
- Specified by:
authenticateUsernamePasswordin interfaceSSOCompatibleADUserSource- Throws:
Exception
-
authenticateBadge
public AuthenticatedUser authenticateBadge(String badge, @Nullable String pwd, boolean passwordRequired) throws Exception - Specified by:
authenticateBadgein interfaceSSOCompatibleADUserSource- Throws:
Exception
-
shouldFetchUserId
public boolean shouldFetchUserId()Determine whether we need to fetch the user ID from the database or LDAP. We need to do this if we are configured to user a user ID that is not the username. This is true when we are listing users from AD and the username attribute does not match the user ID attribute, or when we are NOT listing users from the LDAP, and the useruuid column is present in the find user query or list users query.- Returns:
- true if we need to fetch the user ID, false otherwise.
-
getUsers
- Overrides:
getUsersin classDatabaseExpertUserSource- Throws:
Exception
-
getUser
- Overrides:
getUserin classDatabaseExpertUserSource- Throws:
Exception
-
toString
- Overrides:
toStringin classDatabaseExpertUserSource
-
setListUsersFromAD
public void setListUsersFromAD(boolean listUsersFromAD) -
setUserPropsQuery
-
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
-
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.
-
findSSOUser
Description copied from interface:SSOCompatibleADUserSourceUsed 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:
findSSOUserin interfaceSSOCompatibleADUserSource- Throws:
Exception
-