Class DefaultReverseProxyAuthoritiesPopulator

java.lang.Object
org.jenkinsci.plugins.reverse_proxy_auth.auth.DefaultReverseProxyAuthoritiesPopulator
All Implemented Interfaces:
ReverseProxyAuthoritiesPopulator
Direct Known Subclasses:
ReverseProxyAuthoritiesPopulatorImpl

public class DefaultReverseProxyAuthoritiesPopulator extends Object implements ReverseProxyAuthoritiesPopulator
Author:
Wilder rodrigues (wrodrigues@schuberphilis.com)
  • Field Details

    • authContext

      @CheckForNull protected Hashtable<String,Collection<? extends org.springframework.security.core.GrantedAuthority>> authContext
  • Constructor Details

    • DefaultReverseProxyAuthoritiesPopulator

      public DefaultReverseProxyAuthoritiesPopulator(@CheckForNull Hashtable<String,Collection<? extends org.springframework.security.core.GrantedAuthority>> authContext)
      Constructor for group search scenarios. userRoleAttributes may still be set as a property.
      Parameters:
      authContext - Authentication context. May be null
  • Method Details

    • getAdditionalRoles

      protected Set<org.springframework.security.core.GrantedAuthority> getAdditionalRoles(ReverseProxyUserDetails reverseProxyUser)
      This method should be overridden if required to obtain any additional roles for the given user (on top of those obtained from the standard search implemented by this class).
      Parameters:
      reverseProxyUser - the user who's roles are required
      Returns:
      the extra roles which will be merged with those returned by the group search
    • getGrantedAuthorities

      public final Collection<? extends org.springframework.security.core.GrantedAuthority> getGrantedAuthorities(ReverseProxyUserDetails userDetails)
      Obtains the authorities for the user who's directory entry is represented by the supplied LdapUserDetails object.
      Specified by:
      getGrantedAuthorities in interface ReverseProxyAuthoritiesPopulator
      Parameters:
      userDetails - the user who's authorities are required
      Returns:
      the set of roles granted to the user.
    • getGroupMembershipRoles

      public Set<org.springframework.security.core.GrantedAuthority> getGroupMembershipRoles(String username)
    • setConvertToUpperCase

      public void setConvertToUpperCase(boolean convertToUpperCase)
    • setDefaultRole

      public void setDefaultRole(String defaultRole)
      The default role which will be assigned to all users.
      Parameters:
      defaultRole - the role name, including any desired prefix.
    • setRolePrefix

      public void setRolePrefix(String rolePrefix)