Interface AccessDb<G extends Group>

    • Method Detail

      • loadGroup

        G loadGroup​(String id)
             throws IamSvcException
        Get a group by its identifier.
        Parameters:
        id - the group's ID
        Returns:
        a group, or null if it does not exist
        Throws:
        IamSvcException - if there's a problem in the IAM service
      • getAclFor

        AccessControlList getAclFor​(Resource resource)
                             throws IamSvcException
        load an ACL for a resource
        Parameters:
        resource - the resource for which you want the ACL
        Returns:
        an ACL, or null if there is none
        Throws:
        IamSvcException - if there's a problem in the IAM service
      • canUser

        boolean canUser​(String id,
                        Resource resource,
                        String operation)
                 throws IamSvcException
        Can the given user perform the requested access?
        Parameters:
        id - the identity/subject making the request
        resource - the resource on which access is requested
        operation - the operation
        Returns:
        true if the user is allowed to perform the operation, false otherwise
        Throws:
        IamSvcException - if there's a problem in the IAM service