hudson.security
Class LegacySecurityRealm

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<SecurityRealm>
      extended by hudson.security.SecurityRealm
          extended by hudson.security.LegacySecurityRealm
All Implemented Interfaces:
ExtensionPoint, Describable<SecurityRealm>, org.acegisecurity.AuthenticationManager

public final class LegacySecurityRealm
extends SecurityRealm
implements org.acegisecurity.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 Summary
 
Nested classes/interfaces inherited from class hudson.security.SecurityRealm
SecurityRealm.SecurityComponents
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static Descriptor<SecurityRealm> DESCRIPTOR
           
 
Fields inherited from class hudson.security.SecurityRealm
AUTHENTICATED_AUTHORITY, LIST, NO_AUTHENTICATION
 
Constructor Summary
LegacySecurityRealm()
           
 
Method Summary
 org.acegisecurity.Authentication authenticate(org.acegisecurity.Authentication authentication)
           
 javax.servlet.Filter createFilter(javax.servlet.FilterConfig filterConfig)
          Filter to run for the LegacySecurityRealm is the ChainServletFilter legacy from /WEB-INF/security/SecurityFilters.groovy.
 SecurityRealm.SecurityComponents createSecurityComponents()
          Creates fully-configured AuthenticationManager that performs authentication against the user realm.
 String getAuthenticationGatewayUrl()
          To have the username/password authenticated by the container, submit the form to the URL defined by the servlet spec.
 String getLoginUrl()
          Gets the target URL of the "login" link.
 
Methods inherited from class hudson.security.SecurityRealm
all, allowsSignup, canLogOut, commenceSignup, createCliAuthenticator, doCaptcha, doLogout, findBean, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getPostLogOutUrl, getSecurityComponents, loadGroupByGroupname, loadUserByUsername, setCaptchaSupport, validateCaptcha
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTOR

@Extension
public static final Descriptor<SecurityRealm> DESCRIPTOR
Constructor Detail

LegacySecurityRealm

public LegacySecurityRealm()
Method Detail

createSecurityComponents

public SecurityRealm.SecurityComponents createSecurityComponents()
Description copied from class: SecurityRealm
Creates fully-configured AuthenticationManager that performs authentication against the user realm. The implementation hides how such authentication manager is configured.

AuthenticationManager instantiation 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 via config.jelly and then captured as instance variables inside the SecurityRealm implementation.

Your SecurityRealm may also wants to alter Filter set up by overriding SecurityRealm.createFilter(FilterConfig).

Specified by:
createSecurityComponents in class SecurityRealm

authenticate

public org.acegisecurity.Authentication authenticate(org.acegisecurity.Authentication authentication)
                                              throws org.acegisecurity.AuthenticationException
Specified by:
authenticate in interface org.acegisecurity.AuthenticationManager
Throws:
org.acegisecurity.AuthenticationException

getAuthenticationGatewayUrl

public String getAuthenticationGatewayUrl()
To have the username/password authenticated by the container, submit the form to the URL defined by the servlet spec.

Overrides:
getAuthenticationGatewayUrl in class SecurityRealm

getLoginUrl

public String getLoginUrl()
Description copied from class: SecurityRealm
Gets the target URL of the "login" link. There's no need to override this, except for LegacySecurityRealm. On legacy implementation this should point to loginEntry, which is protected by web.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:
getLoginUrl in class SecurityRealm

createFilter

public javax.servlet.Filter createFilter(javax.servlet.FilterConfig filterConfig)
Filter to run for the LegacySecurityRealm is the ChainServletFilter legacy from /WEB-INF/security/SecurityFilters.groovy.

Overrides:
createFilter in class SecurityRealm


Copyright © 2004-2013. All Rights Reserved.