public interface GCUBEServiceSecurityManager extends GCUBESecurityManager
GCUBESecurityManager which operates in a service context, where client and service
credentials must be distinguished and where authorisation becomes relevant.
A service security manager authorises incoming calls, extracts caller credentials from them, and retrieves service credentials to use for outgoing calls.
| Modifier and Type | Interface and Description |
|---|---|
static class |
GCUBEServiceSecurityManager.LifetimeConsumer
Lifetime event consumer
|
static class |
GCUBEServiceSecurityManager.LifetimeEvent
Lifetime event.
|
static class |
GCUBEServiceSecurityManager.LifetimeTopic
Lifetime topic enumeration.
|
GCUBESecurityManager.AuthMethod, GCUBESecurityManager.AuthMode, GCUBESecurityManager.DelegationMode| Modifier and Type | Method and Description |
|---|---|
SecurityCredentials |
getCallerCredentials()
If security is enabled, it extracts credentials from the current request.
|
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 |
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 |
subscribe(GCUBEServiceSecurityManager.LifetimeConsumer c,
GCUBEServiceSecurityManager.LifetimeTopic... topics)
Subscribes a
GCUBEServiceSecurityManager.LifetimeConsumer. |
void |
unsubscribe(GCUBEServiceSecurityManager.LifetimeConsumer c,
GCUBEServiceSecurityManager.LifetimeTopic... topics)
Unsubscribes a
GCUBEServiceSecurityManager.LifetimeConsumer. |
getCredentials, isSecurityEnabled, setAuthMethod, setSecurity, useCredentials, useCredentials, useCredentialsvoid initialise(GCUBEServiceContext ctxt) throws Exception
ctxt - the context.Exceptionvoid subscribe(GCUBEServiceSecurityManager.LifetimeConsumer c, GCUBEServiceSecurityManager.LifetimeTopic... topics)
GCUBEServiceSecurityManager.LifetimeConsumer.c - the consumer.void unsubscribe(GCUBEServiceSecurityManager.LifetimeConsumer c, GCUBEServiceSecurityManager.LifetimeTopic... topics)
GCUBEServiceSecurityManager.LifetimeConsumer.c - the consumer.SecurityCredentials getServiceCredentials() throws Exception
null if security is not enabled.Exception - if security is enabled, but service credentials could not be produced.SecurityCredentials getCallerCredentials() throws Exception
null if security is not enabled.Exception - if security is enabled, but credentials could not be extracted from incoming call.GCUBEAuthzPolicy getPolicy()
boolean needServiceCredentials()
true if it does, false if it does not.void propagateCallerCredentials(boolean propagateCallerCredentials)
Copyright © 2015. All Rights Reserved.