Class ActiveDirectoryUserSource
- java.lang.Object
- 
- com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrapper
- 
- com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfile
- 
- com.inductiveautomation.ignition.gateway.authentication.impl.ActiveDirectoryUserSource
 
 
 
- 
- All Implemented Interfaces:
- SSOCompatibleADUserSource,- UserSourceProfile,- UserSourceProfileKernel
 
 public class ActiveDirectoryUserSource extends AbstractUserSourceProfile implements SSOCompatibleADUserSource 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringDEFAULT_ROLE_LIST_FILTERDefault group search filter for finding all groupsstatic java.lang.StringDEFAULT_USER_LIST_FILTERDefault group search filter for finding all usersstatic java.lang.StringDEFAULT_USER_SEARCH_FILTERDefault user search filter for looking for a single user- 
Fields inherited from interface com.inductiveautomation.ignition.gateway.user.UserSourceProfilePWD_EXPIRATION_BYPASS
 
- 
 - 
Constructor SummaryConstructors Constructor Description ActiveDirectoryUserSource(UserSourceProfileKernel kernel)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticatedUserauthenticate(AuthChallenge challenge)Called to both verify authentication for a given username/password pair, and to find the security roles for that user.AuthenticatedUserauthenticateAD(AuthChallenge challenge)Callback to the standard, non-SSO version of this user source's auth logicUserfindSSOUser(java.lang.String uname)Used by the SSO helper in order to search for a user with a given username.java.util.Collection<java.lang.String>getRoles()java.util.Optional<User>getUser(java.lang.String userName)Fetch aUserwith the given user name.java.util.Collection<User>getUsers()Retrieve all users from this profile.static voidmain(java.lang.String[] args)voidsetAllowAnon(boolean anon)voidsetEmailAttribute(java.lang.String emailAttribute)voidsetFullNameAttribute(java.lang.String fullNameAttribute)voidsetLdapHost(java.lang.String ldapHost)voidsetLdapPort(java.lang.String ldapPort)voidsetPageSize(int size)voidsetPhoneAttribute(java.lang.String phoneAttribute)voidsetProfilePassword(java.lang.String profilePassword)voidsetProfileUsername(java.lang.String profileUsername)voidsetReadTimeout(java.lang.Long readTimeout)voidsetReferral(LDAPHelper.ReferralType referral)voidsetRoleNameAttribute(java.lang.String roleNameAttribute)voidsetRoleSearchBase(java.lang.String roleSearchBase)voidsetRoleSearchFilter(java.lang.String roleSearchFilter)voidsetSaslConfig(SASLConfig saslConfig)voidsetSecondaryLdapHost(java.lang.String secondaryLdapHost)voidsetSecondaryLdapPort(java.lang.String secondaryLdapPort)voidsetSecurityAuthentication(LDAPHelper.AuthType securityAuthentication)voidsetSecurityProtocol(LDAPHelper.ProtocolType securityProtocol)voidsetSmsAttribute(java.lang.String smsAttribute)voidsetSSODomain(java.lang.String ssoDomain)voidsetSSOEnabled(boolean enabled)voidsetUserListFilter(java.lang.String userListFilter)voidsetUserNameAttribute(java.lang.String usernameAttribute)voidsetUsernamePrefix(java.lang.String usernamePrefix)voidsetUsernameSuffix(java.lang.String usernameSuffix)voidsetUserRoleAttribute(java.lang.String userRoleAttribute)voidsetUserSearchBase(java.lang.String userSearchBase)voidsetUserSearchFilter(java.lang.String userSearchFilter)voidsetUseSSL(boolean useSsl)voidstartup(UserSourceManager manager)Called when the user source is created before it is used.- 
Methods inherited from class com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfileaddRole, addUser, alterPassword, alterUser, getEditFlags, getName, getRoles, getUser, getUsers, removeRole, removeUser, renameRole
 - 
Methods inherited from class com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrappergetCacheValidationTimeout, getContext, getManager, getProfileId, getProfileName, isLockedOut, notifyFailedAttempt, shutdown
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.inductiveautomation.ignition.gateway.user.UserSourceProfilegetCacheValidationTimeout, getProfileId, shutdown, validatePassword
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_USER_SEARCH_FILTERpublic static final java.lang.String DEFAULT_USER_SEARCH_FILTER Default user search filter for looking for a single user- See Also:
- Constant Field Values
 
 - 
DEFAULT_USER_LIST_FILTERpublic static final java.lang.String DEFAULT_USER_LIST_FILTER Default group search filter for finding all users- See Also:
- Constant Field Values
 
 - 
DEFAULT_ROLE_LIST_FILTERpublic static final java.lang.String DEFAULT_ROLE_LIST_FILTER Default group search filter for finding all groups- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ActiveDirectoryUserSourcepublic ActiveDirectoryUserSource(UserSourceProfileKernel kernel) 
 
- 
 - 
Method Detail- 
startuppublic void startup(UserSourceManager manager) Description copied from interface:UserSourceProfileKernelCalled when the user source is created before it is used.- Specified by:
- startupin interface- UserSourceProfile
- Specified by:
- startupin interface- UserSourceProfileKernel
- Overrides:
- startupin class- UserSourceProfileKernelWrapper
 
 - 
getUsers@Nonnull public java.util.Collection<User> getUsers() throws java.lang.Exception Description copied from interface:UserSourceProfileRetrieve 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:
- getUsersin interface- UserSourceProfile
- Specified by:
- getUsersin class- AbstractUserSourceProfile
- Throws:
- java.lang.Exception
 
 - 
getUser@Nonnull public java.util.Optional<User> getUser(java.lang.String userName) throws java.lang.Exception Description copied from interface:UserSourceProfileFetch aUserwith 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:
- getUserin interface- UserSourceProfile
- Overrides:
- getUserin class- AbstractUserSourceProfile
- Parameters:
- userName- the user name of the- Userto fetch
- Returns:
- an OptionalUserwith the given user name. the user may be from a failover user source (checkUser.getProfileName()to confirm)
- Throws:
- java.lang.Exception- if there is an unexpected problem fetching the user with the given user name
- See Also:
- UserSourceProfile.getUser(String, String)
 
 - 
authenticatepublic AuthenticatedUser authenticate(AuthChallenge challenge) throws java.lang.Exception 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 interface- UserSourceProfile
- 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 reset
- java.lang.Exception- if there was an unexpected problem encountered during authentication
 
 - 
authenticateADpublic AuthenticatedUser authenticateAD(AuthChallenge challenge) throws java.lang.Exception Description copied from interface:SSOCompatibleADUserSourceCallback to the standard, non-SSO version of this user source's auth logic- Specified by:
- authenticateADin interface- SSOCompatibleADUserSource
- Throws:
- java.lang.Exception
 
 - 
findSSOUserpublic User findSSOUser(java.lang.String uname) throws java.lang.Exception 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 interface- SSOCompatibleADUserSource
- Throws:
- java.lang.Exception
 
 - 
getRoles@Nonnull public java.util.Collection<java.lang.String> getRoles() throws java.lang.Exception- Specified by:
- getRolesin interface- UserSourceProfile
- Specified by:
- getRolesin class- AbstractUserSourceProfile
- Returns:
- a collection of all possible role names for this profile. May be empty. Roles from failover sources will be returned if hard failover is configured and triggered.
- Throws:
- java.lang.Exception
 
 - 
mainpublic static void main(java.lang.String[] args) 
 - 
setLdapHostpublic void setLdapHost(java.lang.String ldapHost) 
 - 
setLdapPortpublic void setLdapPort(java.lang.String ldapPort) 
 - 
setProfilePasswordpublic void setProfilePassword(java.lang.String profilePassword) 
 - 
setProfileUsernamepublic void setProfileUsername(java.lang.String profileUsername) 
 - 
setRoleSearchBasepublic void setRoleSearchBase(java.lang.String roleSearchBase) 
 - 
setRoleSearchFilterpublic void setRoleSearchFilter(java.lang.String roleSearchFilter) 
 - 
setSecondaryLdapHostpublic void setSecondaryLdapHost(java.lang.String secondaryLdapHost) 
 - 
setSecondaryLdapPortpublic void setSecondaryLdapPort(java.lang.String secondaryLdapPort) 
 - 
setUserNameAttributepublic void setUserNameAttribute(java.lang.String usernameAttribute) 
 - 
setUsernamePrefixpublic void setUsernamePrefix(java.lang.String usernamePrefix) 
 - 
setUsernameSuffixpublic void setUsernameSuffix(java.lang.String usernameSuffix) 
 - 
setUseSSLpublic void setUseSSL(boolean useSsl) 
 - 
setAllowAnonpublic void setAllowAnon(boolean anon) 
 - 
setSecurityAuthenticationpublic void setSecurityAuthentication(LDAPHelper.AuthType securityAuthentication) 
 - 
setSecurityProtocolpublic void setSecurityProtocol(LDAPHelper.ProtocolType securityProtocol) 
 - 
setReadTimeoutpublic void setReadTimeout(java.lang.Long readTimeout) 
 - 
setUserSearchBasepublic void setUserSearchBase(java.lang.String userSearchBase) 
 - 
setUserSearchFilterpublic void setUserSearchFilter(java.lang.String userSearchFilter) 
 - 
setUserListFilterpublic void setUserListFilter(java.lang.String userListFilter) 
 - 
setRoleNameAttributepublic void setRoleNameAttribute(java.lang.String roleNameAttribute) 
 - 
setFullNameAttributepublic void setFullNameAttribute(java.lang.String fullNameAttribute) 
 - 
setUserRoleAttributepublic void setUserRoleAttribute(java.lang.String userRoleAttribute) 
 - 
setEmailAttributepublic void setEmailAttribute(java.lang.String emailAttribute) 
 - 
setPhoneAttributepublic void setPhoneAttribute(java.lang.String phoneAttribute) 
 - 
setSmsAttributepublic void setSmsAttribute(java.lang.String smsAttribute) 
 - 
setPageSizepublic void setPageSize(int size) 
 - 
setSSOEnabledpublic void setSSOEnabled(boolean enabled) 
 - 
setSSODomainpublic void setSSODomain(java.lang.String ssoDomain) 
 - 
setSaslConfigpublic void setSaslConfig(SASLConfig saslConfig) 
 - 
setReferralpublic void setReferral(LDAPHelper.ReferralType referral) 
 
- 
 
-