oracle.dbtools.plugin.api.security.annotations

## Annotation Type Privilege

-     @Retention(value=RUNTIME)
       @Target(value=PACKAGE)
       @Documented
       @PackageQualified
      public @interface Privilege

  Defines a logical security `Privilege`, that a caller must have in order to access a resource. A caller is deemed to have a `Privilege` IFF they have at least one of the roles enumerated by the `roles()` property. A `Privilege` must be defined at the package level in `package-info.java`. If more than one `Privilege` is to be defined per package then wrapper it in a `Security` annotation. If a `Privilege` must be defined dynamically (i.e. at run-time), rather than statically via a package annotation, then implement a `HasPrivileges` provider that can map privilege names to `Privilege` instances.
  Author:
    cdivilly

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String` | `name` The unique name/identifier of the Privilege

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String[]` | `roles` To access the resource, the caller must have at least one of the specified roles

- - ### Element Detail

    - #### name

          public abstract String name

      The unique name/identifier of the Privilege
      Returns:
        privilege name

  - - #### roles

          public abstract String[] roles

      To access the resource, the caller must have at least one of the specified roles
      Returns:
        required roles
      Default:
        {}

Copyright © 2010, 2022, Oracle and/or its affiliates.