Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4F2EC200B9E for ; Sat, 8 Oct 2016 14:44:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4DB1C160AD1; Sat, 8 Oct 2016 12:44:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3B215160ADF for ; Sat, 8 Oct 2016 14:44:23 +0200 (CEST) Received: (qmail 99496 invoked by uid 500); 8 Oct 2016 12:44:21 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 99487 invoked by uid 99); 8 Oct 2016 12:44:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Oct 2016 12:44:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7CB72DFE65; Sat, 8 Oct 2016 12:44:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smckinney@apache.org To: commits@directory.apache.org Message-Id: <52525916b7b547c5adcae0ec546239f9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: directory-fortress-enmasse git commit: FC-189 - add GroupMgrRestImpl - javadoc Date: Sat, 8 Oct 2016 12:44:21 +0000 (UTC) archived-at: Sat, 08 Oct 2016 12:44:24 -0000 Repository: directory-fortress-enmasse Updated Branches: refs/heads/master 2baf0e371 -> f40e31940 FC-189 - add GroupMgrRestImpl - javadoc Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/repo Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/commit/f40e3194 Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/tree/f40e3194 Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/diff/f40e3194 Branch: refs/heads/master Commit: f40e31940cea25a97195898bac9d90dfc530b299 Parents: 2baf0e3 Author: Shawn McKinney Authored: Sat Oct 8 07:44:18 2016 -0500 Committer: Shawn McKinney Committed: Sat Oct 8 07:44:18 2016 -0500 ---------------------------------------------------------------------- .../fortress/rest/FortressService.java | 152 ++++++++++++++++++- 1 file changed, 150 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/blob/f40e3194/src/main/java/org/apache/directory/fortress/rest/FortressService.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/directory/fortress/rest/FortressService.java b/src/main/java/org/apache/directory/fortress/rest/FortressService.java index b005fa7..8e9927f 100644 --- a/src/main/java/org/apache/directory/fortress/rest/FortressService.java +++ b/src/main/java/org/apache/directory/fortress/rest/FortressService.java @@ -6903,13 +6903,161 @@ public interface FortressService */ FortResponse deassignGroup(FortRequest request); + /** + * This method adds a roleConstraint (ftRC) to the user ldap entry. (ftRC=ROLE_NAME$type$CONSTRAINT_TYPE$CONSTRAINT_PASETNAME$CONSTRAINT_VALUE) + *

required parameters

+ *
    + *
  • {@link UserRole#name} - contains the name for already existing Role to be assigned
  • + *
  • {@link UserRole#userId} - contains the userId for existing User
  • + *
  • {@link org.apache.directory.fortress.core.model.RoleConstraint#type} - contains the type of role constraint (filter, other)
  • + *
  • {@link org.apache.directory.fortress.core.model.RoleConstraint#value} - contains the value of the role constraint which is currently not validated in any way
  • + *
  • {@link org.apache.directory.fortress.core.model.RoleConstraint#paSetName} - contains the userId for existing User, contains the name of the permission attribute set this constraint is applicable for
  • + *
+ * + * @param uRole must contain {@link UserRole#userId} and {@link UserRole#name} + * @param roleConstraint must contain {@link org.apache.directory.fortress.core.model.RoleConstraint#type} and {@link org.apache.directory.fortress.core.model.RoleConstraint#value} and {@link org.apache.directory.fortress.core.model.RoleConstraint#paSetName} + * @return RoleConstraint that was added to user role assignment + * @throws SecurityException in the event of validation or system error. + */ FortResponse addRoleConstraint( FortRequest request ); + + /** + * Thie method removes a roleConstraint (ftRC) from the user ldap entry. + *

required parameters

+ *
    + *
  • {@link UserRole#name} - contains the name for already existing Role to be assigned
  • + *
  • {@link UserRole#userId} - contains the userId for existing User
  • + *
  • {@link org.apache.directory.fortress.core.model.RoleConstraint#type} - contains the type of role constraint (filter, other)
  • + *
  • {@link org.apache.directory.fortress.core.model.RoleConstraint#value} - contains the value of the role constraint which is currently not validated in any way
  • + *
  • {@link org.apache.directory.fortress.core.model.RoleConstraint#paSetName} - contains the userId for existing User, contains the name of the permission attribute set this constraint is applicable for
  • + *
+ * + * @param uRole must contain {@link UserRole#userId} and {@link UserRole#name} + * @param roleConstraint must contain {@link org.apache.directory.fortress.core.model.RoleConstraint#type} and {@link org.apache.directory.fortress.core.model.RoleConstraint#value} and {@link org.apache.directory.fortress.core.model.RoleConstraint#paSetName} + * @throws SecurityException in the event of validation or system error. + */ FortResponse removeRoleConstraint( FortRequest request ); + + /** + * This method will create a new permission attribute set object with resides under the + * {@code ou=Constraints,ou=RBAC,dc=yourHostName,dc=com} container in directory information tree. + * The attribute set may contain 0 to many {@link org.apache.directory.fortress.core.model.PermissionAttribute} + *

required parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttributeSet#name} - contains the name of the permission attribute set
  • + *
+ * + * @param permAttributeSet must contain {@link org.apache.directory.fortress.core.model.PermissionAttributeSet#name} + * @return PermissionAttributeSet that was created + * @throws SecurityException - thrown in the event of perm attribute set data or system error. + */ + FortResponse addPermissionAttributeSet( FortRequest request ); + + /** + * This method will delete a permission attribute set object. + *

required parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttributeSet#name} - contains the name of the permission attribute set
  • + *
+ * + * @param permAttributeSet must contain {@link org.apache.directory.fortress.core.model.PermissionAttributeSet#name} + * @throws SecurityException - thrown in the event of perm attribute set data or system error. + */ + FortResponse deletePermissionAttributeSet( FortRequest request ); + + /** + * This method adds a permission attribute (ftPA) to a permission attribute set. + *

+ *

required parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#attributeName} - contains the name of existing object being targeted for the permission update
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#dataType} - contains the data type of the permission attribute values (string,int,long,float)
  • + *
  • attributeSetName - contains the name of existing permission attribute set being modified
  • + *
+ *

optional parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#required} - Flag to specify this attribute is required, defaults to false.
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#operator} - Can specify an operator this attribute must use.
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#validValues} - CSV of valid values. Currently up to interpreting application to understand these.
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#defaultValue} - A default value for the attribute value if none is specified.
  • + *
+ * + * @param permAttribute must contain {@link org.apache.directory.fortress.core.model.PermissionAttribute#attributeName} and {@link org.apache.directory.fortress.core.model.PermissionAttribute#dataType} + * @param attributeSetName The name of the permission attribute set this ftPA should be added. + * @return PermissionAttribute entity created + * @throws SecurityException - thrown in the event of data or system error + */ FortResponse addPermissionAttributeToSet( FortRequest request ); + + /** + * This method updates a permission attribute (ftPA) on a permission attribute set. + *

+ *

required parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#attributeName} - contains the name of existing object being targeted for the permission update
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#dataType} - contains the data type of the permission attribute values (string,int,long,float)
  • + *
  • attributeSetName - contains the name of existing permission attribute set being modified
  • + *
+ *

optional parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#required} - Flag to specify this attribute is required, defaults to false.
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#operator} - Can specify an operator this attribute must use.
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#validValues} - CSV of valid values. Currently up to interpreting application to understand these.
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#defaultValue} - A default value for the attribute value if none is specified.
  • + *
+ * + * @param permAttribute must contain {@link org.apache.directory.fortress.core.model.PermissionAttribute#attributeName} and {@link org.apache.directory.fortress.core.model.PermissionAttribute#dataType} + * @param attributeSetName The name of the permission attribute set this ftPA should be updated. + * @return PermissionAttribute entity created + * @throws SecurityException - thrown in the event of data or system error + */ FortResponse updatePermissionAttributeInSet( FortRequest request ); + + /** + * This method removed a permission attribute (ftPA) from an existing permission attribute set. + *

+ *

required parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttribute#attributeName} - contains the name of existing object being targeted for the permission update
  • + *
  • attributeSetName - contains the name of existing permission attribute set being modified
  • + *
+ * + * @param permAttribute must contain {@link org.apache.directory.fortress.core.model.PermissionAttribute#attributeName} + * @param attributeSetName The name of the permission attribute set this pa should be removed from + * @throws SecurityException - thrown in the event of data or system error + */ FortResponse removePermissionAttributeFromSet( FortRequest request ); - FortResponse addPermissionAttributeSet( FortRequest request ); - FortResponse deletePermissionAttributeSet( FortRequest request ); + + /** + * Find all of the role constraints for the given user and permission attribute set. + *

+ *

required parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.User#userId} - contains the name of existing user being targeted
  • + *
  • {@link org.apache.directory.fortress.core.model.PermissionAttributeSet#name} - contains the name of permission attribute set
  • + *
+ * + * @param user The user to filter role constraints + * @param permission Contains the permission attribute set to filter role constraints + * @return List of the Role Constraints for the given user and pa set. + * @throws SecurityException in the event of data or system error. + */ FortResponse findRoleConstraints( FortRequest request ); + + /** + * This function returns all the permission attribute set (which contain 0 to many permission attributes) + * for a given role. The function is valid if and only if the role is a member of the ROLES data + * set. + * *

+ *

required parameters

+ *
    + *
  • {@link org.apache.directory.fortress.core.model.Role#name} - contains the name to use for the Role targeted for search.
  • + *
+ * + * @param role contains role name, {@link org.apache.directory.fortress.core.model.Role#name} of Role entity Permission is granted to. + * @param noInheritance if true will NOT include inherited roles in the search. + * @return List of type PermissionAttributeSet that contains all Permission Attribute valid for the role. + * @throws SecurityException In the event system error occurs. + */ FortResponse readPermAttributeSet( FortRequest request ); } \ No newline at end of file