Class UserAccessController

  • All Implemented Interfaces:
    IUserAccessController

    @ApplicationScoped
    public class UserAccessController
    extends Object
    implements IUserAccessController
    This class is responsible for checking user access permissions for editing certificates, keystores etc.
    Since:
    8.5.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • hasCertificateSettingsPermission

        public boolean hasCertificateSettingsPermission​(AuthenticatedUser user,
                                                        PermissionAction permissionAction)
        Description copied from interface: IUserAccessController
        Checks if the user has permission to perform the specified action on the general certificate settings.
        Specified by:
        hasCertificateSettingsPermission in interface IUserAccessController
        Parameters:
        user - The user requesting access.
        permissionAction - The action to check permission for.
        Returns:
        true if permitted, false otherwise.
      • hasKeyPairPermission

        public boolean hasKeyPairPermission​(KeyPairEntity keyPair,
                                            AuthenticatedUser user,
                                            PermissionAction action)
        Description copied from interface: IUserAccessController
        Checks if the user has permission to perform the specified action on the given key pair entity. Since the key pair contains both public and private keys, this method is primarily intended for checking permissions related to private key access, which may have additional restrictions based on the keystore's configuration and the user's permissions.

        PermissionAction.READ and PermissionAction.USE are gated differently: reading requires the certificate permission of the keystore's scope, using requires membership in one of the user groups the keystore grants private key access to. A user group membership therefore never allows reading or exporting a private key, and a certificate permission never allows using one.

        Specified by:
        hasKeyPairPermission in interface IUserAccessController
        Parameters:
        keyPair - The key pair entity to check.
        user - The user requesting access.
        action - The action to check permission for.
        Returns:
        true if permitted, false otherwise.