<groupId>org.apache.archiva</groupId>
<artifactId>archiva-security</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-spring</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!-- use spring for the unit tests?
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-authorization-rbac</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-keys-memory</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-users-memory</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-rbac-memory</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
+package org.apache.maven.archiva.xmlrpc.security;\r
+\r
/*\r
* Licensed to the Apache Software Foundation (ASF) under one\r
* or more contributor license agreements. See the NOTICE file\r
* specific language governing permissions and limitations\r
* under the License.\r
*/\r
-package org.apache.maven.archiva.xmlrpc.security;\r
\r
-import junit.framework.TestCase;\r
+import java.io.File;\r
+\r
+import org.apache.commons.io.FileUtils;\r
+import org.apache.maven.archiva.configuration.ArchivaConfiguration;\r
+import org.apache.maven.archiva.security.ArchivaRoleConstants;\r
+import org.apache.maven.archiva.security.UserRepositories;\r
import org.apache.xmlrpc.XmlRpcRequest;\r
-import org.apache.xmlrpc.XmlRpcRequestConfig;\r
import org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl;\r
-import org.codehaus.plexus.redback.authentication.AuthenticationDataSource;\r
-import org.codehaus.plexus.redback.authentication.AuthenticationException;\r
-import org.codehaus.plexus.redback.authentication.AuthenticationResult;\r
-import org.codehaus.plexus.redback.authorization.AuthorizationException;\r
-import org.codehaus.plexus.redback.authorization.AuthorizationResult;\r
-import org.codehaus.plexus.redback.keys.KeyManager;\r
-import org.codehaus.plexus.redback.policy.AccountLockedException;\r
-import org.codehaus.plexus.redback.policy.UserSecurityPolicy;\r
-import org.codehaus.plexus.redback.system.SecuritySession;\r
+import org.codehaus.plexus.redback.rbac.RBACManager;\r
+import org.codehaus.plexus.redback.role.RoleManager;\r
import org.codehaus.plexus.redback.system.SecuritySystem;\r
import org.codehaus.plexus.redback.users.User;\r
import org.codehaus.plexus.redback.users.UserManager;\r
import org.codehaus.plexus.redback.users.UserNotFoundException;\r
-\r
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;\r
+import org.easymock.MockControl;\r
+import org.easymock.classextension.MockClassControl;\r
+\r
+/**\r
+ * XmlRpcAuthenticatorTest\r
+ * \r
+ * @version $Id XmlRpcAuthenticatorTest.java\r
+ */\r
public class XmlRpcAuthenticatorTest\r
- extends TestCase\r
+//extends AbstractDependencyInjectionSpringContextTests\r
+ extends PlexusInSpringTestCase\r
{\r
- private static final String USERNAME = "username";\r
+ protected static final String USER_GUEST = "guest";\r
+\r
+ protected static final String USER_ADMIN = "admin";\r
+\r
+ protected static final String USER_ALPACA = "alpaca";\r
\r
- private static final String PASSWORD = "password";\r
+ private static final String PASSWORD = "password123";\r
\r
- public void testAuthentication()\r
+ protected SecuritySystem securitySystem;\r
+\r
+ protected RoleManager roleManager;\r
+ \r
+ private MockControl xmlRpcRequestControl;\r
+ \r
+ private XmlRpcRequest xmlRpcRequest;\r
+ \r
+ private XmlRpcAuthenticator authenticator;\r
+ \r
+ private MockControl configControl;\r
+ \r
+ private XmlRpcHttpRequestConfigImpl config; \r
+ \r
+ public void setUp()\r
throws Exception\r
{\r
- MockSecuritySystem securitySystem = new MockSecuritySystem( true, true, USERNAME, PASSWORD );\r
- XmlRpcAuthenticator authenticator = new XmlRpcAuthenticator( securitySystem );\r
- MockXmlRpcRequest request = new MockXmlRpcRequest( USERNAME, PASSWORD );\r
-\r
- //assertTrue( authenticator.isAuthorized( request ) );\r
+ super.setUp();\r
+ \r
+ securitySystem = (SecuritySystem) lookup( SecuritySystem.class, "testable" ); \r
+ roleManager = (RoleManager) lookup( RoleManager.class, "default" );\r
+ \r
+ // Some basic asserts.\r
+ assertNotNull( securitySystem ); \r
+ assertNotNull( roleManager );\r
+ \r
+ // Setup Admin User.\r
+ User adminUser = createUser( USER_ADMIN, "Admin User", null );\r
+ roleManager.assignRole( ArchivaRoleConstants.TEMPLATE_SYSTEM_ADMIN, adminUser.getPrincipal().toString() );\r
+\r
+ // Setup Guest User.\r
+ User guestUser = createUser( USER_GUEST, "Guest User", null );\r
+ roleManager.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, guestUser.getPrincipal().toString() );\r
+ \r
+ configControl = MockClassControl.createControl( XmlRpcHttpRequestConfigImpl.class );\r
+ config = ( XmlRpcHttpRequestConfigImpl ) configControl.getMock();\r
+ \r
+ xmlRpcRequestControl = MockControl.createControl( XmlRpcRequest.class );\r
+ xmlRpcRequest = ( XmlRpcRequest ) xmlRpcRequestControl.getMock(); \r
+ \r
+ authenticator = new XmlRpcAuthenticator( securitySystem ); \r
}\r
-\r
- class MockXmlRpcRequest\r
- implements XmlRpcRequest\r
+ \r
+ private User createUser( String principal, String fullname, String password )\r
+ throws UserNotFoundException\r
{\r
- private final XmlRpcHttpRequestConfigImpl configImpl;\r
-\r
- public MockXmlRpcRequest( String username, String password )\r
- {\r
- configImpl = new XmlRpcHttpRequestConfigImpl();\r
- configImpl.setBasicUserName( username );\r
- configImpl.setBasicPassword( password );\r
- }\r
-\r
- public XmlRpcRequestConfig getConfig()\r
- {\r
- return configImpl;\r
- }\r
-\r
- public String getMethodName()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public Object getParameter( int pIndex )\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public int getParameterCount()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
+ UserManager userManager = securitySystem.getUserManager();\r
+ \r
+ User user = userManager.createUser( principal, fullname, principal + "@testable.archiva.apache.org" );\r
+ securitySystem.getPolicy().setEnabled( false );\r
+ userManager.addUser( user );\r
+ securitySystem.getPolicy().setEnabled( true );\r
+ \r
+ user.setPassword( password ); \r
+ userManager.updateUser( user );\r
+ \r
+ return user;\r
}\r
-\r
- class MockSecuritySystem\r
- implements SecuritySystem\r
+ \r
+ public void testIsAuthorizedUserExistsButNotAuthorized()\r
+ throws Exception\r
{\r
- private final boolean authorized;\r
-\r
- private final boolean authenticate;\r
-\r
- private final String username;\r
-\r
- private final String password;\r
-\r
- public MockSecuritySystem( boolean authorized, boolean authenticate, String username, String password )\r
- {\r
- this.authorized = authorized;\r
- this.authenticate = authenticate;\r
- this.username = username;\r
- this.password = password;\r
- }\r
-\r
- public SecuritySession authenticate( AuthenticationDataSource dataSource )\r
- throws AuthenticationException, UserNotFoundException, AccountLockedException\r
- {\r
- return new SecuritySession()\r
- {\r
-\r
- public AuthenticationResult getAuthenticationResult()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public User getUser()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public boolean isAuthenticated()\r
- {\r
- throw new UnsupportedOperationException();\r
- }\r
- };\r
- }\r
-\r
- public AuthorizationResult authorize( SecuritySession session, Object arg1 )\r
- throws AuthorizationException\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public AuthorizationResult authorize( SecuritySession session, Object arg1, Object arg2 )\r
- throws AuthorizationException\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public String getAuthenticatorId()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public String getAuthorizerId()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public KeyManager getKeyManager()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public UserSecurityPolicy getPolicy()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public String getUserManagementId()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public UserManager getUserManager()\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public boolean isAuthenticated( AuthenticationDataSource dataSource )\r
- throws AuthenticationException, UserNotFoundException, AccountLockedException\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public boolean isAuthorized( SecuritySession session, Object arg1 )\r
- throws AuthorizationException\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
-\r
- public boolean isAuthorized( SecuritySession session, Object arg1, Object arg2 )\r
- throws AuthorizationException\r
- {\r
- throw new UnsupportedOperationException( "Not supported yet." );\r
- }\r
+ createUser( USER_ALPACA, "Al 'Archiva' Paca", PASSWORD );\r
+ \r
+ UserManager userManager = securitySystem.getUserManager();\r
+ try\r
+ {\r
+ User user = userManager.findUser( USER_ALPACA );\r
+ assertEquals( USER_ALPACA, user.getPrincipal() );\r
+ }\r
+ catch ( UserNotFoundException e )\r
+ {\r
+ fail( "User should exist in the database." ); \r
+ }\r
+ \r
+ xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 );\r
+ \r
+ configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA );\r
+ \r
+ configControl.expectAndReturn( config.getBasicPassword(), PASSWORD );\r
+ \r
+ xmlRpcRequestControl.replay();\r
+ configControl.replay();\r
+ \r
+ boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest );\r
+ \r
+ xmlRpcRequestControl.verify();\r
+ configControl.verify();\r
+ \r
+ assertFalse( isAuthorized );\r
}\r
+ \r
+ public void testIsAuthorizedUserExistsAndAuthorized()\r
+ throws Exception\r
+ {\r
+ createUser( USER_ALPACA, "Al 'Archiva' Paca", PASSWORD );\r
+ \r
+ UserManager userManager = securitySystem.getUserManager();\r
+ try\r
+ {\r
+ User user = userManager.findUser( USER_ALPACA );\r
+ assertEquals( USER_ALPACA, user.getPrincipal() );\r
+ }\r
+ catch ( UserNotFoundException e )\r
+ {\r
+ fail( "User should exist in the database." ); \r
+ }\r
+ \r
+ //TODO cannot assign global repo manager role - it says role does not exist :|\r
+ \r
+ //roleManager.assignRole( ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE, USER_ALPACA );\r
+ \r
+ xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 );\r
+ \r
+ configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA );\r
+ \r
+ configControl.expectAndReturn( config.getBasicPassword(), PASSWORD );\r
+ \r
+ xmlRpcRequestControl.replay();\r
+ configControl.replay();\r
+ \r
+ boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest );\r
+ \r
+ xmlRpcRequestControl.verify();\r
+ configControl.verify();\r
+ \r
+ //assertTrue( isAuthorized );\r
+ }\r
+ \r
+ public void testIsAuthorizedUserDoesNotExist()\r
+ throws Exception\r
+ { \r
+ UserManager userManager = securitySystem.getUserManager();\r
+ try\r
+ {\r
+ userManager.findUser( USER_ALPACA );\r
+ fail( "User should not exist in the database." );\r
+ }\r
+ catch ( UserNotFoundException e )\r
+ {\r
+ assertEquals( "Unable to find user 'alpaca'", e.getMessage() ); \r
+ }\r
+ \r
+ xmlRpcRequestControl.expectAndReturn( xmlRpcRequest.getConfig(), config, 2 );\r
+ \r
+ configControl.expectAndReturn( config.getBasicUserName(), USER_ALPACA );\r
+ \r
+ configControl.expectAndReturn( config.getBasicPassword(), PASSWORD );\r
+ \r
+ xmlRpcRequestControl.replay();\r
+ configControl.replay();\r
+ \r
+ boolean isAuthorized = authenticator.isAuthorized( xmlRpcRequest );\r
+ \r
+ xmlRpcRequestControl.verify();\r
+ configControl.verify();\r
+ \r
+ assertFalse( isAuthorized );\r
+ } \r
}\r
--- /dev/null
+<redback-role-model>
+ <modelVersion>1.0.0</modelVersion>
+ <applications>
+ <application>
+ <id>Redback XWork Integration Security Core</id>
+ <version>1.0</version>
+ <resources>
+ <resource>
+ <id>global</id>
+ <name>*</name>
+ <permanent>true</permanent>
+ <description>
+ global resource implies full access for authorization
+ </description>
+ </resource>
+ <resource>
+ <id>username</id>
+ <name>${username}</name>
+ <permanent>true</permanent>
+ <description>
+ replaced with the username of the principal at authorization
+ check time
+ </description>
+ </resource>
+ </resources>
+ <operations>
+ <operation>
+ <id>configuration-edit</id>
+ <name>configuration-edit</name>
+ <description>edit configuration</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>user-management-user-create</id>
+ <name>user-management-user-create</name>
+ <description>create user</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>user-management-user-edit</id>
+ <name>user-management-user-edit</name>
+ <description>edit user</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>user-management-user-role</id>
+ <name>user-management-user-role</name>
+ <description>user roles</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>user-management-user-delete</id>
+ <name>user-management-user-delete</name>
+ <description>delete user</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>user-management-user-list</id>
+ <name>user-management-user-list</name>
+ <description>list users</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>user-management-role-grant</id>
+ <name>user-management-role-grant</name>
+ <description>grant role</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>user-management-role-drop</id>
+ <name>user-management-role-drop</name>
+ <description>drop role</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>user-management-rbac-admin</id>
+ <name>user-management-rbac-admin</name>
+ <description>administer rbac</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>guest-access</id>
+ <name>guest-access</name>
+ <description>access guest</description>
+ <permanent>true</permanent>
+ </operation>
+ <operation>
+ <id>add-repository</id>
+ <name>add-repository</name>
+ <description>add repository</description>
+ <permanent>true</permanent>
+ </operation>
+ </operations>
+ <roles>
+ <role>
+ <id>system-administrator</id>
+ <name>System Administrator</name>
+ <permanent>true</permanent>
+ <assignable>true</assignable>
+ <permissions>
+ <permission>
+ <id>edit-redback-configuration</id>
+ <name>Edit Redback Configuration</name>
+ <operation>configuration-edit</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ <permission>
+ <id>manage-rbac-setup</id>
+ <name>User RBAC Management</name>
+ <operation>user-management-rbac-admin</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ </permissions>
+ <childRoles>
+ <childRole>user-administrator</childRole>
+ </childRoles>
+ </role>
+ <role>
+ <id>user-administrator</id>
+ <name>User Administrator</name>
+ <permanent>true</permanent>
+ <assignable>true</assignable>
+ <permissions>
+ <permission>
+ <id>drop-roles-for-anyone</id>
+ <name>Drop Roles for Anyone</name>
+ <operation>user-management-role-drop</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ <permission>
+ <id>grant-roles-for-anyone</id>
+ <name>Grant Roles for Anyone</name>
+ <operation>user-management-role-grant</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ <permission>
+ <id>user-create</id>
+ <name>Create Users</name>
+ <operation>user-management-user-create</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ <permission>
+ <id>user-delete</id>
+ <name>Delete Users</name>
+ <operation>user-management-user-delete</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ <permission>
+ <id>user-edit</id>
+ <name>Edit Users</name>
+ <operation>user-management-user-edit</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ <permission>
+ <id>access-users-roles</id>
+ <name>Access Users Roles</name>
+ <operation>user-management-user-role</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ <permission>
+ <id>access-user-list</id>
+ <name>Access User List</name>
+ <operation>user-management-user-list</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ </permissions>
+ </role>
+ <role>
+ <id>registered-user</id>
+ <name>Registered User</name>
+ <permanent>true</permanent>
+ <assignable>true</assignable>
+ <permissions>
+ <permission>
+ <id>edit-user-by-username</id>
+ <name>Edit User Data by Username</name>
+ <operation>user-management-user-edit</operation>
+ <resource>username</resource>
+ <permanent>true</permanent>
+ </permission>
+ </permissions>
+ </role>
+ <role>
+ <id>guest</id>
+ <name>Guest</name>
+ <permanent>true</permanent>
+ <assignable>true</assignable>
+ <permissions>
+ <permission>
+ <id>guest-permission</id>
+ <name>Guest Permission</name>
+ <operation>guest-access</operation>
+ <resource>global</resource>
+ <permanent>true</permanent>
+ </permission>
+ </permissions>
+ </role>
+ </roles>
+ </application>
+ </applications>
+</redback-role-model>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" ?>
+<component-set>
+ <components>
+
+ <!-- x
+ <component>
+ <role>org.apache.maven.archiva.security.UserRepositories</role>
+ <role-hint>default</role-hint>
+ <implementation>org.apache.maven.archiva.security.DefaultUserRepositories</implementation>
+ <description>DefaultUserRepositories</description>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.redback.system.SecuritySystem</role>
+ <role-hint>testable</role-hint>
+ <field-name>securitySystem</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>rbacManager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.role.RoleManager</role>
+ <role-hint>default</role-hint>
+ <field-name>roleManager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
+ <field-name>archivaConfiguration</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ -->
+
+ <component>
+ <role>org.codehaus.plexus.redback.system.SecuritySystem</role>
+ <role-hint>testable</role-hint>
+ <implementation>org.codehaus.plexus.redback.system.DefaultSecuritySystem</implementation>
+ <description>DefaultSecuritySystem:</description>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.redback.authentication.AuthenticationManager</role>
+ <field-name>authnManager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.authorization.Authorizer</role>
+ <role-hint>rbac</role-hint>
+ <field-name>authorizer</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>userManager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.keys.KeyManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>keyManager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.policy.UserSecurityPolicy</role>
+ <field-name>policy</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.codehaus.plexus.redback.authorization.Authorizer</role>
+ <role-hint>rbac</role-hint>
+ <implementation>org.codehaus.plexus.redback.authorization.rbac.RbacAuthorizer</implementation>
+ <description>RbacAuthorizer:</description>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>manager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>userManager</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.authorization.rbac.evaluator.PermissionEvaluator</role>
+ <role-hint>default</role-hint>
+ <field-name>evaluator</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
+ <role-hint>default</role-hint>
+ <field-name>config</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.codehaus.plexus.redback.authorization.rbac.evaluator.PermissionEvaluator</role>
+ <role-hint>default</role-hint>
+ <implementation>org.codehaus.plexus.redback.authorization.rbac.evaluator.DefaultPermissionEvaluator</implementation>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>userManager</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.codehaus.plexus.redback.role.RoleManager</role>
+ <role-hint>default</role-hint>
+ <implementation>org.codehaus.plexus.redback.role.DefaultRoleManager</implementation>
+ <description>RoleProfileManager:</description>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.redback.role.validator.RoleModelValidator</role>
+ <role-hint>default</role-hint>
+ <field-name>modelValidator</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.role.processor.RoleModelProcessor</role>
+ <role-hint>default</role-hint>
+ <field-name>modelProcessor</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.role.template.RoleTemplateProcessor</role>
+ <role-hint>default</role-hint>
+ <field-name>templateProcessor</field-name>
+ </requirement>
+ <requirement>
+ <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>rbacManager</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.codehaus.plexus.redback.role.processor.RoleModelProcessor</role>
+ <role-hint>default</role-hint>
+ <implementation>org.codehaus.plexus.redback.role.processor.DefaultRoleModelProcessor</implementation>
+ <description>DefaultRoleModelProcessor: inserts the components of the model that can be populated into the rbac manager</description>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>rbacManager</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.codehaus.plexus.redback.role.template.RoleTemplateProcessor</role>
+ <role-hint>default</role-hint>
+ <implementation>org.codehaus.plexus.redback.role.template.DefaultRoleTemplateProcessor</implementation>
+ <description>DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager</description>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
+ <role-hint>memory</role-hint>
+ <field-name>rbacManager</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <!--
+ <component>
+ <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
+ <implementation>org.apache.maven.archiva.configuration.DefaultArchivaConfiguration</implementation>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.registry.Registry</role>
+ <role-hint>configured</role-hint>
+ </requirement>
+ </requirements>
+ </component>
+ <component>
+ <role>org.codehaus.plexus.registry.Registry</role>
+ <role-hint>configured</role-hint>
+ <implementation>org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry</implementation>
+ <configuration>
+ <properties>
+ <system/>
+ <xml fileName="${basedir}/target/test-conf/archiva.xml"
+ config-name="org.apache.maven.archiva.base" config-at="org.apache.maven.archiva"/>
+ </properties>
+ </configuration>
+ </component>
+ -->
+
+ </components>
+</component-set>
\ No newline at end of file
</exclusion>
</exclusions>
</dependency>
+ <!-- use spring test in xmlrpc?
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>2.5.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>