Interface IUserAccessController

  • All Known Implementing Classes:
    UserAccessController

    public interface IUserAccessController
    Interface for checking user access permissions for editing certificates, keystores etc.
    Since:
    8.5.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • hasCertificatePermission

        boolean hasCertificatePermission​(CertificateEntity certificate,
                                         AuthenticatedUser user,
                                         PermissionAction action)
        Checks if the user has permission to perform the specified action on the given certificate entity.
        Parameters:
        certificate - The certificate entity to check
        user - The user requesting access.
        action - The action to check permission for.
        Returns:
        true if permitted, false otherwise.
      • hasCertificateSettingsPermission

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

        boolean hasKeyPairPermission​(KeyPairEntity keyPair,
                                     AuthenticatedUser user,
                                     PermissionAction action)
        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.

        Parameters:
        user - The user requesting access.
        keyPair - The key pair entity to check.
        action - The action to check permission for.
        Returns:
        true if permitted, false otherwise.
      • hasKeyStorePermission

        boolean hasKeyStorePermission​(KeyStoreEntity keyStore,
                                      AuthenticatedUser user,
                                      PermissionAction action)
        Checks if the user has permission to perform the specified action on the given keystore entity.
        Parameters:
        keyStore - The keystore entity to check.
        user - The user requesting access.
        action - The action to check permission for.
        Returns:
        true if permitted, false otherwise.