Class DefaultAuthorizationProvider
java.lang.Object
org.gcube.smartgears.security.defaults.DefaultAuthorizationProvider
- All Implemented Interfaces:
org.gcube.common.security.factories.AuthorizationProvider
public class DefaultAuthorizationProvider
extends Object
implements org.gcube.common.security.factories.AuthorizationProvider
Default implementation of an authorization provider, obtaining the container's tokens from the
D4Science IAM through
D4ScienceIAMClient.- Author:
- Luca Frosini (ISTI-CNR)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAuthorizationProvider(SimpleCredentials credentials, String endpoint) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.org.gcube.common.security.secrets.SecretgetSecretForContext(String context) Returns a secret whose token is restricted to the given Context, requested for the container's client.
-
Constructor Details
-
DefaultAuthorizationProvider
-
-
Method Details
-
getContexts
- Specified by:
getContextsin interfaceorg.gcube.common.security.factories.AuthorizationProvider
-
getSecretForContext
Returns a secret whose token is restricted to the given Context, requested for the container's client.- Specified by:
getSecretForContextin interfaceorg.gcube.common.security.factories.AuthorizationProvider- Parameters:
context- the Context the token must be restricted to- Returns:
- the secret holding the restricted token
- Throws:
RuntimeException- if the token cannot be obtained, or if the IAM returns a token not restricted tocontext, which happens when the client is not a member of it
-
getCredentials
Deprecated.- Specified by:
getCredentialsin interfaceorg.gcube.common.security.factories.AuthorizationProvider
-