Interface Authorizer

  • All Known Implementing Classes:
    GenericAuthorizer

    public interface Authorizer
    The Authorizer verifies a connected user has the authorization to perform a requested database operation using the current connection.

    Today no object based authorization is supported.

    • Method Detail

      • authorize

        void authorize​(int operation)
                throws StandardException
        Verify the connected user is authorized to perform the requested operation. This variation should only be used with operations that do not use tables or routines. If the operation involves tables or routines then use the variation of the authorize method that takes an Activation parameter. The activation holds the table, column, and routine lists.
        Parameters:
        operation - the enumeration code for the requsted operation.
        Throws:
        StandardException - Thrown if the operation is not allowed
      • authorize

        void authorize​(Activation activation,
                       int operation)
                throws StandardException
        Verify the connected user is authorized to perform the requested operation.
        Parameters:
        activation - holds the list of tables, columns, and routines used.
        operation - the enumeration code for the requsted operation.
        Throws:
        StandardException - Thrown if the operation is not allowed
      • authorize

        void authorize​(java.util.List<StatementPermission> requiredPermissionsList,
                       Activation activation)
                throws StandardException
        Verify the connected user possesses the indicated permissions
        Parameters:
        requiredPermissionsList - the required permissions
        activation - holds the execution logic
        Throws:
        StandardException - Thrown if the operation is not allowed
      • isReadOnlyConnection

        boolean isReadOnlyConnection()
        Get the readOnly status for this authorizer's connection.
      • setReadOnlyConnection

        void setReadOnlyConnection​(boolean on,
                                   boolean authorize)
                            throws StandardException
        Set the readOnly status for this authorizer's connection.
        Parameters:
        on - true means set the connection to read only mode, false means set the connection to read wrte mode.
        authorize - true means to verify the caller has authority to set the connection and false means do not check.
        Throws:
        StandardException - Oops not allowed.