Class LegacySecurityRealm
- All Implemented Interfaces:
- ExtensionPoint,- Describable<SecurityRealm>,- org.springframework.security.authentication.AuthenticationManager
SecurityRealm that accepts ContainerAuthentication object
 without any check (that is, by assuming that the such token is
 already authenticated by the container.)- Author:
- Kohsuke Kawaguchi
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class hudson.security.SecurityRealmSecurityRealm.SecurityComponentsNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic Descriptor<SecurityRealm> Deprecated.as of 2.0 Don't use this field, use injection.Fields inherited from class hudson.security.SecurityRealmAUTHENTICATED_AUTHORITY, AUTHENTICATED_AUTHORITY2, LIST, NO_AUTHENTICATION
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) jakarta.servlet.FiltercreateFilter(jakarta.servlet.FilterConfig filterConfig) CreatesFilterthat all the incoming HTTP requests will go through for authentication.Creates fully-configuredAuthenticationManagerthat performs authentication against the user realm.To have the username/password authenticated by the container, submit the form to the URL defined by the servlet spec.Gets the target URL of the "login" link.Methods inherited from class hudson.security.SecurityRealmall, allowsSignup, canLogOut, commenceSignup, commonFilters, createCliAuthenticator, createFilter, doCaptcha, doLogout, doLogout, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getFrom, getGroupIdStrategy, getPostLogOutUrl, getPostLogOutUrl2, getPostLogOutUrl2, getSecurityComponents, getUserIdStrategy, loadGroupByGroupname, loadGroupByGroupname, loadGroupByGroupname2, loadUserByUsername, loadUserByUsername2, setCaptchaSupport, validateCaptcha
- 
Field Details- 
DESCRIPTOR@Deprecated @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static Descriptor<SecurityRealm> DESCRIPTORDeprecated.as of 2.0 Don't use this field, use injection.
 
- 
- 
Constructor Details- 
LegacySecurityRealm@DataBoundConstructor public LegacySecurityRealm()
 
- 
- 
Method Details- 
createSecurityComponentsDescription copied from class:SecurityRealmCreates fully-configuredAuthenticationManagerthat performs authentication against the user realm. The implementation hides how such authentication manager is configured.AuthenticationManagerinstantiation often depends on the user-specified parameters (for example, if the authentication is based on LDAP, the user needs to specify the host name of the LDAP server.) Such configuration is expected to be presented to the user viaconfig.jellyand then captured as instance variables inside theSecurityRealmimplementation.Your SecurityRealmmay also wants to alterFilterset up by overridingSecurityRealm.createFilter(FilterConfig).- Specified by:
- createSecurityComponentsin class- SecurityRealm
 
- 
authenticatepublic org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
- authenticatein interface- org.springframework.security.authentication.AuthenticationManager
- Throws:
- org.springframework.security.core.AuthenticationException
 
- 
getAuthenticationGatewayUrlTo have the username/password authenticated by the container, submit the form to the URL defined by the servlet spec.- Overrides:
- getAuthenticationGatewayUrlin class- SecurityRealm
- See Also:
 
- 
getLoginUrlDescription copied from class:SecurityRealmGets the target URL of the "login" link. There's no need to override this, except forLegacySecurityRealm. On legacy implementation this should point tologinEntry, which is protected byweb.xml, so that the user can be eventually authenticated by the container.Path is relative from the context root of the Hudson application. The URL returned by this method will get the "from" query parameter indicating the page that the user was at. - Overrides:
- getLoginUrlin class- SecurityRealm
 
- 
createFilterpublic jakarta.servlet.Filter createFilter(jakarta.servlet.FilterConfig filterConfig) Description copied from class:SecurityRealmCreatesFilterthat all the incoming HTTP requests will go through for authentication.The default implementation uses SecurityRealm.getSecurityComponents()and builds a standard filter chain. But subclasses can override this to completely change the filter sequence.For other plugins that want to contribute Filter, seePluginServletFilter.- Overrides:
- createFilterin class- SecurityRealm
 
 
-