Class PolicyToScopeMapper


  • @Singleton
    public class PolicyToScopeMapper
    extends Object
    • Field Detail

      • GLUU_FLEX_ADMINUI_RESOURCES_FEATURES

        public static final String GLUU_FLEX_ADMINUI_RESOURCES_FEATURES
        See Also:
        Constant Field Values
    • Constructor Detail

      • PolicyToScopeMapper

        public PolicyToScopeMapper()
    • Method Detail

      • processZipFile

        public Map<String,​Set<String>> processZipFile​(ZipFile zipFile,
                                                            com.fasterxml.jackson.databind.JsonNode resourcesJson)
        Generate a mapping from role names to their aggregated scopes by processing a policy-store ZIP and a resources JSON.
        Parameters:
        zipFile - the ZIP file containing policies (policies/*.cedar|*.cedarpl) and entity definitions (entities/*.json)
        resourcesJson - JSON structure that maps resources and access types to scope lists (used to build the scope mapping cache)
        Returns:
        a map where each key is a role name and the value is the set of resolved scope strings for that role