public class GCUBESimpleServiceSecurityManager extends Object implements GCUBEServiceSecurityManager
GCUBEServiceSecurityManager.LifetimeConsumer, GCUBEServiceSecurityManager.LifetimeEvent, GCUBEServiceSecurityManager.LifetimeTopicGCUBESecurityManager.AuthMethod, GCUBESecurityManager.AuthMode, GCUBESecurityManager.DelegationMode| Constructor and Description |
|---|
GCUBESimpleServiceSecurityManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
authoriseCall(GCUBECall authzRequest) |
SecurityCredentials |
getCallerCredentials()
If security is enabled, it extracts credentials from the current request.
|
SecurityCredentials |
getCredentials()
It returns the credentials for outgoing calls currently set in the current thread.
|
GCUBEAuthzPolicy |
getPolicy()
Returns the current authorisation policy.
|
SecurityCredentials |
getServiceCredentials()
If security is enabled, it returns the service credentials.
|
void |
initialise(GCUBEServiceContext ctxt)
Initialise the manager with the context of the associated service.
|
boolean |
isSecurityEnabled()
Indicates whether the manager is operating in a secure context.
|
boolean |
needServiceCredentials()
Indicates whether the service makes use of service credentials.
|
void |
propagateCallerCredentials(boolean propagateCallerCredentials)
Indicates whether the service, without any further configurationm, makes
use of caller credentials: by default is true and, if false, the service will
use its own credentials (without further configuration) to perform calls
|
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 |
subscribe(GCUBEServiceSecurityManager.LifetimeConsumer c,
GCUBEServiceSecurityManager.LifetimeTopic... topics)
Subscribes a
GCUBEServiceSecurityManager.LifetimeConsumer. |
void |
unsubscribe(GCUBEServiceSecurityManager.LifetimeConsumer c,
GCUBEServiceSecurityManager.LifetimeTopic... topics)
Unsubscribes a
GCUBEServiceSecurityManager.LifetimeConsumer. |
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,
GSSCredential... credentials)
Deprecated.
|
void |
useCredentials(Thread thread,
SecurityCredentials... credentials)
If security is enabled, it sets given credentials for outgoing calls in a
given thread.
|
public void authoriseCall(GCUBECall authzRequest) throws GCUBEException
GCUBEExceptionpublic GCUBEAuthzPolicy getPolicy()
GCUBEServiceSecurityManagergetPolicy in interface GCUBEServiceSecurityManagerpublic void initialise(GCUBEServiceContext ctxt) throws Exception
GCUBEServiceSecurityManagerinitialise in interface GCUBEServiceSecurityManagerctxt - the context.Exceptionpublic boolean needServiceCredentials()
GCUBEServiceSecurityManagerneedServiceCredentials in interface GCUBEServiceSecurityManagertrue if it does, false if it does not.public void subscribe(GCUBEServiceSecurityManager.LifetimeConsumer c, GCUBEServiceSecurityManager.LifetimeTopic... topics)
GCUBEServiceSecurityManagerGCUBEServiceSecurityManager.LifetimeConsumer.subscribe in interface GCUBEServiceSecurityManagerc - the consumer.public void unsubscribe(GCUBEServiceSecurityManager.LifetimeConsumer c, GCUBEServiceSecurityManager.LifetimeTopic... topics)
GCUBEServiceSecurityManagerGCUBEServiceSecurityManager.LifetimeConsumer.unsubscribe in interface GCUBEServiceSecurityManagerc - the consumer.public boolean isSecurityEnabled()
GCUBESecurityManagerisSecurityEnabled in interface GCUBESecurityManagertrue if security is enabled, false otherwise.public void setSecurity(Remote s, GCUBESecurityManager.AuthMode e, GCUBESecurityManager.DelegationMode d) throws Exception
GCUBESecurityManagersetSecurity in interface GCUBESecurityManagers - the stub.e - the encryption level.d - the delegation mode.Exception - if the settings could not be enforced.@Deprecated public void useCredentials(GSSCredential credentials) throws Exception
useCredentials in interface GCUBESecurityManagercredentials - the credentials.Exception - if security is enabled, but credentials are corrupt.@Deprecated public void useCredentials(Thread thread, GSSCredential... credentials) throws Exception
Exceptionpublic void useCredentials(SecurityCredentials credentials) throws Exception
GCUBESecurityManageruseCredentials in interface GCUBESecurityManagercredentials - the credentials.Exception - if security is enabled, but credentials are corrupt.public void useCredentials(Thread thread, SecurityCredentials... credentials) throws Exception
GCUBESecurityManageruseCredentials in interface GCUBESecurityManagerthread - 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.public void setAuthMethod(GCUBESecurityManager.AuthMethod m)
GCUBESecurityManagersetAuthMethod in interface GCUBESecurityManagerm - the authentication methodpublic void propagateCallerCredentials(boolean propagateCallerCredentials)
GCUBEServiceSecurityManagerpropagateCallerCredentials in interface GCUBEServiceSecurityManagerpublic SecurityCredentials getCredentials()
GCUBESecurityManagergetCredentials in interface GCUBESecurityManagerpublic SecurityCredentials getServiceCredentials() throws Exception
GCUBEServiceSecurityManagergetServiceCredentials in interface GCUBEServiceSecurityManagernull if security is not enabled.Exception - if security is enabled, but service credentials could not be produced.public SecurityCredentials getCallerCredentials() throws Exception
GCUBEServiceSecurityManagergetCallerCredentials in interface GCUBEServiceSecurityManagernull if security is not enabled.Exception - if security is enabled, but credentials could not be extracted from incoming call.Copyright © 2015. All Rights Reserved.