public interface SessionFactory
extends java.io.Serializable
SecurityToken which include
user and security-related information. All of this is provided when the
factory is created.
While a session token is used like a transaction in a database management system, a session factory corresponds to a user session, for instance in a web browser. A session factory is retrieved when logging on and may be used until logging off. Every request or a combination or requests belonging together in one transaction are performed with the same session token of the provided session factory (user session).
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Generated ID for serialisation.
|
| Modifier and Type | Method and Description |
|---|---|
QualifiedAgent |
checkAndGetAgent(SessionToken sessionToken)
Checks the integrity of the (security token of the) designated session
token and returns the agent of the (child level) session token.
|
QualifiedAgent |
checkAndGetTopLevelAgent(SessionToken sessionToken)
Checks the integrity of the (security token of the) top-level session of
the designated session token and returns the agent of the corresponding
top-level session token.
|
void |
checkIntegrity(SessionToken sessionToken)
Checks the integrity of the (security token of the) designated session
token.
|
SessionToken |
getChildSession(SessionToken parentSession,
java.net.URI[] callingComponent)
Creates a new child session token with the designated session as parent and
for the designated component.
|
SessionToken |
getChildSession(SessionToken parentSession,
java.net.URI[] callingComponent,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Creates a new child session token with the designated session as parent,
the designated additional attributes and for the designated component.
|
SessionToken |
getPrivilegedChildSession(SessionToken parentSession,
java.net.URI[] callingComponent)
Creates a new child session token with the designated session as parent but
with the privileges of the encapsulated security data.
|
SessionToken |
getPrivilegedChildSession(SessionToken parentSession,
java.net.URI[] callingComponent,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Creates a new child session token with the designated session as parent and
the additional attributes but with the privileges of the encapsulated
security data.
|
java.security.PublicKey |
getPublicKey()
Gets the public key of the security manager of this session factory.
|
SessionToken |
getSessionToken(java.net.URI[] callingComponent)
Creates a new (top-level) session token for the designated component.
|
SessionToken |
getSessionToken(java.net.URI[] callingComponent,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Creates a new (top-level) session token for the designated component with
the designated additional attributes.
|
SessionToken |
getSubstituteSessionToken(SessionToken callerSession,
SignedSecurityToken substitutedToken)
Creates a new (top-level) session token for the designated caller session
with the designated security information for usage as substitute.
|
SessionToken |
getSubstituteSessionToken(SessionToken callerSession,
SignedSecurityToken substitutedToken,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Creates a new (top-level) session token for the designated caller session
with the designated security information and the designated additional
attributes for usage as substitute.
|
boolean |
hasCapability(SessionToken sessionToken,
java.lang.String capability)
Checks the integrity of the (security token of the) designated session
token and returns whether the (security token of the) designated session
has the designated capability.
|
boolean |
hasTopLevelCapability(SessionToken sessionToken,
java.lang.String capability)
Checks the integrity of the (security token of the) top-level session of
the designated session token and returns whether the (security token of
the) top-level session of the designated session has the designated
capability.
|
SessionToken |
unmarshalChildSessionToken(SessionToken parentSession,
java.util.UUID childSessionID,
java.net.URI[] callingComponent,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Unmarshalls a child session token having the designated attributes and the
designated parent session.
|
SessionToken |
unmarshalSessionToken(java.util.UUID sessionID,
SignedSecurityToken securityToken,
java.net.URI[] callingComponent,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Unmarshalls a top-level session token having the designated attributes.
|
static final long serialVersionUID
SessionToken getSessionToken(java.net.URI[] callingComponent)
callingComponent - The component initiating the requested session,
identified by its communication protocol depended URIs.SessionToken getSessionToken(java.net.URI[] callingComponent, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
callingComponent - The component initiating the requested session,
identified by its communication protocol depended URIs.additionalAttributes - Additional attributes which are provided by the
created session token. This may be null.SessionToken getSubstituteSessionToken(SessionToken callerSession, SignedSecurityToken substitutedToken) throws SecurityTokenIntegrityException
callerSession - The session token identifying the caller to retrieve a
substitute session token.substitutedToken - The security token containing the security
information for the created session token.SecurityTokenIntegrityException - If either the designated caller
session or the security token have no integrity, a
SecurityTokenIntegrityException will be thrown.SessionToken getSubstituteSessionToken(SessionToken callerSession, SignedSecurityToken substitutedToken, java.util.Map<java.lang.String,java.lang.String> additionalAttributes) throws SecurityTokenIntegrityException
callerSession - The session token identifying the caller to retrieve a
substitute session token.substitutedToken - The security token containing the security
information for the created session token.additionalAttributes - Additional attributes which are provided by the
created session token. This may be null.SecurityTokenIntegrityException - If either the designated caller
session or the security token have no integrity, a
SecurityTokenIntegrityException will be thrown.SessionToken getChildSession(SessionToken parentSession, java.net.URI[] callingComponent)
parentSession - The parent session for the requested session.callingComponent - The component initiating the requested child
session, identified by its communication protocol depended URIs.SessionToken getChildSession(SessionToken parentSession, java.net.URI[] callingComponent, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
parentSession - The parent session for the requested session.callingComponent - The component initiating the requested child
session, identified by its communication protocol depended URIs.additionalAttributes - Additional attributes which are provided by the
created session token. This may be null.SessionToken getPrivilegedChildSession(SessionToken parentSession, java.net.URI[] callingComponent)
parentSession - The parent session for the requested session (signed).callingComponent - The component initiating the requested privileged
child session, identified by its communication protocol depended
URIs.SessionToken getPrivilegedChildSession(SessionToken parentSession, java.net.URI[] callingComponent, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
parentSession - The parent session for the requested session (signed).callingComponent - The component initiating the requested privileged
child session, identified by its communication protocol depended
URIs.additionalAttributes - Additional attributes which are provided by the
created session token. This may be null.java.security.PublicKey getPublicKey()
void checkIntegrity(SessionToken sessionToken) throws SecurityTokenIntegrityException
SecurityTokenIntegrityException will be thrown.sessionToken - The session token of which to check the integrity.SecurityTokenIntegrityException - If the designated session token has
no integrity, a SecurityTokenIntegrityException
will be thrown.QualifiedAgent checkAndGetAgent(SessionToken sessionToken) throws SecurityTokenIntegrityException
sessionToken - The session token of which to check the integrity and
to return the qualified agent of.SecurityTokenIntegrityException - If the designated session token has
no integrity, a SecurityTokenIntegrityException
will be thrown.QualifiedAgent checkAndGetTopLevelAgent(SessionToken sessionToken) throws SecurityTokenIntegrityException
sessionToken - The session token of which the corresponding top-level
session is checked for integrity and the qualified agent is
returned.SecurityTokenIntegrityException - If the top-level parent session of
the designated session token has no integrity, a
SecurityTokenIntegrityException will be thrown.boolean hasCapability(SessionToken sessionToken, java.lang.String capability) throws SecurityTokenIntegrityException
sessionToken - The session token of which to check the integrity and
to return the capability of.capability - A string representing the capability of the function the
owner of this token wants to perform.SecurityTokenIntegrityException - If the designated session token has
no integrity, a SecurityTokenIntegrityException will
be thrown.Capabilitiesboolean hasTopLevelCapability(SessionToken sessionToken, java.lang.String capability) throws SecurityTokenIntegrityException
sessionToken - The session token of which to check the integrity and
to return the capability of the corresponding top-level session
token.capability - A string representing the capability of the function the
owner of the top-level session token wants to perform.SecurityTokenIntegrityException - If the top-level parent session of
the designated session token has no integrity, a
SecurityTokenIntegrityException will be thrown.CapabilitiesSessionToken unmarshalSessionToken(java.util.UUID sessionID, SignedSecurityToken securityToken, java.net.URI[] callingComponent, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
sessionID - The sessionID of the unmarshalled session. This must not
be null.securityToken - The security token (signed) containing the access
rights and the user. This must not be null.callingComponent - The component that started the unmarshalled
session. This must neither be null nor an empty array.additionalAttributes - Additional attributes which are provided by
this session token that may contain additional session-specific
information. This may be null.SessionToken unmarshalChildSessionToken(SessionToken parentSession, java.util.UUID childSessionID, java.net.URI[] callingComponent, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
parentSession - The (sub)session the unmarshalled session is a
subsession of. This must not be null.childSessionID - The sessionID that should be assigned to the
unmarshalled child session (unique to this child session). This
must not be null.callingComponent - The ADEPT2 component for the unmarshalled
subsession, identified by its communication protocol depended
URIs. This must neither be null nor an empty array.additionalAttributes - Additional attributes which are provided by
this session token that may contain additional session-specific
information. This may be null.