Class RoleTemplateCatalog
java.lang.Object
zeroecho.pki.server.RoleTemplateCatalog
Strict deterministic loader for versioned built-in role templates.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPersistable scoped role assignment; the template itself grants nothing.static final recordImmutable role template that has no authority until scoped assignment. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioninstantiate(RoleTemplateCatalog.Assignment assignment) Expands one enabled scoped assignment to explicit immutable grants.static RoleTemplateCatalogload(ClassLoader loader) Loads the built-in strict resource through the supplied class loader.static RoleTemplateCatalogparse(byte[] encoded) Parses one complete strict versioned resource.Resolves one exact template.Returns the built-in templates.
-
Field Details
-
RESOURCE
Classpath resource holding the normative role templates.- See Also:
-
-
Method Details
-
load
Loads the built-in strict resource through the supplied class loader.- Parameters:
loader- class loader owning server resources- Returns:
- immutable deterministic catalog
-
parse
Parses one complete strict versioned resource.- Parameters:
encoded- bounded UTF-8 JSON document- Returns:
- immutable deterministic catalog
-
templates
Returns the built-in templates.- Returns:
- immutable templates ordered by stable ID
-
require
Resolves one exact template.- Parameters:
templateId- stable template identifierversion- exact positive template version- Returns:
- matching immutable template
-
instantiate
Expands one enabled scoped assignment to explicit immutable grants.- Parameters:
assignment- persisted assignment- Returns:
- deterministic finite grants, or an empty list when disabled
-