Class AbstractZTNAuthenticationHandler
- java.lang.Object
-
- org.dcache.xrootd.plugins.authn.ztn.AbstractZTNAuthenticationHandler
-
- All Implemented Interfaces:
AuthenticationHandler,RequiresTLS
public abstract class AbstractZTNAuthenticationHandler extends java.lang.Object implements AuthenticationHandler, RequiresTLS
Base handler for xrootd-security message exchange based on the ZTN protocol. Because the specific type of the credential token is not defined by this library, an implementation of this class must be provided.
-
-
Field Summary
Fields Modifier and Type Field Description protected ZTNCredentialcredentialprotected static org.slf4j.LoggerLOGGERprotected javax.security.auth.Subjectsubjectprotected java.util.Set<java.lang.String>trustedIssuers
-
Constructor Summary
Constructors Constructor Description AbstractZTNAuthenticationHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description XrootdResponse<AuthenticationRequest>authenticate(AuthenticationRequest request)BufferDecryptergetDecrypter()java.lang.StringgetProtocol()javax.security.auth.SubjectgetSubject()booleanisCompleted()voidsetAlternateTokenLocations(java.util.List<java.lang.String> alternateTokenLocations)voidsetMaxTokenSize(java.lang.Integer maxTokenSize)voidsetTokenUsageFlags(java.lang.Long tokenUsageFlags)voidsetTrustedIssuers(java.util.Set<java.lang.String> trustedIssuers)protected abstract voidvalidateToken()
-
-
-
Field Detail
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
subject
protected javax.security.auth.Subject subject
-
credential
protected ZTNCredential credential
-
trustedIssuers
protected java.util.Set<java.lang.String> trustedIssuers
-
-
Method Detail
-
authenticate
public XrootdResponse<AuthenticationRequest> authenticate(AuthenticationRequest request) throws XrootdException
- Specified by:
authenticatein interfaceAuthenticationHandler- Throws:
XrootdException
-
getProtocol
public java.lang.String getProtocol()
- Specified by:
getProtocolin interfaceAuthenticationHandler- Returns:
- the supported protocol. The protocol string also contains version number and max length of the token accepted.
-
getSubject
public javax.security.auth.Subject getSubject()
- Specified by:
getSubjectin interfaceAuthenticationHandler
-
isCompleted
public boolean isCompleted()
- Specified by:
isCompletedin interfaceAuthenticationHandler
-
getDecrypter
public BufferDecrypter getDecrypter()
- Specified by:
getDecrypterin interfaceAuthenticationHandler
-
setMaxTokenSize
public void setMaxTokenSize(java.lang.Integer maxTokenSize)
-
setAlternateTokenLocations
public void setAlternateTokenLocations(java.util.List<java.lang.String> alternateTokenLocations)
-
setTokenUsageFlags
public void setTokenUsageFlags(java.lang.Long tokenUsageFlags)
-
setTrustedIssuers
public void setTrustedIssuers(java.util.Set<java.lang.String> trustedIssuers)
-
validateToken
protected abstract void validateToken() throws XrootdException- Throws:
XrootdException
-
-