|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.security.impl.GCUBESimpleServiceSecurityManager
public class GCUBESimpleServiceSecurityManager
Simple security manager: it does nothing. To be used in the non-sec infrastructure or for testing purposes
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.gcube.common.core.security.GCUBEServiceSecurityManager |
|---|
GCUBEServiceSecurityManager.LifetimeConsumer, GCUBEServiceSecurityManager.LifetimeEvent, GCUBEServiceSecurityManager.LifetimeTopic |
| Nested classes/interfaces inherited from interface org.gcube.common.core.security.GCUBESecurityManager |
|---|
GCUBESecurityManager.AuthMethod, GCUBESecurityManager.AuthMode, GCUBESecurityManager.DelegationMode |
| Constructor Summary | |
|---|---|
GCUBESimpleServiceSecurityManager()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GCUBESimpleServiceSecurityManager()
| Method Detail |
|---|
public void authoriseCall(GCUBECall authzRequest)
throws GCUBEException
GCUBEExceptionpublic GCUBEAuthzPolicy getPolicy()
GCUBEServiceSecurityManager
getPolicy in interface GCUBEServiceSecurityManager
public void initialise(GCUBEServiceContext ctxt)
throws Exception
GCUBEServiceSecurityManager
initialise in interface GCUBEServiceSecurityManagerctxt - the context.
Exceptionpublic boolean needServiceCredentials()
GCUBEServiceSecurityManager
needServiceCredentials 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()
GCUBESecurityManager
isSecurityEnabled in interface GCUBESecurityManagertrue if security is enabled, false otherwise.
public void setSecurity(Remote s,
GCUBESecurityManager.AuthMode e,
GCUBESecurityManager.DelegationMode d)
throws Exception
GCUBESecurityManager
setSecurity 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
Exception
public void useCredentials(SecurityCredentials credentials)
throws Exception
GCUBESecurityManager
useCredentials in interface GCUBESecurityManagercredentials - the credentials.
Exception - if security is enabled, but credentials are corrupt.
public void useCredentials(Thread thread,
SecurityCredentials... credentials)
throws Exception
GCUBESecurityManager
useCredentials 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)
GCUBESecurityManager
setAuthMethod in interface GCUBESecurityManagerm - the authentication methodpublic void propagateCallerCredentials(boolean propagateCallerCredentials)
GCUBEServiceSecurityManager
propagateCallerCredentials in interface GCUBEServiceSecurityManagerpublic SecurityCredentials getCredentials()
GCUBESecurityManager
getCredentials in interface GCUBESecurityManager
public SecurityCredentials getServiceCredentials()
throws Exception
GCUBEServiceSecurityManager
getServiceCredentials 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
GCUBEServiceSecurityManager
getCallerCredentials in interface GCUBEServiceSecurityManagernull if security is not enabled.
Exception - if security is enabled, but credentials could not be extracted from incoming call.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||