AuthenticationProviderProxy
: Configures the list of
AuthenticationProvider
and the default authenticator.
AuthenticationProvider
: Configures the authentication providers for the current portal implementation. The example below configures the default authenticator that uses the RDBMS to manage/store user information.
AuthorizationProvider
: Configures the policies and instantiates the
SecurityPolicies
that are used for enforcing permissions. By default, Jetspeed 2 does not load any other security policies that may have been configured. In order to use default policies, set
useDefaultPolicy
to
true
Bean
|
Description
|
org.apache.jetspeed.security.spi.SecurityAccess
|
Used internally by the default OJB based SPI. Provide access to common action/methods for the various SPI implementations. The SecurityAccess bean is used by both the Authentication and Authorization SPIs.
|
Bean
|
Description
|
org.apache.jetspeed.security.spi.CredentialHandler
|
The CredentialHandler encapsulates the operations involving manipulation of credentials. The default implementation provides support for password protection as defined by the PasswordCredentialProvider ; as well as lifecycle management of credentials through InternalPasswordCredentialInterceptor which can be configured to manages parameters such as maximum number of authentication failures, maximum life span of a credential in days and how much history to retain for a given credential.
|
org.apache.jetspeed.security.spi.UserSecurityHandler
|
The UserSecurityHandler encapuslated all the operations around the user principals.
|
CredentialHandler
configuration is currently provided by default with Jetspeed:
InternalPasswordCredentialInterceptor
implementations are split up in single atomic interceptors which can much easier be configured indepedently.
jetspeed-pipeline
bean.
Bean
|
Description
|
org.apache.jetspeed.security.spi.RoleSecurityHandler
|
The RoleSecurityHandler encapsulates all the operations around the role principals.
|
org.apache.jetspeed.security.spi.GroupSecurityHandler
|
The GroupSecurityHandler encapsulates all the operations around the group principals.
|
org.apache.jetspeed.security.spi.SecurityMappingHandler
|
The SecurityMappingHandler encapsulates all the operations involving mapping between principals. It contains the logic managing hierarchy resolution for hierarchical principals (roles or groups). The default hierarchy resolution provided is a hierarchy by generalization (see overview for definitions). A contructor-arg can be added to the SecurityMappingHandler to change the hierarchy resolution strategy. Jetspeed 2 also support a hierarchy resolution by aggregation.
|
SecurityMappingHandler
configuration could be:
配置文件
|
说明
|
分析
|
security-atn.xml
|
login module
配置文件
具体可参考:
|
提供了一个接口,可以实现不同的登陆模块,实现不同的登陆认证过程
此时在jetspeed2-security-{version}.jar中包含配置文件login.conf,其内容为:
Jetspeed {
org.apache.jetspeed.security.impl.DefaultLoginModule equired;
};
In order to override this configuration, you can place your own login.conf file in your web application class path under WEB-INF/classes. The location of the login.conf file is configured in the security-providers.xml as described below.
|
security-atz.xml
|
authorization policy
配置文件
|
JAAS认证策略的配置
|
security-managers.xml
|
UserManager
、
GroupManager
、
RoleManager
、
PermissionManager
配置文件
|
配置四个对象的关系管理实现
|
security-providers.xml
|
AuthenticationProvider
、
AuthenticationProviderProxy
、
SecurityProvider
、
AuthorizationProvider
授权认证提供者配置文件
|
|
|
Jetspeed {
org.apache.jetspeed.security.impl.DefaultLoginModule required;
};
|
|
DefaultLoginModule
implementation is illustrated by the class diagram below:
Class
|
Description
|
org.apache.jetspeed.security.impl.DefaultLoginModule
|
The
javax.security.auth.spi.LoginModule
implementation. The
DefaultLoginModule
authentication decision is encapsulated behind the
UserManager
interface which leverages the SPI implementation to decide which authenticator should be used in order to authenticate a user against a specific system of record. For more information on how to implement your own authenticator, see the authentication SPI documentation.
|
org.apache.jetspeed.security.LoginModuleProxy
|
A utility component used to expose the
UserManager
to the
DefaultLoginModule
.
|
org.apache.jetspeed.security.User
|
The
User
is an interface that holds the
javax.security.auth.Subject
and his/her
java.util.prefs.Preferences
. The
UserManager
upon user authentication populates the user subject with all user
java.security.Principal
. Jetspeed 2 implements 3 types of principals:
·
UserPrincipal: The principal holding the user unique identifier for the application.
·
RolePrincipal: The principal representing a role for the system.
·
GroupPrincipal: The principal representing a group for the system.
|
org.apache.jetspeed.security.UserManager
|
The interface exposing all user operations. This interfaces fronts the aggregates various SPI to provide developers with the ability to map users to their specific system of record.
|