Class GlassFishToExousiaConverter

java.lang.Object
org.glassfish.ejb.security.application.GlassFishToExousiaConverter

public class GlassFishToExousiaConverter extends Object
  • Constructor Details

    • GlassFishToExousiaConverter

      public GlassFishToExousiaConverter()
  • Method Details

    • convertEJBMethodPermissions

      public static org.glassfish.exousia.permissions.JakartaPermissions convertEJBMethodPermissions(EjbDescriptor ejbDescriptor, String contextId) throws jakarta.security.jacc.PolicyContextException
      This method converts the deployment descriptor in two phases.

      Phase 1: gets a map representing the methodPermission elements exactly as they occured for the ejb in the dd. The map is keyed by method-permission element and each method-permission is mapped to a list of method elements representing the method elements of the method permision element. Each method element is converted to a corresponding EJBMethodPermission and added, based on its associated method-permission, to the returned JakartaPermissions instance.

      phase 2: configures additional EJBMethodPermission policy statements for the purpose of optimizing Permissions.implies matching by the policy provider. This phase also configures unchecked policy statements for any uncovered methods. This method gets the list of method descriptors for the ejb from the EjbDescriptor object. For each method descriptor, it will get a list of MethodPermission objects that signify the method permissions for the Method and convert each to a corresponding EJBMethodPermission to be added to the returned JakartaPermissions instance.

      Parameters:
      ejbDescriptor - the ejb descriptor for this EJB.
      contextId - the policy context identifier.
      Throws:
      jakarta.security.jacc.PolicyContextException
    • getSecurityRoleRefsFromBundle

      public static Map<String,List<org.glassfish.exousia.mapping.SecurityRoleRef>> getSecurityRoleRefsFromBundle(EjbDescriptor ejbDescriptor)
      Get the security role refs from the EjbDescriptor.
      Parameters:
      ejbDescriptor - the EjbDescriptor.
      Returns:
      the security role refs.