Class GlassFishToExousiaConverter
- java.lang.Object
-
- org.glassfish.ejb.security.application.GlassFishToExousiaConverter
-
public class GlassFishToExousiaConverter extends Object
-
-
Constructor Summary
Constructors Constructor Description GlassFishToExousiaConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.glassfish.exousia.permissions.JakartaPermissionsconvertEJBMethodPermissions(EjbDescriptor ejbDescriptor, String contextId)This method converts the deployment descriptor in two phases.static Map<String,List<org.glassfish.exousia.mapping.SecurityRoleRef>>getSecurityRoleRefsFromBundle(EjbDescriptor ejbDescriptor)Get the security role refs from the EjbDescriptor.
-
-
-
Method Detail
-
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.pcid- , 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.
-
-