public interface GCUBESecurityManager
Security managers keep track of credentials to use for outgoing calls in one or more concurrent threads. They allow different clients which execute within a thread to exchange credentials asynchronously; a client which obtains credentials hands them over to the manager where clients which require them, typically in order to make a call, may later find them. Clients may also delegate credentials across different threads (e.g. when they spawn them).
Security managers mediate also between clients and lower-level facilities to set security settings on port-type stubs before making calls.
Security managers are transparent in an unsecure context, where they can be safely invoked to no effect.
Implementations ought to implement the method isSecurityEnabled() to discriminate secure from unsecure contexts.
| Modifier and Type | Interface and Description |
|---|---|
static class |
GCUBESecurityManager.AuthMethod
Enumeration for levels of encryption of outgoing calls.
|
static class |
GCUBESecurityManager.AuthMode
Enumeration for levels of encryption of outgoing calls.
|
static class |
GCUBESecurityManager.DelegationMode
Enumeration for modes of credential delegation for outgoing calls.
|
| Modifier and Type | Method and Description |
|---|---|
SecurityCredentials |
getCredentials()
It returns the credentials for outgoing calls currently set in the current thread.
|
boolean |
isSecurityEnabled()
Indicates whether the manager is operating in a secure context.
|
void |
setAuthMethod(GCUBESecurityManager.AuthMethod m)
Adds an authentication method to be used in this security context
|
void |
setSecurity(Remote s,
GCUBESecurityManager.AuthMode e,
GCUBESecurityManager.DelegationMode d)
If security is enabled, sets the desired level of encryption and the mode of credential delegation
on the stub of a remote porttype.
|
void |
useCredentials(GSSCredential credentials)
Deprecated.
|
void |
useCredentials(SecurityCredentials credentials)
If security is enabled, it sets given credentials for outgoing calls in the current thread.
|
void |
useCredentials(Thread thread,
SecurityCredentials... credentials)
If security is enabled, it sets given credentials for outgoing calls in a
given thread.
|
boolean isSecurityEnabled()
true if security is enabled, false otherwise.@Deprecated void useCredentials(GSSCredential credentials) throws Exception
credentials - the credentials.Exception - if security is enabled, but credentials are corrupt.void useCredentials(SecurityCredentials credentials) throws Exception
credentials - the credentials.Exception - if security is enabled, but credentials are corrupt.void useCredentials(Thread thread, SecurityCredentials... credentials) throws Exception
thread - the thread.credentials - (optional) the credentials. If omitted, it delegates the credentials used for
the current thread to the given thread.Exception - if security is enabled, but credentials are corrupt.SecurityCredentials getCredentials()
void setSecurity(Remote s, GCUBESecurityManager.AuthMode e, GCUBESecurityManager.DelegationMode d) throws Exception
s - the stub.e - the encryption level.d - the delegation mode.Exception - if the settings could not be enforced.void setAuthMethod(GCUBESecurityManager.AuthMethod m)
m - the authentication methodCopyright © 2015. All Rights Reserved.