Stage 6 — Build IA Node Components
How to complete this stage
Build the Java components that together form the IA node runtime. Open a terminal for this stage. You can reuse it for later stages.
Approach and rationale
The Secure Agent Graph does not run as a single standalone binary. It depends on several internal libraries for:
- Security and policy evaluation
- JWT validation
- GraphQL support
- Optional Kafka integration
These components must be built locally so they are available on the classpath when the IA node starts. If this stage fails, later startup errors will typically trace back to missing dependencies.
6.1 Prepare your working directory
Change to your working directory where you are cloning and building IA components:
GPG configuration
GPG keys are required to sign files during the build process.
Set the GPG_TTY environment variable. This is required by the gpg-agent daemon and prevents build failures for rdf-abac.
If this variable is not set, you may encounter:
6.2 Build policy and security libraries
These components provide:
- The ABAC policy engine
- JWT validation components
git clone https://github.com/National-Digital-Twin/rdf-abac
cd rdf-abac
mvn clean install -DskipTests
cd ..
git clone https://github.com/National-Digital-Twin/jwt-servlet-auth
cd jwt-servlet-auth
mvn clean install -DskipTests
cd ..
6.3 Build shared IA libraries
These libraries provide common functionality used across IA components. Secure Agent Graph depends on these shared libraries at runtime.
git clone https://github.com/National-Digital-Twin/secure-agents-lib.git
cd secure-agents-lib
mvn clean install -DskipTests
cd ..
6.4 Build optional integration components
These components enable:
- Event-driven RDF ingestion via Kafka
- GraphQL access to RDF data
- Externalised Fuseki configuration
Even if you do not plan to use Kafka, building these ensures the node can start in all supported modes.
git clone https://github.com/National-Digital-Twin/jena-fuseki-kafka
cd jena-fuseki-kafka
mvn clean install -DskipTests
cd ..
git clone https://github.com/National-Digital-Twin/graphql-jena
cd graphql-jena
mvn clean install -Dmaven.javadoc.skip=true
cd ..
git clone https://github.com/National-Digital-Twin/fuseki-yaml-config
cd fuseki-yaml-config
mvn clean install -DskipTests
cd ..
6.5 Build Secure Agent Graph
This is the main IA node runtime.
git clone https://github.com/National-Digital-Twin/secure-agent-graph.git
cd secure-agent-graph
mvn clean install -DskipTests
This step:
- Builds the graph runtime
- Resolves and bundles all required dependencies
- Creates the classpath used to start the node
Operational notes
- Ensure Docker is running before building components that include container-based tooling.
- If Maven reports authentication or dependency errors, re-check Stage 1 (GitHub Packages credentials).
- If Secure Agent Graph later fails with ClassNotFoundException, re-run this stage and confirm dependencies were installed correctly.
6.6 Checkpoint
At the end of this stage:
- All repositories build successfully.
- No Maven dependency resolution errors occur.
- The directory:
secure-agent-graph/sag-docker/target/dependency/
exists and contains JAR files. If this checkpoint fails, do not continue. Most startup errors in later stages trace back to incomplete builds in this stage.