public class ReverseProxySecurityRealm extends SecurityRealm
| Modifier and Type | Class and Description |
|---|---|
static class |
ReverseProxySecurityRealm.ProxyLDAPDescriptor |
static class |
ReverseProxySecurityRealm.ReverseProxyUserDetailsService |
SecurityRealm.SecurityComponentsExtensionPoint.LegacyInstancesAreScopedToHudson| Modifier and Type | Field and Description |
|---|---|
org.acegisecurity.GrantedAuthority[] |
authorities
The authorities that are granted to the authenticated user.
|
String |
customLogInUrl
Custom post logout url
|
String |
customLogOutUrl |
boolean |
disableLdapEmailResolver |
String |
forwardedUser
The name of the header which the username has to be extracted from.
|
static String |
GROUP_SEARCH
LDAP filter to look for groups by their names.
|
String |
groupMembershipFilter
Query to locate the group entries that a user belongs to, given the user object.
|
String |
groupNameAttribute
Attribute that should be used instead of CN as name to match a users group name to the groupSearchFilter name.
|
String |
groupSearchBase
This defines the organizational unit that contains groups.
|
String |
groupSearchFilter
Query to locate an entry that identifies the group, given the group name string.
|
String |
headerGroups
Header name of the groups field.
|
String |
headerGroupsDelimiter
Header name of the groups delimiter field.
|
boolean |
inhibitInferRootDN
Allow the rootDN to be inferred? Default is false.
|
String |
managerDN
If non-null, we use this and
managerPassword
when binding to LDAP. |
String |
retrievedUser
The username retrieved from the header field, which is represented by the forwardedUser attribute.
|
String |
rootDN
The root DN to connect to.
|
String |
server
LDAP server name(s) separated by spaces, optionally with TCP port number, like "ldap.acme.org"
or "ldap.acme.org:389" and/or with protcol, like "ldap://ldap.acme.org".
|
int |
updateInterval
Sets an interval for updating the LDAP authorities.
|
String |
userSearch
Query to locate an entry that identifies the user, given the user name string.
|
String |
userSearchBase
Specifies the relative DN from
the root DN. |
AUTHENTICATED_AUTHORITY, LIST, NO_AUTHENTICATION| Constructor and Description |
|---|
ReverseProxySecurityRealm(String forwardedUser,
String headerGroups,
String headerGroupsDelimiter,
String customLogInUrl,
String customLogOutUrl,
String server,
String rootDN,
boolean inhibitInferRootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String groupSearchFilter,
String groupMembershipFilter,
String groupNameAttribute,
String managerDN,
String managerPassword,
Integer updateInterval,
boolean disableLdapEmailResolver,
String displayNameLdapAttribute,
String emailAddressLdapAttribute) |
all, allowsSignup, commenceSignup, createCliAuthenticator, doCaptcha, doLogout, findBean, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getFrom, getGroupIdStrategy, getLoginUrl, getSecurityComponents, getUserIdStrategy, loadGroupByGroupname, setCaptchaSupport, validateCaptchapublic static String GROUP_SEARCH
public final String server
public final String rootDN
public final boolean inhibitInferRootDN
public final String userSearchBase
the root DN.
This is used to narrow down the search space when doing user search.
Something like "ou=people" but can be empty.public final String userSearch
FilterBasedLdapUserSearchpublic final String groupSearchBase
FilterBasedLdapUserSearchpublic final String groupSearchFilter
GROUP_SEARCHpublic final String groupMembershipFilter
{0}
is the user's full DN while {1} is the username.public String groupNameAttribute
groupSearchFilter is set to search for a field other than CN e.g. GroupDisplayName={0}
here you can configure that this (GroupDisplayName) or another field should be used when looking for a users groups.public final String managerDN
managerPassword
when binding to LDAP.
This is necessary when LDAP doesn't support anonymous access.public final int updateInterval
public transient org.acegisecurity.GrantedAuthority[] authorities
@CheckForNull public final String forwardedUser
public String retrievedUser
public final String headerGroups
public final String headerGroupsDelimiter
public final boolean disableLdapEmailResolver
public final String customLogInUrl
public final String customLogOutUrl
@DataBoundConstructor public ReverseProxySecurityRealm(String forwardedUser, String headerGroups, String headerGroupsDelimiter, String customLogInUrl, String customLogOutUrl, String server, String rootDN, boolean inhibitInferRootDN, String userSearchBase, String userSearch, String groupSearchBase, String groupSearchFilter, String groupMembershipFilter, String groupNameAttribute, String managerDN, String managerPassword, Integer updateInterval, boolean disableLdapEmailResolver, String displayNameLdapAttribute, String emailAddressLdapAttribute)
public String getForwardedUser()
public String getHeaderGroups()
public String getHeaderGroupsDelimiter()
@CheckForNull public String getServerUrl()
public String getGroupSearchFilter()
public String getGroupMembershipFilter()
public String getGroupNameAttribute()
public void setGroupNameAttribute(String groupNameAttribute)
public String getDisplayNameLdapAttribute()
public String getEmailAddressLdapAttribute()
@Nullable public static String toProviderUrl(@CheckForNull String serverUrl, @CheckForNull String rootDN)
public String getManagerPassword()
public int getUpdateInterval()
public String getLDAPURL()
public javax.servlet.Filter createFilter(javax.servlet.FilterConfig filterConfig)
createFilter in class SecurityRealmpublic boolean canLogOut()
canLogOut in class SecurityRealmpublic String getPostLogOutUrl(org.kohsuke.stapler.StaplerRequest req, org.acegisecurity.Authentication auth)
getPostLogOutUrl in class SecurityRealmpublic SecurityRealm.SecurityComponents createSecurityComponents() throws org.springframework.dao.DataAccessException
createSecurityComponents in class SecurityRealmorg.springframework.dao.DataAccessExceptionpublic org.acegisecurity.userdetails.UserDetails loadUserByUsername(String username) throws org.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadUserByUsername in class SecurityRealmorg.acegisecurity.userdetails.UsernameNotFoundExceptionorg.springframework.dao.DataAccessExceptionpublic org.acegisecurity.userdetails.ldap.LdapUserDetails updateLdapUserDetails(org.acegisecurity.userdetails.ldap.LdapUserDetails d)
public GroupDetails loadGroupByGroupname(String groupname) throws org.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadGroupByGroupname in class SecurityRealmorg.acegisecurity.userdetails.UsernameNotFoundExceptionorg.springframework.dao.DataAccessExceptionCopyright © 2016–2020. All rights reserved.