How usnistgov/policy-machine-core works
Policy Machine Core is a Java NGAC policy administration and decision library, with in-memory and optional embedded Neo4j storage plus a separate gRPC client artifact. The documented workflow is to administer and query policy through a PAP, optionally put a PDP in front of administrative operations for access checks, then connect an EPP to observe PDP events and process policy obligations. PML provides a policy-definition and execution path. Some subsystem connections are documented only at package level; unsampled implementation details are not inferred.
Main entry points: PAP.java PAP API · PMLCompiler.java PML compiler · ExecutionContext.java PML execution · EPP.java Event Processing Point
Components 18
Policy services
- PAP API
core/src/main/java/gov/nist/ngac/pm/core/pap/PAP.java - Policy model
core/src/main/java/gov/nist/ngac/pm/core/common/graph/node/Node.java - Policy queries
core/src/main/java/gov/nist/ngac/pm/core/pap/query/AccessQuery.java - PDP adjudication
core/src/main/java/gov/nist/ngac/pm/core/pdp/adjudication/Adjudicator.java - Query adjudicators
core/src/main/java/gov/nist/ngac/pm/core/pdp/query/GraphQueryAdjudicator.java
Policy language
- PML compiler
core/src/main/java/gov/nist/ngac/pm/core/pap/pml/PMLCompiler.java - PML execution
core/src/main/java/gov/nist/ngac/pm/core/pap/pml/context/ExecutionContext.java - PML operations
core/src/main/java/gov/nist/ngac/pm/core/pap/pml/operation/query/PMLStmtsQueryOperation.java
Policy storage
- Memory PAP
core/src/main/java/gov/nist/ngac/pm/core/impl/memory/pap/MemoryPAP.java - Memory stores
core/src/main/java/gov/nist/ngac/pm/core/impl/memory/pap/store/MemoryStore.java - Neo4j PAP
neo4j/src/main/java/gov/nist/ngac/pm/core/neo4j/embedded/pap/Neo4jEmbeddedPAP.java - Neo4j stores
neo4j/src/main/java/gov/nist/ngac/pm/core/neo4j/embedded/pap/store/Neo4jEmbeddedGraphStore.java
Events and remote access
- Event Processing Point
core/src/main/java/gov/nist/ngac/pm/core/epp/EPP.java - Obligation rules
core/src/main/java/gov/nist/ngac/pm/core/pap/obligation/Obligation.java - gRPC client
grpc/src/main/java/gov/nist/ngac/pm/core/grpc/client/GrpcQueryPDP.java - gRPC resource adjudication
grpc/src/main/java/gov/nist/ngac/pm/core/grpc/client/GrpcResourceAdjudicationService.java
Other components
- Policy administrator
- PDP event source
Connections 20
- Policy administrator → PAP API: administers policy
README.md - Policy administrator → PML compiler: defines policy
README.md - PAP API → Policy model: modifies policy
README.md - PAP API → Policy queries: queries policy
core/src/main/java/gov/nist/ngac/pm/core/pap/PAP.java - PAP API → PML compiler: compiles PML
core/src/main/java/gov/nist/ngac/pm/core/pap/PAP.java - PML compiler → PML execution: produces statements
- PAP API → PML execution: executes statements
core/src/main/java/gov/nist/ngac/pm/core/pap/PAP.java - PML execution → PML operations: runs operations
core/src/main/java/gov/nist/ngac/pm/core/pap/pml/operation/query/PMLStmtsQueryOperation.java - PAP API → PDP adjudication: access-checks admin
README.md - PDP adjudication → Query adjudicators: adjudicates queries
core/src/main/java/gov/nist/ngac/pm/core/pdp/query/GraphQueryAdjudicator.java - Query adjudicators → PAP API: queries policy
core/src/main/java/gov/nist/ngac/pm/core/pdp/query/GraphQueryAdjudicator.java - PAP API → Memory PAP: uses implementation
README.md - Memory PAP → Memory stores: stores policy
- PAP API → Neo4j PAP: uses implementation
README.md - Neo4j PAP → Neo4j stores: stores policy
- PAP API → Obligation rules: defines obligations
README.md - PAP API → Event Processing Point: provides obligations
README.md - PDP event source → Event Processing Point: publishes events
README.md - Event Processing Point → Obligation rules: processes obligations
README.md - gRPC client → gRPC resource adjudication: supports adjudication