public interface SecurityManager extends Authentication
When bootstrapping only a simple security manager will be provided. This security manager does
only need to support
authenticatePrivileged(String, long, String, byte[], AFCallbackHandler). All other
methods may throw an UnsupportedOperationException. However, as soon as an
organisational model manager is available, its security manager will be used.
| Modifier and Type | Method and Description |
|---|---|
SessionFactory |
authenticatePrivileged(java.lang.String agentName,
long orgPositionID,
java.lang.String method,
byte[] authenticationData,
AFCallbackHandler callbackHandler)
Identifies and authenticates a privileged agent (for instance a system component) by the
corresponding name and ID referring to the appropriate
QualifedAgent with the
designated authentication method providing the authentication method-specific data. |
SessionFactory[] |
authenticatePrivilegedCombined(java.lang.String method,
byte[] authenticationData,
AFCallbackHandler callbackHandler)
Performs a combined authentication of a privileged agent that is
Authentication.authenticate(String, byte[], AFCallbackHandler) and
authenticatePrivileged(String, long, String, byte[], AFCallbackHandler) in one step. |
SessionFactory[] |
authenticatePrivilegedCombined(java.lang.String agentName,
java.lang.String method,
byte[] authenticationData,
AFCallbackHandler callbackHandler)
Performs a combined authentication of a privileged agent that is
Authentication.authenticate(String, String, byte[], AFCallbackHandler) and
authenticatePrivileged(String, long, String, byte[], AFCallbackHandler) in one step. |
SerialisablePair<java.math.BigInteger,java.math.BigInteger> |
getGlobalPublicKeySpec()
Gets the components (modulus and exponent) of the public RSA key of the global security manager
which allows to verify instances of
SessionFactory retrieved from the global
security manager. |
SerialisablePair<java.math.BigInteger,java.math.BigInteger> |
getLocalPublicKeySpec()
Gets the components (modulus and exponent) of the public RSA key of the local security manager
which allows to verify the integrity of security critical methods called by the local security
manager.
|
authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticateCombined, authenticateCombined, logoffSessionFactory authenticatePrivileged(java.lang.String agentName, long orgPositionID, java.lang.String method, byte[] authenticationData, AFCallbackHandler callbackHandler) throws AuthenticationException, IntegrityException
QualifedAgent with the
designated authentication method providing the authentication method-specific data. For
information on this data refer to AuthMethod. The designated callback handler allows
the used authentication method to request additional data while authenticating. For how to use
this refer to CallbackHandler and JAAS.
For the used refer to the corresponding authentication method. The
returned session factory allows the agent to create (privileged) session tokens that are needed
to call the ADEPT2-API.agentName - The unique name of the agent to authenticate. This must not be null nor the
empty string.orgPositionID - The ID of the organisational position of the corresponding
QualifedAgent.method - The authentication method to use for authentication. This must not be null nor
the empty string.authenticationData - The data required by the designated authentication method. Depending
on the authentication method this may be null or empty.callbackHandler - A handler for callbacks allowing the used authentication method to
request further data. This may be null in case no callbacks are required.AuthenticationException - If the designated agent cannot be authenticated by the
designated data with the designated authentication method and the callback handler or
the agent is not allowed to log on at the provided application, an
AuthenticationException will be thrown.IntegrityException - If setting the global security manager in the returned session token
fails due to problems with the integrity of the local or the global security manager,
an IntegrityException will be thrown.SessionFactory[] authenticatePrivilegedCombined(java.lang.String agentName, java.lang.String method, byte[] authenticationData, AFCallbackHandler callbackHandler) throws AuthenticationException, IntegrityException
Authentication.authenticate(String, String, byte[], AFCallbackHandler) and
authenticatePrivileged(String, long, String, byte[], AFCallbackHandler) in one step.
Choosing the organisational position is done via a
OrgPositionChoiceCallback. If there is only one organisational position, this will be chosen
without using the callback. UserSessionIDCallback. However, since using user session IDs is optional, the callback handler
need not handle these callbacks and may even throw an
UnsupportedCallbackException
for them.
The restrictions for valid combinations for the authentication method apply here additionally.
agentName - The unique name of the agent to authenticate. This must not be null nor the
empty string.method - The authentication method to use for authentication. This must not be null.authenticationData - The data required by the designated authentication method. Depending
on the authentication method this may be null or empty.callbackHandler - A handler for callbacks allowing the used authentication method to
request further data. This may be null in case no callbacks (especially for choosing
the organisational position) are required.AuthenticationException - If the designated agent cannot be authenticated by the
designated data with the designated authentication method and the callback handler or
the agent is not allowed to log on at the provided application, an
AuthenticationException will be thrown.IntegrityException - If setting the global security manager in the returned session token
fails due to problems with the integrity of the local or the global security manager,
an IntegrityException will be thrown.SessionFactory[] authenticatePrivilegedCombined(java.lang.String method, byte[] authenticationData, AFCallbackHandler callbackHandler) throws AuthenticationException, IntegrityException
Authentication.authenticate(String, byte[], AFCallbackHandler) and
authenticatePrivileged(String, long, String, byte[], AFCallbackHandler) in one step.
Choosing the organisational position is done via a
OrgPositionChoiceCallback. If there is only one organisational position, this will be chosen
without using the callback. UserSessionIDCallback. However, since using user session IDs is optional, the callback handler
need not handle these callbacks and may even throw an
UnsupportedCallbackException
for them.
The restrictions for valid combinations for the authentication method apply here additionally.
method - The authentication method to use for authentication. This must not be null.authenticationData - The data required by the designated authentication method. Depending
on the authentication method this may be null or empty.callbackHandler - A handler for callbacks allowing the used authentication method to
request further data. This may be null in case no callbacks (especially for choosing
the organisational position) are required.AuthenticationException - If the designated agent cannot be authenticated by the
designated data with the designated authentication method and the callback handler or
the agent is not allowed to log on at the provided application, an
AuthenticationException will be thrown.IntegrityException - If setting the global security manager in the returned session token
fails due to problems with the integrity of the local or the global security manager,
an IntegrityException will be thrown.SerialisablePair<java.math.BigInteger,java.math.BigInteger> getLocalPublicKeySpec()
Use this to create a RSAPublicKeySpec and afterwards an RSAPublicKey
using the local JVM via
RSAPublicKeySpec keySpec = new RSAPublicKeySpec(pair.getFirst(), pair.getSecond(); PublicKey pk = SecurityTools.getRSAKeyFactoryInstance().generatePublic(keySpec);
SerialisablePair<java.math.BigInteger,java.math.BigInteger> getGlobalPublicKeySpec()
SessionFactory retrieved from the global
security manager.
Use this to create a RSAPublicKeySpec and afterwards an RSAPublicKey
using the local JVM via
RSAPublicKeySpec keySpec = new RSAPublicKeySpec(pair.getFirst(), pair.getSecond(); PublicKey pk = SecurityTools.getRSAKeyFactoryInstance().generatePublic(keySpec);
SessionFactory retrieved from
the global security manager.