fix javadoc error
Signed-off-by: olivier lamy <olamy@apache.org>
This commit is contained in:
parent
68e3f318b7
commit
f012c5608a
|
@ -21,7 +21,7 @@ package org.apache.archiva.redback.authentication;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Just a tag to indicate that the implementing class is an AuthenticationDataSource.
|
* Just a tag to indicate that the implementing class is an AuthenticationDataSource.
|
||||||
* <p/>
|
*
|
||||||
* todo which this back to an interface and use the mojo style expression evaluation to populate the particular required fields
|
* todo which this back to an interface and use the mojo style expression evaluation to populate the particular required fields
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* AuthenticationManager:
|
* AuthenticationManager:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
public interface AuthenticationManager
|
public interface AuthenticationManager
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* AuthenticationResult: wrapper object for information that comes back from the authentication system
|
* AuthenticationResult: wrapper object for information that comes back from the authentication system
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jesse@codehaus.org>
|
* @author Jesse McConnell
|
||||||
*/
|
*/
|
||||||
public class AuthenticationResult
|
public class AuthenticationResult
|
||||||
implements Serializable
|
implements Serializable
|
||||||
|
|
|
@ -41,12 +41,12 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* DefaultAuthenticationManager: the goal of the authentication manager is to act as a conduit for
|
* DefaultAuthenticationManager: the goal of the authentication manager is to act as a conduit for
|
||||||
* authentication requests into different authentication schemes
|
* authentication requests into different authentication schemes
|
||||||
* <p/>
|
*
|
||||||
* For example, the default implementation can be configured with any number of authenticators and will
|
* For example, the default implementation can be configured with any number of authenticators and will
|
||||||
* sequentially try them for an authenticated result. This allows you to have the standard user/pass
|
* sequentially try them for an authenticated result. This allows you to have the standard user/pass
|
||||||
* auth procedure followed by authentication based on a known key for 'remember me' type functionality.
|
* auth procedure followed by authentication based on a known key for 'remember me' type functionality.
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("authenticationManager")
|
@Service("authenticationManager")
|
||||||
public class DefaultAuthenticationManager
|
public class DefaultAuthenticationManager
|
||||||
|
|
|
@ -49,7 +49,7 @@ import javax.naming.directory.SearchResult;
|
||||||
/**
|
/**
|
||||||
* LdapBindAuthenticator:
|
* LdapBindAuthenticator:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service( "authenticator#ldap" )
|
@Service( "authenticator#ldap" )
|
||||||
public class LdapBindAuthenticator
|
public class LdapBindAuthenticator
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.springframework.stereotype.Service;
|
||||||
/**
|
/**
|
||||||
* MemoryAuthenticator:
|
* MemoryAuthenticator:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("authenticator#memory")
|
@Service("authenticator#memory")
|
||||||
public class MemoryAuthenticator
|
public class MemoryAuthenticator
|
||||||
|
|
|
@ -34,7 +34,7 @@ import javax.inject.Named;
|
||||||
/**
|
/**
|
||||||
* MemoryAuthenticatorTest:
|
* MemoryAuthenticatorTest:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" } )
|
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" } )
|
||||||
|
|
|
@ -73,9 +73,9 @@ public class UserManagerAuthenticator
|
||||||
/**
|
/**
|
||||||
* @throws org.apache.archiva.redback.policy.AccountLockedException
|
* @throws org.apache.archiva.redback.policy.AccountLockedException
|
||||||
*
|
*
|
||||||
|
* @throws AuthenticationException
|
||||||
|
* @throws AccountLockedException
|
||||||
* @throws MustChangePasswordException
|
* @throws MustChangePasswordException
|
||||||
* @throws MustChangePasswordException
|
|
||||||
* @throws PolicyViolationException
|
|
||||||
* @see org.apache.archiva.redback.authentication.Authenticator#authenticate(org.apache.archiva.redback.authentication.AuthenticationDataSource)
|
* @see org.apache.archiva.redback.authentication.Authenticator#authenticate(org.apache.archiva.redback.authentication.AuthenticationDataSource)
|
||||||
*/
|
*/
|
||||||
public AuthenticationResult authenticate( AuthenticationDataSource ds )
|
public AuthenticationResult authenticate( AuthenticationDataSource ds )
|
||||||
|
|
|
@ -23,7 +23,7 @@ package org.apache.archiva.redback.authorization;
|
||||||
/**
|
/**
|
||||||
* EntityAuthenticationException.java
|
* EntityAuthenticationException.java
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
public class AuthorizationException
|
public class AuthorizationException
|
||||||
extends Exception
|
extends Exception
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.archiva.redback.authorization;
|
||||||
/**
|
/**
|
||||||
* AuthorizationResult: wrapper object for results from the authorization system
|
* AuthorizationResult: wrapper object for results from the authorization system
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
public class AuthorizationResult
|
public class AuthorizationResult
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,8 +26,8 @@ import org.apache.archiva.redback.authorization.AuthorizationResult;
|
||||||
/**
|
/**
|
||||||
* Authorizer:
|
* Authorizer:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
* @todo chain of command rule processing
|
* TODO chain of command rule processing
|
||||||
*/
|
*/
|
||||||
public interface Authorizer
|
public interface Authorizer
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.archiva.redback.authorization;
|
||||||
/**
|
/**
|
||||||
* EntityAuthenticationException.java
|
* EntityAuthenticationException.java
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
public class NotAuthorizedException
|
public class NotAuthorizedException
|
||||||
extends Exception
|
extends Exception
|
||||||
|
|
|
@ -46,7 +46,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* RbacAuthorizer:
|
* RbacAuthorizer:
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("authorizer#rbac")
|
@Service("authorizer#rbac")
|
||||||
public class RbacAuthorizer
|
public class RbacAuthorizer
|
||||||
|
|
|
@ -31,11 +31,11 @@ import javax.inject.Named;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DefaultPermissionEvaluator:
|
* DefaultPermissionEvaluator:
|
||||||
* <p/>
|
*
|
||||||
* Currently only one expression is available for evaluation, ${username} will be replaced with the username
|
* Currently only one expression is available for evaluation, ${username} will be replaced with the username
|
||||||
* of the person making the authorization check
|
* of the person making the authorization check
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jesse@codehaus.org>
|
* @author Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("permissionEvaluator")
|
@Service("permissionEvaluator")
|
||||||
public class DefaultPermissionEvaluator
|
public class DefaultPermissionEvaluator
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.archiva.redback.authorization.rbac.evaluator;
|
||||||
/**
|
/**
|
||||||
* PermissionEvaluationException:
|
* PermissionEvaluationException:
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PermissionEvaluationException
|
public class PermissionEvaluationException
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.archiva.redback.rbac.Permission;
|
||||||
/**
|
/**
|
||||||
* PermissionEvaluator:
|
* PermissionEvaluator:
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface PermissionEvaluator
|
public interface PermissionEvaluator
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.jpox.store.rdbms.RDBMSManager;
|
||||||
/**
|
/**
|
||||||
* A extension to JPOX store manager that allows counting the SQL queries
|
* A extension to JPOX store manager that allows counting the SQL queries
|
||||||
*
|
*
|
||||||
* @author Carlos Sanchez <a href="mailto:carlos@apache.org">
|
* @author Carlos Sanchez
|
||||||
*/
|
*/
|
||||||
public class StoreManagerDebug
|
public class StoreManagerDebug
|
||||||
extends RDBMSManager
|
extends RDBMSManager
|
||||||
|
|
|
@ -30,7 +30,7 @@ import java.util.TreeMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class contains the configuration for a ldap connection.
|
* This class contains the configuration for a ldap connection.
|
||||||
* <p/>
|
*
|
||||||
* Properties of a ldap connection:
|
* Properties of a ldap connection:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Hostname - String, required.
|
* <li>Hostname - String, required.
|
||||||
|
|
|
@ -46,7 +46,7 @@ public interface LdapRoleMapper
|
||||||
* read all ldap groups then map to corresponding role (if no mapping found group is ignored)
|
* read all ldap groups then map to corresponding role (if no mapping found group is ignored)
|
||||||
*
|
*
|
||||||
* @return all roles
|
* @return all roles
|
||||||
* @throws Exception
|
* @throws MappingException
|
||||||
*/
|
*/
|
||||||
List<String> getAllRoles( DirContext context )
|
List<String> getAllRoles( DirContext context )
|
||||||
throws MappingException;
|
throws MappingException;
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.Map;
|
||||||
public interface LdapRoleMapperConfiguration
|
public interface LdapRoleMapperConfiguration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* add mapping ldap group <-> redback roles
|
* add mapping ldap group to redback roles
|
||||||
*
|
*
|
||||||
* @param roles list of Role names
|
* @param roles list of Role names
|
||||||
* @param ldapGroup ldap group
|
* @param ldapGroup ldap group
|
||||||
|
|
|
@ -35,7 +35,7 @@ import javax.naming.directory.BasicAttributes;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="jesse@codehaus.org"> jesse
|
* @author Jesse
|
||||||
*/
|
*/
|
||||||
@Service( "userMapper#ldap" )
|
@Service( "userMapper#ldap" )
|
||||||
public class LdapUserMapper
|
public class LdapUserMapper
|
||||||
|
|
|
@ -62,8 +62,8 @@ import org.springframework.stereotype.Service;
|
||||||
/**
|
/**
|
||||||
* JDO implementation of the data management tool.
|
* JDO implementation of the data management tool.
|
||||||
*
|
*
|
||||||
* @todo do we really need JDO specifics here? Could optimize by going straight to JDOFactory
|
* TODO do we really need JDO specifics here? Could optimize by going straight to JDOFactory
|
||||||
* @todo check whether this current method logs everything unnecessarily.
|
* TODO check whether this current method logs everything unnecessarily.
|
||||||
*/
|
*/
|
||||||
@Service("dataManagementTool#jdo")
|
@Service("dataManagementTool#jdo")
|
||||||
public class JdoDataManagementTool
|
public class JdoDataManagementTool
|
||||||
|
|
|
@ -33,17 +33,16 @@ public class HttpUtils
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Convert typical complex header into properties.
|
* Convert typical complex header into properties.
|
||||||
* <p/>
|
*
|
||||||
* <p/>
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* </p>
|
*
|
||||||
* <p/>
|
|
||||||
* <code>
|
* <code>
|
||||||
* realm="Somewhere Over The Rainbow", domain="kansas.co.us", nonce="65743ABCF"
|
* realm="Somewhere Over The Rainbow", domain="kansas.co.us", nonce="65743ABCF"
|
||||||
* </code>
|
* </code>
|
||||||
* <p/>
|
*
|
||||||
* <p>becomes</p>
|
* <p>becomes</p>
|
||||||
* <p/>
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* Map ( "realm", "Somewhere Over The Rainbox" )
|
* Map ( "realm", "Somewhere Over The Rainbox" )
|
||||||
* Map ( "domain", "kansas.co.us" )
|
* Map ( "domain", "kansas.co.us" )
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* RequiredRolesEnvironmentCheck:
|
* RequiredRolesEnvironmentCheck:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("environmentCheck#guest-user-check")
|
@Service("environmentCheck#guest-user-check")
|
||||||
public class GuestUserEnvironmentCheck
|
public class GuestUserEnvironmentCheck
|
||||||
|
|
|
@ -41,7 +41,7 @@ import java.util.List;
|
||||||
* LockedAdminEnvironmentCheck: checks if accounts marked as system administrator are locked
|
* LockedAdminEnvironmentCheck: checks if accounts marked as system administrator are locked
|
||||||
* and unlocks them on startup.
|
* and unlocks them on startup.
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service( "environmentCheck#locked-admin-check" )
|
@Service( "environmentCheck#locked-admin-check" )
|
||||||
public class LockedAdminEnvironmentCheck
|
public class LockedAdminEnvironmentCheck
|
||||||
|
|
|
@ -35,7 +35,7 @@ import org.springframework.stereotype.Service;
|
||||||
* required roles of the redback-xwork-integration artifact exist to be
|
* required roles of the redback-xwork-integration artifact exist to be
|
||||||
* assigned.
|
* assigned.
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Service("environmentCheck#required-roles")
|
@Service("environmentCheck#required-roles")
|
||||||
|
|
|
@ -35,9 +35,9 @@ import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HttpDigestAuthenticationFilter.
|
* HttpDigestAuthenticationFilter.
|
||||||
* <p/>
|
*
|
||||||
* Uses RFC 2617 and RFC 2069 to perform Digest authentication against the incoming client.
|
* Uses RFC 2617 and RFC 2069 to perform Digest authentication against the incoming client.
|
||||||
* <p/>
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li><a href="http://www.faqs.org/rfcs/rfc2617.html">RFC 2617</a> - HTTP Authentication: Basic and Digest Access Authentication</li>
|
* <li><a href="http://www.faqs.org/rfcs/rfc2617.html">RFC 2617</a> - HTTP Authentication: Basic and Digest Access Authentication</li>
|
||||||
* <li><a href="http://www.faqs.org/rfcs/rfc2069.html">RFC 2069</a> - An Extension to HTTP : Digest Access Authentication</li>
|
* <li><a href="http://www.faqs.org/rfcs/rfc2069.html">RFC 2069</a> - An Extension to HTTP : Digest Access Authentication</li>
|
||||||
|
|
|
@ -24,10 +24,10 @@ import org.apache.archiva.redback.rbac.Role;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EditRoleDetails - Existing user Role Details.
|
* EditRoleDetails - Existing user Role Details.
|
||||||
* <p/>
|
*
|
||||||
* This is a placeholder for information passed back
|
* This is a placeholder for information passed back
|
||||||
* and forth between the Action and the Client.
|
* and forth between the Action and the Client.
|
||||||
* <p/>
|
*
|
||||||
* We intentionally do not hook up the actual object to prevent
|
* We intentionally do not hook up the actual object to prevent
|
||||||
* creative injection of fields and values by the untrusted client.
|
* creative injection of fields and values by the untrusted client.
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,7 +25,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* RoleDetails - this is a placeholder for information passed back
|
* RoleDetails - this is a placeholder for information passed back
|
||||||
* and forth between the Action and the Client.
|
* and forth between the Action and the Client.
|
||||||
* <p/>
|
*
|
||||||
* We intentionally do not hook up the actual object to prevent
|
* We intentionally do not hook up the actual object to prevent
|
||||||
* creative injection of fields and values by the untrusted client.
|
* creative injection of fields and values by the untrusted client.
|
||||||
*
|
*
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.archiva.redback.integration.model;
|
||||||
/**
|
/**
|
||||||
* SimplePermission - this is a placeholder for information passed back
|
* SimplePermission - this is a placeholder for information passed back
|
||||||
* and forth between the Action and the Client.
|
* and forth between the Action and the Client.
|
||||||
* <p/>
|
*
|
||||||
* We intentionally do not hook up the actual object to prevent
|
* We intentionally do not hook up the actual object to prevent
|
||||||
* creative injection of fields and values by the untrusted client.
|
* creative injection of fields and values by the untrusted client.
|
||||||
*
|
*
|
||||||
|
|
|
@ -23,7 +23,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* jaxrs fail to return List<String> so use this contains for rest services returning that
|
* jaxrs fail to return List {@link String} so use this contains for rest services returning that
|
||||||
*
|
*
|
||||||
* @author Olivier Lamy
|
* @author Olivier Lamy
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
|
|
|
@ -77,7 +77,6 @@ public class User
|
||||||
/**
|
/**
|
||||||
* as we can user multiple userManagers implementation we must track from which one this one comes.
|
* as we can user multiple userManagers implementation we must track from which one this one comes.
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
* @return userManager id
|
|
||||||
*/
|
*/
|
||||||
private String userManagerId;
|
private String userManagerId;
|
||||||
|
|
||||||
|
|
|
@ -52,12 +52,11 @@ public interface RoleManagementService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removes a role corresponding to the role Id that was manufactured with the given resource
|
* removes a role corresponding to the role Id that was manufactured with the given resource
|
||||||
* <p/>
|
*
|
||||||
* it also removes any user assignments for that role
|
* it also removes any user assignments for that role
|
||||||
*
|
*
|
||||||
* @param templateId
|
* @param templateId
|
||||||
* @param resource
|
* @param resource
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
@Path( "removeTemplatedRole" )
|
@Path( "removeTemplatedRole" )
|
||||||
@GET
|
@GET
|
||||||
|
@ -71,13 +70,12 @@ public interface RoleManagementService
|
||||||
/**
|
/**
|
||||||
* allows for a role coming from a template to be renamed effectively swapping out the bits of it that
|
* allows for a role coming from a template to be renamed effectively swapping out the bits of it that
|
||||||
* were labeled with the oldResource with the newResource
|
* were labeled with the oldResource with the newResource
|
||||||
* <p/>
|
*
|
||||||
* it also manages any user assignments for that role
|
* it also manages any user assignments for that role
|
||||||
*
|
*
|
||||||
* @param templateId
|
* @param templateId
|
||||||
* @param oldResource
|
* @param oldResource
|
||||||
* @param newResource
|
* @param newResource
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
@Path( "updateRole" )
|
@Path( "updateRole" )
|
||||||
@GET
|
@GET
|
||||||
|
@ -93,7 +91,6 @@ public interface RoleManagementService
|
||||||
*
|
*
|
||||||
* @param roleId
|
* @param roleId
|
||||||
* @param principal
|
* @param principal
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
@Path( "assignRole" )
|
@Path( "assignRole" )
|
||||||
@GET
|
@GET
|
||||||
|
@ -107,7 +104,7 @@ public interface RoleManagementService
|
||||||
*
|
*
|
||||||
* @param roleName
|
* @param roleName
|
||||||
* @param principal
|
* @param principal
|
||||||
* @throws Exception
|
* @throws RedbackServiceException
|
||||||
*/
|
*/
|
||||||
@Path( "assignRoleByName" )
|
@Path( "assignRoleByName" )
|
||||||
@GET
|
@GET
|
||||||
|
@ -118,7 +115,7 @@ public interface RoleManagementService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigns the templated role indicated by the templateId
|
* Assigns the templated role indicated by the templateId
|
||||||
* <p/>
|
*
|
||||||
* fails if the templated role has not been created
|
* fails if the templated role has not been created
|
||||||
*
|
*
|
||||||
* @param templateId
|
* @param templateId
|
||||||
|
@ -139,7 +136,7 @@ public interface RoleManagementService
|
||||||
*
|
*
|
||||||
* @param roleId
|
* @param roleId
|
||||||
* @param principal
|
* @param principal
|
||||||
* @throws Exception
|
* @throws RedbackServiceException
|
||||||
*/
|
*/
|
||||||
@Path( "unassignRole" )
|
@Path( "unassignRole" )
|
||||||
@GET
|
@GET
|
||||||
|
@ -153,7 +150,7 @@ public interface RoleManagementService
|
||||||
*
|
*
|
||||||
* @param roleName
|
* @param roleName
|
||||||
* @param principal
|
* @param principal
|
||||||
* @throws Exception
|
* @throws RedbackServiceException
|
||||||
*/
|
*/
|
||||||
@Path( "unassignRoleByName" )
|
@Path( "unassignRoleByName" )
|
||||||
@GET
|
@GET
|
||||||
|
@ -167,7 +164,7 @@ public interface RoleManagementService
|
||||||
*
|
*
|
||||||
* @param roleId
|
* @param roleId
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws RedbackServiceException
|
||||||
*/
|
*/
|
||||||
@Path( "roleExists" )
|
@Path( "roleExists" )
|
||||||
@GET
|
@GET
|
||||||
|
@ -182,7 +179,7 @@ public interface RoleManagementService
|
||||||
* @param templateId
|
* @param templateId
|
||||||
* @param resource
|
* @param resource
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws RedbackServiceException
|
||||||
*/
|
*/
|
||||||
@Path( "templatedRoleExists" )
|
@Path( "templatedRoleExists" )
|
||||||
@GET
|
@GET
|
||||||
|
@ -198,7 +195,7 @@ public interface RoleManagementService
|
||||||
*
|
*
|
||||||
* @param templateId the templated role
|
* @param templateId the templated role
|
||||||
* @param resource the resource to verify
|
* @param resource the resource to verify
|
||||||
* @throws Exception
|
* @throws RedbackServiceException
|
||||||
*/
|
*/
|
||||||
@Path( "verifyTemplatedRole" )
|
@Path( "verifyTemplatedRole" )
|
||||||
@GET
|
@GET
|
||||||
|
|
|
@ -873,7 +873,7 @@ public class DefaultRoleManagementService
|
||||||
*
|
*
|
||||||
* @param roleList
|
* @param roleList
|
||||||
* @return
|
* @return
|
||||||
* @throws org.apache.archiva.redback.rbac.RbacManagerException
|
* @throws RedbackServiceException
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected List<org.apache.archiva.redback.rbac.Role> filterRolesForCurrentUserAccess(
|
protected List<org.apache.archiva.redback.rbac.Role> filterRolesForCurrentUserAccess(
|
||||||
|
|
|
@ -44,7 +44,7 @@ import javax.annotation.Resource;
|
||||||
/**
|
/**
|
||||||
* KeyStoreAuthenticator:
|
* KeyStoreAuthenticator:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("authenticator#keystore")
|
@Service("authenticator#keystore")
|
||||||
public class KeyStoreAuthenticator
|
public class KeyStoreAuthenticator
|
||||||
|
|
|
@ -102,7 +102,7 @@ public abstract class AbstractKeyManager
|
||||||
/**
|
/**
|
||||||
* Tests the key to see if it is expired or not.
|
* Tests the key to see if it is expired or not.
|
||||||
*
|
*
|
||||||
* If the key is expired, a call to {@link #removeExpiredKey(AuthenticationKey)} is issued,
|
* If the key is expired, a call to {@link #deleteKey(AuthenticationKey)} is issued,
|
||||||
* and a {@link KeyNotFoundException} is thrown.
|
* and a {@link KeyNotFoundException} is thrown.
|
||||||
*
|
*
|
||||||
* @param authkey the key to test.
|
* @param authkey the key to test.
|
||||||
|
|
|
@ -41,7 +41,7 @@ public interface AuthenticationKey
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A String representation of what the purpose of existence is for this key.
|
* A String representation of what the purpose of existence is for this key.
|
||||||
* <p/>
|
*
|
||||||
* Examples: "selfservice password reset", "inter system communications", "remember me"
|
* Examples: "selfservice password reset", "inter system communications", "remember me"
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -40,7 +40,7 @@ public interface KeyManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to find a specific key in the store.
|
* Attempt to find a specific key in the store.
|
||||||
* <p/>
|
*
|
||||||
* NOTE: Implementations of this interface should never return an expired key.
|
* NOTE: Implementations of this interface should never return an expired key.
|
||||||
*
|
*
|
||||||
* @param key the key to find.
|
* @param key the key to find.
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.archiva.redback.configuration.UserConfiguration;
|
||||||
/**
|
/**
|
||||||
* Base class for cookie settings. These will only differ by their configuration keys.
|
* Base class for cookie settings. These will only differ by their configuration keys.
|
||||||
*
|
*
|
||||||
* @todo not sure if having the domain and path in the general configuration is a good idea - this is probably something
|
* TODO not sure if having the domain and path in the general configuration is a good idea - this is probably something
|
||||||
* customised once for all cookies and applications. Should it be in a sharead configuration file, under a sharead key,
|
* customised once for all cookies and applications. Should it be in a sharead configuration file, under a sharead key,
|
||||||
* or perhaps even configured at the application server level? (ie, in Naming).
|
* or perhaps even configured at the application server level? (ie, in Naming).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.util.List;
|
||||||
* User Security Policy Settings.
|
* User Security Policy Settings.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @todo roll password management into it's own object.
|
* TODO roll password management into it's own object.
|
||||||
*/
|
*/
|
||||||
public interface UserSecurityPolicy
|
public interface UserSecurityPolicy
|
||||||
{
|
{
|
||||||
|
@ -125,7 +125,7 @@ public interface UserSecurityPolicy
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable the policies or not.
|
* Enable the policies or not.
|
||||||
* <p/>
|
*
|
||||||
* Useful in code when application startup or application init is being performed.
|
* Useful in code when application startup or application init is being performed.
|
||||||
*
|
*
|
||||||
* @param enabled true if enabled.
|
* @param enabled true if enabled.
|
||||||
|
@ -167,11 +167,11 @@ public interface UserSecurityPolicy
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension Point - Change the password of a user.
|
* Extension Point - Change the password of a user.
|
||||||
* <p/>
|
*
|
||||||
* This method does not check if a user is allowed to change his/her password.
|
* This method does not check if a user is allowed to change his/her password.
|
||||||
* Any kind of authorization checks for password change allowed on guest or
|
* Any kind of authorization checks for password change allowed on guest or
|
||||||
* anonymous users needs to occur before calling this method.
|
* anonymous users needs to occur before calling this method.
|
||||||
* <p/>
|
*
|
||||||
* This method does not persist the newly changed user password.
|
* This method does not persist the newly changed user password.
|
||||||
* That will require a call to {@link org.apache.archiva.redback.users.UserManager#updateUser(User)}.
|
* That will require a call to {@link org.apache.archiva.redback.users.UserManager#updateUser(User)}.
|
||||||
*
|
*
|
||||||
|
|
|
@ -500,7 +500,7 @@ public abstract class AbstractRBACManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the active roles for a given principal
|
* returns the active roles for a given principal
|
||||||
* <p/>
|
*
|
||||||
* NOTE: roles that are returned might have have roles themselves, if
|
* NOTE: roles that are returned might have have roles themselves, if
|
||||||
* you just want all permissions then use {@link #getAssignedPermissions(String principal)}
|
* you just want all permissions then use {@link #getAssignedPermissions(String principal)}
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,12 +18,12 @@ package org.apache.archiva.redback.rbac;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation
|
* Operation
|
||||||
* <p/>
|
*
|
||||||
* In RBAC the operation is an action or functionality that can be linked with a
|
* In RBAC the operation is an action or functionality that can be linked with a
|
||||||
* particular resource into an assignable Permission. Operations don't exist outside
|
* particular resource into an assignable Permission. Operations don't exist outside
|
||||||
* Permissions.
|
* Permissions.
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -40,9 +40,9 @@ public interface Operation
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* name of the operation that is used in the act of authorization
|
* name of the operation that is used in the act of authorization
|
||||||
* <p/>
|
*
|
||||||
* 'modify-foo', 'change-password'
|
* 'modify-foo', 'change-password'
|
||||||
* <p/>
|
*
|
||||||
* NOTE: This field is considered the Primary Key for this object.
|
* NOTE: This field is considered the Primary Key for this object.
|
||||||
*
|
*
|
||||||
* @return the name of the operation.
|
* @return the name of the operation.
|
||||||
|
@ -56,9 +56,9 @@ public interface Operation
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set name of the operation that is used in the act of authorization
|
* Set name of the operation that is used in the act of authorization
|
||||||
* <p/>
|
*
|
||||||
* 'modify-foo', 'change-password'
|
* 'modify-foo', 'change-password'
|
||||||
* <p/>
|
*
|
||||||
* NOTE: This field is considered the Primary Key for this object.
|
* NOTE: This field is considered the Primary Key for this object.
|
||||||
*
|
*
|
||||||
* @param name
|
* @param name
|
||||||
|
|
|
@ -18,13 +18,13 @@ package org.apache.archiva.redback.rbac;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permission
|
* Permission
|
||||||
* <p/>
|
*
|
||||||
* A permission is the wrapper for an operation and a resource effectively saying
|
* A permission is the wrapper for an operation and a resource effectively saying
|
||||||
* that the operation is authorized for that resource.
|
* that the operation is authorized for that resource.
|
||||||
* <p/>
|
*
|
||||||
* P(Operation, Resource)
|
* P(Operation, Resource)
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +38,7 @@ public interface Permission
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the short name of the permission.
|
* Get the short name of the permission.
|
||||||
* <p/>
|
*
|
||||||
* NOTE: This field is considered the Primary Key for this object.
|
* NOTE: This field is considered the Primary Key for this object.
|
||||||
*
|
*
|
||||||
* @return the short name for this permission.
|
* @return the short name for this permission.
|
||||||
|
@ -52,7 +52,7 @@ public interface Permission
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the resource associated with this permission.
|
* This is the resource associated with this permission.
|
||||||
* <p/>
|
*
|
||||||
* Implementors must always supply a Resource.
|
* Implementors must always supply a Resource.
|
||||||
*
|
*
|
||||||
* @return the Resource.
|
* @return the Resource.
|
||||||
|
|
|
@ -27,9 +27,9 @@ import java.util.Set;
|
||||||
/**
|
/**
|
||||||
* RBACManager
|
* RBACManager
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
* @todo expand on javadoc
|
* TODO expand on javadoc
|
||||||
*/
|
*/
|
||||||
public interface RBACManager
|
public interface RBACManager
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public interface RBACManager
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Role}, or return an existing {@link Role}, depending
|
* Creates an implementation specific {@link Role}, or return an existing {@link Role}, depending
|
||||||
* on the provided <code>name</code> parameter.
|
* on the provided <code>name</code> parameter.
|
||||||
* <p/>
|
*
|
||||||
* Note: Be sure to use {@link #saveRole(Role)} in order to persist any changes to the Role.
|
* Note: Be sure to use {@link #saveRole(Role)} in order to persist any changes to the Role.
|
||||||
*
|
*
|
||||||
* @param name the name.
|
* @param name the name.
|
||||||
|
@ -128,7 +128,7 @@ public interface RBACManager
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Permission}, or return an existing {@link Permission}, depending
|
* Creates an implementation specific {@link Permission}, or return an existing {@link Permission}, depending
|
||||||
* on the provided <code>name</code> parameter.
|
* on the provided <code>name</code> parameter.
|
||||||
* <p/>
|
*
|
||||||
* Note: Be sure to use {@link #savePermission(Permission)} in order to persist any changes to the Role.
|
* Note: Be sure to use {@link #savePermission(Permission)} in order to persist any changes to the Role.
|
||||||
*
|
*
|
||||||
* @param name the name.
|
* @param name the name.
|
||||||
|
@ -141,7 +141,7 @@ public interface RBACManager
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Permission} with specified {@link Operation},
|
* Creates an implementation specific {@link Permission} with specified {@link Operation},
|
||||||
* and {@link Resource} identifiers.
|
* and {@link Resource} identifiers.
|
||||||
* <p/>
|
*
|
||||||
* Note: Be sure to use {@link #savePermission(Permission)} in order to persist any changes to the Role.
|
* Note: Be sure to use {@link #savePermission(Permission)} in order to persist any changes to the Role.
|
||||||
*
|
*
|
||||||
* @param name the name.
|
* @param name the name.
|
||||||
|
@ -158,7 +158,6 @@ public interface RBACManager
|
||||||
*
|
*
|
||||||
* @param name the name to test for.
|
* @param name the name to test for.
|
||||||
* @return true if permission exists.
|
* @return true if permission exists.
|
||||||
* @throws RbacManagerException
|
|
||||||
*/
|
*/
|
||||||
boolean permissionExists( String name );
|
boolean permissionExists( String name );
|
||||||
|
|
||||||
|
@ -186,7 +185,7 @@ public interface RBACManager
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Operation}, or return an existing {@link Operation}, depending
|
* Creates an implementation specific {@link Operation}, or return an existing {@link Operation}, depending
|
||||||
* on the provided <code>name</code> parameter.
|
* on the provided <code>name</code> parameter.
|
||||||
* <p/>
|
*
|
||||||
* Note: Be sure to use {@link #saveOperation(Operation)} in order to persist any changes to the Role.
|
* Note: Be sure to use {@link #saveOperation(Operation)} in order to persist any changes to the Role.
|
||||||
*
|
*
|
||||||
* @param name the name.
|
* @param name the name.
|
||||||
|
@ -230,7 +229,7 @@ public interface RBACManager
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Resource}, or return an existing {@link Resource}, depending
|
* Creates an implementation specific {@link Resource}, or return an existing {@link Resource}, depending
|
||||||
* on the provided <code>identifier</code> parameter.
|
* on the provided <code>identifier</code> parameter.
|
||||||
* <p/>
|
*
|
||||||
* Note: Be sure to use {@link #saveResource(Resource)} in order to persist any changes to the Role.
|
* Note: Be sure to use {@link #saveResource(Resource)} in order to persist any changes to the Role.
|
||||||
*
|
*
|
||||||
* @param identifier the identifier.
|
* @param identifier the identifier.
|
||||||
|
@ -266,7 +265,7 @@ public interface RBACManager
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link UserAssignment}, or return an existing {@link UserAssignment},
|
* Creates an implementation specific {@link UserAssignment}, or return an existing {@link UserAssignment},
|
||||||
* depending on the provided <code>identifier</code> parameter.
|
* depending on the provided <code>identifier</code> parameter.
|
||||||
* <p/>
|
*
|
||||||
* Note: Be sure to use {@link #saveUserAssignment(UserAssignment)} in order to persist any changes to the Role.
|
* Note: Be sure to use {@link #saveUserAssignment(UserAssignment)} in order to persist any changes to the Role.
|
||||||
*
|
*
|
||||||
* @param principal the principal reference to the user.
|
* @param principal the principal reference to the user.
|
||||||
|
@ -325,7 +324,7 @@ public interface RBACManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the active roles for a given principal
|
* returns the active roles for a given principal
|
||||||
* <p/>
|
*
|
||||||
* NOTE: roles that are returned might have have roles themselves, if
|
* NOTE: roles that are returned might have have roles themselves, if
|
||||||
* you just want all permissions then use {@link #getAssignedPermissions(String principal)}
|
* you just want all permissions then use {@link #getAssignedPermissions(String principal)}
|
||||||
*
|
*
|
||||||
|
|
|
@ -31,7 +31,7 @@ package org.apache.archiva.redback.rbac;
|
||||||
* wildcards can be used on the resource definition to streamline the assigning of
|
* wildcards can be used on the resource definition to streamline the assigning of
|
||||||
* permissions for _large_ sets of things.
|
* permissions for _large_ sets of things.
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,16 +20,16 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Role
|
* Role
|
||||||
* <p/>
|
*
|
||||||
* A role is assignable to a user and effectively grants that user all of the
|
* A role is assignable to a user and effectively grants that user all of the
|
||||||
* permissions that are present in that role. A role can also contain other roles
|
* permissions that are present in that role. A role can also contain other roles
|
||||||
* which add the permissions in those roles to the available permissions for authorization.
|
* which add the permissions in those roles to the available permissions for authorization.
|
||||||
* <p/>
|
*
|
||||||
* A role can contain any number of permissions
|
* A role can contain any number of permissions
|
||||||
* A role can contain any number of other roles
|
* A role can contain any number of other roles
|
||||||
* A role can be assigned to any number of users
|
* A role can be assigned to any number of users
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +69,7 @@ public interface Role
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the name.
|
* Get the name.
|
||||||
* <p/>
|
*
|
||||||
* NOTE: This field is considered the Primary Key for this object.
|
* NOTE: This field is considered the Primary Key for this object.
|
||||||
*/
|
*/
|
||||||
String getName();
|
String getName();
|
||||||
|
@ -114,7 +114,7 @@ public interface Role
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Name
|
* Set Name
|
||||||
* <p/>
|
*
|
||||||
* NOTE: This field is considered the Primary Key for this object.
|
* NOTE: This field is considered the Primary Key for this object.
|
||||||
*
|
*
|
||||||
* @param name
|
* @param name
|
||||||
|
|
|
@ -24,10 +24,10 @@ import java.util.List;
|
||||||
*
|
*
|
||||||
* This is the many to many mapping object needed by persistence stores.
|
* This is the many to many mapping object needed by persistence stores.
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
*
|
*
|
||||||
* @todo expand on javadoc
|
* TODO expand on javadoc
|
||||||
*/
|
*/
|
||||||
public interface UserAssignment
|
public interface UserAssignment
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ import java.util.List;
|
||||||
* JdoRbacManager:
|
* JdoRbacManager:
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Service( "rbacManager#jdo" )
|
@Service( "rbacManager#jdo" )
|
||||||
|
@ -67,14 +67,13 @@ public class JdoRbacManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Role}.
|
* Creates an implementation specific {@link Role}.
|
||||||
* <p/>
|
*
|
||||||
* Note: this method does not add the {@link Role} to the underlying store.
|
* Note: this method does not add the {@link Role} to the underlying store.
|
||||||
* a call to {@link #saveRole(Role)} is required to track the role created with this
|
* a call to {@link #saveRole(Role)} is required to track the role created with this
|
||||||
* method call.
|
* method call.
|
||||||
*
|
*
|
||||||
* @param name the name.
|
* @param name the name.
|
||||||
* @return the new {@link Role} object with an empty (non-null) {@link Role#getChildRoleNames()} object.
|
* @return the new {@link Role} object with an empty (non-null) {@link Role#getChildRoleNames()} object.
|
||||||
* @throws RbacManagerException
|
|
||||||
*/
|
*/
|
||||||
public Role createRole( String name )
|
public Role createRole( String name )
|
||||||
{
|
{
|
||||||
|
@ -205,7 +204,7 @@ public class JdoRbacManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Permission}.
|
* Creates an implementation specific {@link Permission}.
|
||||||
* <p/>
|
*
|
||||||
* Note: this method does not add the {@link Permission} to the underlying store.
|
* Note: this method does not add the {@link Permission} to the underlying store.
|
||||||
* a call to {@link #savePermission(Permission)} is required to track the permission created
|
* a call to {@link #savePermission(Permission)} is required to track the permission created
|
||||||
* with this method call.
|
* with this method call.
|
||||||
|
@ -237,7 +236,7 @@ public class JdoRbacManager
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Permission} with specified {@link Operation},
|
* Creates an implementation specific {@link Permission} with specified {@link Operation},
|
||||||
* and {@link Resource} identifiers.
|
* and {@link Resource} identifiers.
|
||||||
* <p/>
|
*
|
||||||
* Note: this method does not add the Permission, Operation, or Resource to the underlying store.
|
* Note: this method does not add the Permission, Operation, or Resource to the underlying store.
|
||||||
* a call to {@link #savePermission(Permission)} is required to track the permission, operation,
|
* a call to {@link #savePermission(Permission)} is required to track the permission, operation,
|
||||||
* or resource created with this method call.
|
* or resource created with this method call.
|
||||||
|
@ -338,7 +337,7 @@ public class JdoRbacManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Operation}.
|
* Creates an implementation specific {@link Operation}.
|
||||||
* <p/>
|
*
|
||||||
* Note: this method does not add the {@link Operation} to the underlying store.
|
* Note: this method does not add the {@link Operation} to the underlying store.
|
||||||
* a call to {@link #saveOperation(Operation)} is required to track the operation created
|
* a call to {@link #saveOperation(Operation)} is required to track the operation created
|
||||||
* with this method call.
|
* with this method call.
|
||||||
|
@ -421,7 +420,7 @@ public class JdoRbacManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link Resource}.
|
* Creates an implementation specific {@link Resource}.
|
||||||
* <p/>
|
*
|
||||||
* Note: this method does not add the {@link Resource} to the underlying store.
|
* Note: this method does not add the {@link Resource} to the underlying store.
|
||||||
* a call to {@link #saveResource(Resource)} is required to track the resource created
|
* a call to {@link #saveResource(Resource)} is required to track the resource created
|
||||||
* with this method call.
|
* with this method call.
|
||||||
|
@ -507,14 +506,13 @@ public class JdoRbacManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an implementation specific {@link UserAssignment}.
|
* Creates an implementation specific {@link UserAssignment}.
|
||||||
* <p/>
|
*
|
||||||
* Note: this method does not add the {@link UserAssignment} to the underlying store.
|
* Note: this method does not add the {@link UserAssignment} to the underlying store.
|
||||||
* a call to {@link #saveUserAssignment(UserAssignment)} is required to track the user
|
* a call to {@link #saveUserAssignment(UserAssignment)} is required to track the user
|
||||||
* assignment created with this method call.
|
* assignment created with this method call.
|
||||||
*
|
*
|
||||||
* @param principal the principal reference to the user.
|
* @param principal the principal reference to the user.
|
||||||
* @return the new UserAssignment with an empty (non-null) {@link UserAssignment#getRoleNames()} object.
|
* @return the new UserAssignment with an empty (non-null) {@link UserAssignment#getRoleNames()} object.
|
||||||
* @throws RbacManagerException
|
|
||||||
*/
|
*/
|
||||||
public UserAssignment createUserAssignment( String principal )
|
public UserAssignment createUserAssignment( String principal )
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@ import java.util.Properties;
|
||||||
/**
|
/**
|
||||||
* JdoRbacManagerTest:
|
* JdoRbacManagerTest:
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
*/
|
*/
|
||||||
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
|
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
|
||||||
|
|
|
@ -472,22 +472,21 @@ public class LdapRbacManager
|
||||||
return this.rbacImpl.getParentRoles( role );
|
return this.rbacImpl.getParentRoles( role );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
//
|
||||||
public Collection<Role> getEffectivelyAssignedRoles( String username )
|
// public Collection<Role> getEffectivelyAssignedRoles( String username )
|
||||||
throws RbacManagerException
|
// throws RbacManagerException
|
||||||
{
|
// {
|
||||||
// TODO here !!
|
// TODO here !!
|
||||||
return this.rbacImpl.getEffectivelyAssignedRoles( username );
|
// return this.rbacImpl.getEffectivelyAssignedRoles( username );
|
||||||
}**/
|
// }
|
||||||
|
|
||||||
|
//public Collection<Role> getEffectivelyUnassignedRoles( String username )
|
||||||
|
//throws RbacManagerException
|
||||||
|
//{
|
||||||
|
// TODO here !!
|
||||||
|
// return this.rbacImpl.getEffectivelyUnassignedRoles( username );
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
|
||||||
* public Collection<Role> getEffectivelyUnassignedRoles( String username )
|
|
||||||
* throws RbacManagerException
|
|
||||||
* {
|
|
||||||
* // TODO here !!
|
|
||||||
* return this.rbacImpl.getEffectivelyUnassignedRoles( username );
|
|
||||||
* }*
|
|
||||||
*/
|
|
||||||
|
|
||||||
public Set<Role> getEffectiveRoles( Role role )
|
public Set<Role> getEffectiveRoles( Role role )
|
||||||
throws RbacManagerException
|
throws RbacManagerException
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.apache.archiva.redback.users.User;
|
||||||
/**
|
/**
|
||||||
* MemoryAuthorizationDataSource:
|
* MemoryAuthorizationDataSource:
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MemoryAuthorizationDataSource
|
public class MemoryAuthorizationDataSource
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.archiva.redback.authorization.Authorizer;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("authorizer#memory")
|
@Service("authorizer#memory")
|
||||||
public class MemoryAuthorizer
|
public class MemoryAuthorizer
|
||||||
|
|
|
@ -43,10 +43,10 @@ import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MemoryRbacManager: a very quick and dirty implementation of a rbac store
|
* MemoryRbacManager: a very quick and dirty implementation of a rbac store
|
||||||
* <p/>
|
*
|
||||||
* WARNING: not for actual usage, its not sound - jesse
|
* WARNING: not for actual usage, its not sound - jesse
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -57,7 +57,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* RoleProfileManager:
|
* RoleProfileManager:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("roleManager")
|
@Service("roleManager")
|
||||||
public class DefaultRoleManager
|
public class DefaultRoleManager
|
||||||
|
@ -228,7 +228,7 @@ public class DefaultRoleManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update the role from templateId from oldResource to newResource
|
* update the role from templateId from oldResource to newResource
|
||||||
* <p/>
|
*
|
||||||
* NOTE: this requires removal and creation of the role since the jdo store does not tolerate renaming
|
* NOTE: this requires removal and creation of the role since the jdo store does not tolerate renaming
|
||||||
* because of the use of the name as an identifier
|
* because of the use of the name as an identifier
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.net.URL;
|
||||||
/**
|
/**
|
||||||
* RoleProfileManager:
|
* RoleProfileManager:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface RoleManager
|
public interface RoleManager
|
||||||
|
@ -58,7 +58,7 @@ public interface RoleManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removes a role corresponding to the role Id that was manufactured with the given resource
|
* removes a role corresponding to the role Id that was manufactured with the given resource
|
||||||
* <p/>
|
*
|
||||||
* it also removes any user assignments for that role
|
* it also removes any user assignments for that role
|
||||||
*
|
*
|
||||||
* @param templateId
|
* @param templateId
|
||||||
|
@ -72,7 +72,7 @@ public interface RoleManager
|
||||||
/**
|
/**
|
||||||
* allows for a role coming from a template to be renamed effectively swapping out the bits of it that
|
* allows for a role coming from a template to be renamed effectively swapping out the bits of it that
|
||||||
* were labeled with the oldResource with the newResource
|
* were labeled with the oldResource with the newResource
|
||||||
* <p/>
|
*
|
||||||
* it also manages any user assignments for that role
|
* it also manages any user assignments for that role
|
||||||
*
|
*
|
||||||
* @param templateId
|
* @param templateId
|
||||||
|
@ -106,7 +106,7 @@ public interface RoleManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigns the templated role indicated by the templateId
|
* Assigns the templated role indicated by the templateId
|
||||||
* <p/>
|
*
|
||||||
* fails if the templated role has not been created
|
* fails if the templated role has not been created
|
||||||
*
|
*
|
||||||
* @param templateId
|
* @param templateId
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.archiva.redback.role;
|
||||||
/**
|
/**
|
||||||
* RoleProfileException:
|
* RoleProfileException:
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RoleManagerException
|
public class RoleManagerException
|
||||||
|
|
|
@ -51,7 +51,7 @@ import java.util.Set;
|
||||||
/**
|
/**
|
||||||
* DefaultRoleModelProcessor: inserts the components of the model that can be populated into the rbac manager
|
* DefaultRoleModelProcessor: inserts the components of the model that can be populated into the rbac manager
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service( "roleModelProcessor" )
|
@Service( "roleModelProcessor" )
|
||||||
public class DefaultRoleModelProcessor
|
public class DefaultRoleModelProcessor
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.archiva.redback.role.model.RedbackRoleModel;
|
||||||
/**
|
/**
|
||||||
* RoleModelValidator:
|
* RoleModelValidator:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface RoleModelProcessor
|
public interface RoleModelProcessor
|
||||||
|
|
|
@ -48,7 +48,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager
|
* DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service("roleTemplateProcessor")
|
@Service("roleTemplateProcessor")
|
||||||
public class DefaultRoleTemplateProcessor
|
public class DefaultRoleTemplateProcessor
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.archiva.redback.role.model.RedbackRoleModel;
|
||||||
/**
|
/**
|
||||||
* RoleModelValidator:
|
* RoleModelValidator:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
public interface RoleTemplateProcessor
|
public interface RoleTemplateProcessor
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.archiva.redback.role.template;
|
||||||
/**
|
/**
|
||||||
* RoleProfileException:
|
* RoleProfileException:
|
||||||
*
|
*
|
||||||
* @author Jesse McConnell <jmcconnell@apache.org>
|
* @author Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RoleTemplateProcessorException
|
public class RoleTemplateProcessorException
|
||||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* RoleModelUtils:
|
* RoleModelUtils:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RoleModelUtils
|
public class RoleModelUtils
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* DefaultRoleModelValidator: validates completeness of the model
|
* DefaultRoleModelValidator: validates completeness of the model
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Service( "roleModelValidator" )
|
@Service( "roleModelValidator" )
|
||||||
|
@ -430,7 +430,7 @@ public class DefaultRoleModelValidator
|
||||||
* We are not allowed to have cycles between template either, this method is to detect and
|
* We are not allowed to have cycles between template either, this method is to detect and
|
||||||
* raise a red flag when that happens. Templates are a bit more complex since they have both
|
* raise a red flag when that happens. Templates are a bit more complex since they have both
|
||||||
* child and parent roles, as well as runtime parent and child templates
|
* child and parent roles, as well as runtime parent and child templates
|
||||||
* <p/>
|
*
|
||||||
* the id should be sufficient to test cycles here even though in runtime the id's do not need to be
|
* the id should be sufficient to test cycles here even though in runtime the id's do not need to be
|
||||||
* unique since it is the binding of a namePrefix and a resource that makes them unique
|
* unique since it is the binding of a namePrefix and a resource that makes them unique
|
||||||
*
|
*
|
||||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* RoleModelValidator:
|
* RoleModelValidator:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface RoleModelValidator
|
public interface RoleModelValidator
|
||||||
|
|
|
@ -40,7 +40,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* AbstractRoleManagerTest:
|
* AbstractRoleManagerTest:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
|
|
|
@ -34,7 +34,7 @@ import javax.jdo.PersistenceManagerFactory;
|
||||||
/**
|
/**
|
||||||
* RoleManagerTest:
|
* RoleManagerTest:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/jpox-spring-context.xml" } )
|
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/jpox-spring-context.xml" } )
|
||||||
|
|
|
@ -29,7 +29,7 @@ import javax.inject.Named;
|
||||||
/**
|
/**
|
||||||
* RoleManagerTest:
|
* RoleManagerTest:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
public class RoleManagerTest
|
public class RoleManagerTest
|
||||||
extends AbstractRoleManagerTest
|
extends AbstractRoleManagerTest
|
||||||
|
|
|
@ -42,7 +42,7 @@ import java.io.IOException;
|
||||||
/**
|
/**
|
||||||
* RoleProfileTest:
|
* RoleProfileTest:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
|
@ -126,7 +126,7 @@ public class RoleModelProcessorTest
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo there are other things that are not synced - role descriptions, removal of operations, etc.
|
* TODO there are other things that are not synced - role descriptions, removal of operations, etc.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testSyncPermissionsOnUpgrade()
|
public void testSyncPermissionsOnUpgrade()
|
||||||
|
|
|
@ -40,7 +40,7 @@ import java.io.File;
|
||||||
/**
|
/**
|
||||||
* RoleProfileTest:
|
* RoleProfileTest:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
|
|
|
@ -35,7 +35,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* RoleModelMergerTest:
|
* RoleModelMergerTest:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
|
|
|
@ -45,7 +45,7 @@ import javax.inject.Named;
|
||||||
/**
|
/**
|
||||||
* DefaultSecuritySystem:
|
* DefaultSecuritySystem:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
@Service( "securitySystem" )
|
@Service( "securitySystem" )
|
||||||
public class DefaultSecuritySystem
|
public class DefaultSecuritySystem
|
||||||
|
@ -80,10 +80,10 @@ public class DefaultSecuritySystem
|
||||||
* if the result is authentic then pull the user object from the user
|
* if the result is authentic then pull the user object from the user
|
||||||
* manager and add it to the session. If the result is false return the result in
|
* manager and add it to the session. If the result is false return the result in
|
||||||
* an authenticated session and a null user object.
|
* an authenticated session and a null user object.
|
||||||
* <p/>
|
*
|
||||||
* in the event of a successful authentication and a lack of corresponding user in the
|
* in the event of a successful authentication and a lack of corresponding user in the
|
||||||
* usermanager return a null user as well
|
* usermanager return a null user as well
|
||||||
* <p/>
|
*
|
||||||
* //todo should this last case create a user in the usermanager?
|
* //todo should this last case create a user in the usermanager?
|
||||||
*
|
*
|
||||||
* @param source
|
* @param source
|
||||||
|
|
|
@ -35,7 +35,7 @@ import org.apache.archiva.redback.users.UserManager;
|
||||||
/**
|
/**
|
||||||
* SecuritySystem:
|
* SecuritySystem:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*/
|
*/
|
||||||
public interface SecuritySystem
|
public interface SecuritySystem
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@ import javax.inject.Inject;
|
||||||
/**
|
/**
|
||||||
* TestAuthenticationManager:
|
* TestAuthenticationManager:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
|
|
|
@ -39,7 +39,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the User Name for this user.
|
* Gets the User Name for this user.
|
||||||
* <p/>
|
*
|
||||||
* This field is required, and should never be empty.
|
* This field is required, and should never be empty.
|
||||||
*
|
*
|
||||||
* @return the user name.
|
* @return the user name.
|
||||||
|
@ -48,7 +48,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the User Name for this user.
|
* Sets the User Name for this user.
|
||||||
* <p/>
|
*
|
||||||
* This field is required, and should never be empty.
|
* This field is required, and should never be empty.
|
||||||
*
|
*
|
||||||
* @param name the user name.
|
* @param name the user name.
|
||||||
|
@ -57,7 +57,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Full Name for this user.
|
* Gets the Full Name for this user.
|
||||||
* <p/>
|
*
|
||||||
* This field is required, and should never be empty.
|
* This field is required, and should never be empty.
|
||||||
*
|
*
|
||||||
* @return the full name.
|
* @return the full name.
|
||||||
|
@ -66,7 +66,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Full Name for this user.
|
* Sets the Full Name for this user.
|
||||||
* <p/>
|
*
|
||||||
* This field is required, and should never be empty.
|
* This field is required, and should never be empty.
|
||||||
*
|
*
|
||||||
* @param name the full name.
|
* @param name the full name.
|
||||||
|
@ -75,7 +75,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the email address for this user.
|
* Gets the email address for this user.
|
||||||
* <p/>
|
*
|
||||||
* This field is required, and should never be empty.
|
* This field is required, and should never be empty.
|
||||||
*
|
*
|
||||||
* @return the email address.
|
* @return the email address.
|
||||||
|
@ -84,7 +84,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the email address for this user.
|
* Sets the email address for this user.
|
||||||
* <p/>
|
*
|
||||||
* This field is required, and should never be empty.
|
* This field is required, and should never be empty.
|
||||||
*
|
*
|
||||||
* @param address the email address.
|
* @param address the email address.
|
||||||
|
@ -98,7 +98,7 @@ public interface User
|
||||||
/**
|
/**
|
||||||
* Gets the Raw (unencoded) Password.
|
* Gets the Raw (unencoded) Password.
|
||||||
* Used only on password change requests.
|
* Used only on password change requests.
|
||||||
* <p/>
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Notes for User Providers</b>
|
* <b>Notes for User Providers</b>
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -137,7 +137,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Encoded Password.
|
* Sets the Encoded Password.
|
||||||
* <p/>
|
*
|
||||||
* This field is populated by the {@link UserManager} process.
|
* This field is populated by the {@link UserManager} process.
|
||||||
*
|
*
|
||||||
* @param encodedPassword
|
* @param encodedPassword
|
||||||
|
@ -146,7 +146,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Date of the Last Password Change.
|
* Gets the Date of the Last Password Change.
|
||||||
* <p/>
|
*
|
||||||
* Used by password management policies to enforce password expiration rules.
|
* Used by password management policies to enforce password expiration rules.
|
||||||
*
|
*
|
||||||
* @return the date of the last password change.
|
* @return the date of the last password change.
|
||||||
|
@ -155,7 +155,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Last Password Change Date.
|
* Sets the Last Password Change Date.
|
||||||
* <p/>
|
*
|
||||||
* This field is populated by the {@link UserManager} process.
|
* This field is populated by the {@link UserManager} process.
|
||||||
*
|
*
|
||||||
* @param passwordChangeDate the date that the last password change occured.
|
* @param passwordChangeDate the date that the last password change occured.
|
||||||
|
@ -164,7 +164,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the list of previous password (in encoded format).
|
* Gets the list of previous password (in encoded format).
|
||||||
* <p/>
|
*
|
||||||
* Used by password management policies to enforce password reuse rules.
|
* Used by password management policies to enforce password reuse rules.
|
||||||
*
|
*
|
||||||
* @return the list of {@link String} objects. Represents previous passwords (in encoded format).
|
* @return the list of {@link String} objects. Represents previous passwords (in encoded format).
|
||||||
|
@ -191,14 +191,14 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the flag indicating if this user is a permanent user or not.
|
* Gets the flag indicating if this user is a permanent user or not.
|
||||||
* <p/>
|
*
|
||||||
* Usually Root / Admin / Guest users are flagged as such.
|
* Usually Root / Admin / Guest users are flagged as such.
|
||||||
*/
|
*/
|
||||||
boolean isPermanent();
|
boolean isPermanent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the permanent flag for this user.
|
* Sets the permanent flag for this user.
|
||||||
* <p/>
|
*
|
||||||
* Users such as Root / Admin / Guest are typically flagged as permanent.
|
* Users such as Root / Admin / Guest are typically flagged as permanent.
|
||||||
*
|
*
|
||||||
* @param permanent true if permanent.
|
* @param permanent true if permanent.
|
||||||
|
@ -207,7 +207,7 @@ public interface User
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if this user account is locked from use or not.
|
* Determines if this user account is locked from use or not.
|
||||||
* <p/>
|
*
|
||||||
* This state is set from an administrative point of view, or due to
|
* This state is set from an administrative point of view, or due to
|
||||||
* excessive failed login attempts.
|
* excessive failed login attempts.
|
||||||
*
|
*
|
||||||
|
|
|
@ -64,7 +64,7 @@ public interface UserManager
|
||||||
/**
|
/**
|
||||||
* Factory method to create new User Objects based on provider specific
|
* Factory method to create new User Objects based on provider specific
|
||||||
* implementation.
|
* implementation.
|
||||||
* <p/>
|
*
|
||||||
* User objects created this way do not exist in the provider's underlying
|
* User objects created this way do not exist in the provider's underlying
|
||||||
* data store until a call to {@link #addUser(User)} is made.
|
* data store until a call to {@link #addUser(User)} is made.
|
||||||
*
|
*
|
||||||
|
|
|
@ -33,7 +33,7 @@ import javax.inject.Named;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="jesse@codehaus.org"> jesse
|
* @author jesse
|
||||||
*/
|
*/
|
||||||
@Service( "userManager#configurable" )
|
@Service( "userManager#configurable" )
|
||||||
public class ConfigurableUserManager
|
public class ConfigurableUserManager
|
||||||
|
|
|
@ -49,7 +49,7 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="jesse@codehaus.org"> jesse
|
* @author jesse
|
||||||
*/
|
*/
|
||||||
@Service("userManager#ldap")
|
@Service("userManager#ldap")
|
||||||
public class LdapUserManager
|
public class LdapUserManager
|
||||||
|
|
|
@ -58,7 +58,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="jesse@codehaus.org"> jesse
|
* @author jesse
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class DefaultLdapController
|
public class DefaultLdapController
|
||||||
|
|
|
@ -29,7 +29,7 @@ import javax.inject.Named;
|
||||||
/**
|
/**
|
||||||
* DefaultLdapCacheService
|
* DefaultLdapCacheService
|
||||||
*
|
*
|
||||||
* @author: Maria Odea Ching <oching@apache.org>
|
* @author: Maria Odea Ching
|
||||||
* @version
|
* @version
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.archiva.redback.common.ldap.user.LdapUser;
|
||||||
*
|
*
|
||||||
* Service that manages the LDAP caches: LDAP connections and LDAP users
|
* Service that manages the LDAP caches: LDAP connections and LDAP users
|
||||||
*
|
*
|
||||||
* @author: Maria Odea Ching <oching@apache.org>
|
* @author: Maria Odea Ching
|
||||||
* @version
|
* @version
|
||||||
*/
|
*/
|
||||||
public interface LdapCacheService
|
public interface LdapCacheService
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author: Maria Odea Ching <oching@apache.org>
|
* @author: Maria Odea Ching
|
||||||
* @version
|
* @version
|
||||||
*/
|
*/
|
||||||
@RunWith( SpringJUnit4ClassRunner.class )
|
@RunWith( SpringJUnit4ClassRunner.class )
|
||||||
|
|
Loading…
Reference in New Issue