public class DefaultMuleSecurityManager extends Object implements SecurityManager
DefaultMuleSecurityManager is a default implementation of a SecurityManager for a Mule instance.| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOGGER
logger used by this class
|
| Constructor and Description |
|---|
DefaultMuleSecurityManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEncryptionStrategy(EncryptionStrategy strategy)
Adds the
EncryptionStrategy to the ones available from this SecurityManager |
void |
addProvider(SecurityProvider provider)
Adds a
SecurityProvider to the set of available providers for authentication. |
org.mule.runtime.api.security.Authentication |
authenticate(org.mule.runtime.api.security.Authentication authentication)
Performs the authentication of a security request using one of the available
SecurityProviders |
SecurityContext |
createSecurityContext(org.mule.runtime.api.security.Authentication authentication)
Uses one of the available
SecurityProviders that SecurityProvider.supports(java.lang.Class<?>)
the given Authentication to create a new security context. |
Collection<EncryptionStrategy> |
getEncryptionStrategies() |
EncryptionStrategy |
getEncryptionStrategy(String name) |
SecurityProvider |
getProvider(String name) |
Collection<SecurityProvider> |
getProviders() |
void |
initialise() |
EncryptionStrategy |
removeEncryptionStrategy(String name)
|
SecurityProvider |
removeProvider(String name)
Removes the
SecurityProvider with the given name from the pool of managed SecurityProviders |
void |
setEncryptionStrategies(Collection<EncryptionStrategy> strategies)
|
void |
setProviders(Collection<SecurityProvider> providers)
Sets the available
SecurityProviders for authentication. |
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic org.mule.runtime.api.security.Authentication authenticate(org.mule.runtime.api.security.Authentication authentication)
throws org.mule.runtime.api.security.SecurityException,
org.mule.runtime.api.security.SecurityProviderNotFoundException
SecurityProvidersauthenticate in interface SecurityManagerauthentication - The Authentication requestorg.mule.runtime.api.security.SecurityException - In case authentication failsorg.mule.runtime.api.security.SecurityProviderNotFoundExceptionSecurityProvider.authenticate(Authentication),
Authentication.isAuthenticated()public void addProvider(SecurityProvider provider)
SecurityProvider to the set of available providers for authentication.addProvider in interface SecurityManagerprovider - the new SecurityProviderpublic SecurityProvider getProvider(String name)
getProvider in interface SecurityManagerSecurityProvider managed by this SecurityManager with the given name
or null if none was foundNamedObject.getName()public SecurityProvider removeProvider(String name)
SecurityProvider with the given name from the pool of managed SecurityProvidersremoveProvider in interface SecurityManagername - the NamedObject.getName() to removeSecurityProvider with the given name, or
null if none was foundpublic Collection<SecurityProvider> getProviders()
getProviders in interface SecurityManagerSecurityProviders managed by this SecurityManagerpublic void setProviders(Collection<SecurityProvider> providers)
SecurityProviders for authentication.setProviders in interface SecurityManagerproviders - the providers available for this SecurityManagerpublic SecurityContext createSecurityContext(org.mule.runtime.api.security.Authentication authentication) throws org.mule.runtime.api.security.UnknownAuthenticationTypeException
SecurityProviders that SecurityProvider.supports(java.lang.Class<?>)
the given Authentication to create a new security context.createSecurityContext in interface SecurityManagerauthentication - the Authentication used to create the new SecurityContextSecurityContext created by the SecurityProvider with the given authenticationorg.mule.runtime.api.security.UnknownAuthenticationTypeException - if no SecurityProvider is found that SecurityProvider.supports(java.lang.Class<?>)
the given authenticationpublic EncryptionStrategy getEncryptionStrategy(String name)
getEncryptionStrategy in interface SecurityManagername - the name of the EncryptionStrategy
that needs to be retrieved.EncryptionStrategy with the given name, from the ones available
in this SecurityManagerpublic void addEncryptionStrategy(EncryptionStrategy strategy)
EncryptionStrategy to the ones available from this SecurityManageraddEncryptionStrategy in interface SecurityManagerstrategy - the EncryptionStrategy to be addedpublic EncryptionStrategy removeEncryptionStrategy(String name)
removeEncryptionStrategy in interface SecurityManagername - the NamedObject.getName() to removeEncryptionStrategy with the given name, or null if none was foundpublic Collection<EncryptionStrategy> getEncryptionStrategies()
getEncryptionStrategies in interface SecurityManagerEncryptionStrategys managed by this SecurityManagerpublic void setEncryptionStrategies(Collection<EncryptionStrategy> strategies)
setEncryptionStrategies in interface SecurityManagerstrategies - the prstrategiesoviders available for this EncryptionStrategyCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.