Annotation Interface Secure


@Retention(RUNTIME) @Qualifier @Inherited @Target(TYPE) public @interface Secure
Qualifier used to enable a security check at the point of service injection or lookup. Security Services, which are to protected against unqualified injection/look-up, should be annotated as something below e.g., @Secure(accessPermissionName = "security/service/invalid input: '<'service-type>/invalid input: '<'some-specific-name>") Any caller which injects or looks up the protected security service, the caller's jar/class should be granted the following policy e.g., grant codeBase "file://invalid input: '<'caller-jar>" { permission org.glassfish.security.services.common.SecureServiceAccessPermission "security/service/invalid input: '<'service-type>/invalid input: '<'some-specific-name>"; };
  • Field Details

  • Element Details

    • accessPermissionName

      @Metadata("accessPermissionName") String accessPermissionName
      the permission name to be protected if the accessPermissionName is not specified, a default value of "security/service/default" is used.
      Returns:
      name of the protected HK2 service