|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.security.GCUBESecurityManagerImpl
public abstract class GCUBESecurityManagerImpl
Partial implementation of GCUBESecurityManager. Subclasses must implement isSecurityEnabled()
to discriminate between secure and unsecure contexts.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.gcube.common.core.security.GCUBESecurityManager |
|---|
GCUBESecurityManager.AuthMethod, GCUBESecurityManager.AuthMode, GCUBESecurityManager.DelegationMode |
| Field Summary | |
|---|---|
protected GCUBESecurityManager.AuthMethod |
authMethod
|
protected Map<Thread,GSSCredential> |
callCredentials
Cache of credentials indexed by thread id. |
protected GCUBELog |
logger
Object logger. |
protected String |
name
The name of the manager. |
| Constructor Summary | |
|---|---|
GCUBESecurityManagerImpl()
|
|
| Method Summary | |
|---|---|
SecurityCredentials |
getCredentials()
It returns the credentials for outgoing calls currently set in the current thread. |
protected String |
getName()
Returns the name with which the manager should log events. |
abstract 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 |
setLogger(GCUBELog logger)
Sets the manager's logger. |
protected void |
setName(String name)
Sets the name with which the manager should log events |
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,
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 |
| Field Detail |
|---|
protected GCUBELog logger
protected Map<Thread,GSSCredential> callCredentials
protected String name
protected GCUBESecurityManager.AuthMethod authMethod
| Constructor Detail |
|---|
public GCUBESecurityManagerImpl()
| Method Detail |
|---|
public void setLogger(GCUBELog logger)
logger - the logger.protected String getName()
protected void setName(String name)
name - the namepublic abstract boolean isSecurityEnabled()
isSecurityEnabled in interface GCUBESecurityManagertrue if security is enabled, false otherwise.
@Deprecated
public void useCredentials(GSSCredential credentials)
throws Exception
useCredentials in interface GCUBESecurityManagercredentials -
Exception
@Deprecated
public void useCredentials(Thread thread,
GSSCredential... credentials)
throws Exception
credentials -
Exception
public void useCredentials(SecurityCredentials credentials)
throws Exception
useCredentials in interface GCUBESecurityManagercredentials - the credentials.
Exception - if security is enabled, but credentials are corrupt.
public void useCredentials(Thread thread,
SecurityCredentials... credentials)
throws Exception
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 SecurityCredentials getCredentials()
getCredentials in interface GCUBESecurityManager
public void setSecurity(Remote s,
GCUBESecurityManager.AuthMode e,
GCUBESecurityManager.DelegationMode d)
throws Exception
setSecurity in interface GCUBESecurityManagers - the stub.e - the encryption level.d - the delegation mode.
Exception - if the settings could not be enforced.public void setAuthMethod(GCUBESecurityManager.AuthMethod m)
GCUBESecurityManager
setAuthMethod in interface GCUBESecurityManagerm - the authentication method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||