Modular overlay architecture for SPIRE integration#193
Merged
ramkri123 merged 6 commits intolfedgeai:mainfrom Feb 9, 2026
Merged
Modular overlay architecture for SPIRE integration#193ramkri123 merged 6 commits intolfedgeai:mainfrom
ramkri123 merged 6 commits intolfedgeai:mainfrom
Conversation
Introduces patch-based overlay architecture for SPIRE integration: - proto-patches/ - Protocol buffer extensions with optional Aegis fields - core-patches/ - Core SPIRE modifications for attestation flow - plugins/ - Custom plugins (TPM DevID, Keylime, policy engine) - packages/ - Shared utilities and caching System applies modifications to upstream SPIRE v1.10.3 at build time rather than maintaining a full fork. Enables tracking only 50 overlay files instead of 17,315 fork files.
Automated tooling for overlay system: - spire-build.sh - Clone upstream SPIRE + apply overlay patches - spire-dev-setup.sh - Create on-demand development environment - spire-dev-extract.sh - Extract changes back to patches - spire-dev-cleanup.sh - Remove temporary development fork Developer and testing documentation: - SPIRE_DEV_WORKFLOW.md (237 lines) - Development workflow guide - TPM_TESTING_CHECKLIST.md (247 lines) - Hardware validation procedures Enables full IDE support during development while maintaining clean repository (50 files) in version control.
Eliminates 17,315-file SPIRE fork from hybrid-cloud-poc/spire/. Fork code now cloned and patched at build time via overlay system instead of being tracked in version control. This reduces maintenance overhead while preserving all functionality through the overlay architecture. Repository metrics: - Files tracked: 17,315 → 50 (overlay files only) - Code changes: -275K deletions, +44K additions (net -231K lines) - Git operations: ~50x faster (clone, status, diff)
6f99f17 to
8ba9d7e
Compare
…laims conversion - Updated plugin.go to convert Keylime AttestedClaims to proto types including ZKP fields - Added sovereignty_receipt string field mapping - Added MNOEndorsement conversion with JSON marshaling - Fixed claims.go to use direct field access (not pointers) for proto3 fields - Updated context.go to use AttestedClaims type - Enables end-to-end ZKP receipt flow: Keylime → SPIRE → SVID bundle
8ba9d7e to
3e92e1a
Compare
- Replace direct spire fork build with scripts/spire-build.sh - Create backward-compatible symlinks for test scripts - Fixes build failure after SPIRE fork removal in commit 14fcc76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces an overlay architecture for SPIRE integration with sovereign attestation capabilities, eliminating the need to maintain a full SPIRE fork. The architecture provides clear separation between upstream dependencies and custom extensions while adding support for hardware-based zero-knowledge proofs and mobile network operator endorsements.
Impact: Repository now tracks only 50 overlay files instead of maintaining a 17,315-file SPIRE fork, with added sovereign attestation features.
Architecture Overview
Implements a patch-based overlay architecture that applies custom modifications to upstream SPIRE at build time:
Components:
Proto Extensions: Custom protocol buffer definitions for sovereign attestation:
AegisSovereignAttestation- TPM-based attestation packageAegisAttestedClaims- Keylime claims with ZKP supportGeolocation- Mobile/GNSS sensor dataMNOEndorsement- Mobile network operator endorsementsoptionalfor proto3 flexibilityCore Patches: Attestation flow modifications for hardware-based trust and sovereign attestation
Plugin System:
Automated Tooling: Clone → patch → build automation with version pinning
Structure:
spire-overlay/
├── proto-patches/ # Protocol buffer extensions
│ └── files/spire-api-sdk/spire/api/types/sovereignattestation.proto
├── core-patches/ # Patch files for SPIRE core
├── plugins/ # Custom plugin implementations
│ ├── server-credentialcomposer-unifiedidentity/ # Keylime integration
│ └── server-unifiedidentity/ # Claims embedding
├── packages/ # Shared utilities and caching
└── README.md # System documentation
scripts/
├── spire-build.sh # Automated build orchestration
├── spire-dev-setup.sh # Development environment generator
├── spire-dev-extract.sh # Patch extraction tool
└── spire-dev-cleanup.sh # Environment cleanup utility
Sovereign Attestation Features
ZKP (Zero-Knowledge Proof) Support
Geolocation(11 fields: sensor ID, IMEI, IMSI, lat/long, accuracy, signature)MNOEndorsement(verified flag, JSON payload, signature, key ID)SovereigntyReceipt(ZKP proof string)Proto Naming Strategy
Parent messages use Aegis prefix to prevent upstream conflicts:
message AegisSovereignAttestation✅message AegisAttestedClaims✅Child messages without prefix (project-specific nested structures):
message Geolocation✅message MNOEndorsement✅Rationale: When SPIRE upstream adds similar top-level types, Aegis prefix prevents naming collisions during merge.
Development Workflow
On-demand development environment:
Enables full IDE capabilities during development while maintaining clean repository state.
Testing & Validation
Hardware Testing:
Test Coverage:
Performance & Maintainability
Repository Metrics:
Maintainability:
Documentation
docs/SPIRE_DEV_WORKFLOW.md(237 lines) - Developer workflow guidedocs/TPM_TESTING_CHECKLIST.md(247 lines) - Hardware validation proceduresspire-overlay/README.md(176 lines) - Architecture overviewspire-overlay/proto-patches/README.md- Proto patch mechanismEach includes examples, troubleshooting, and best practices.
Type of Change
Checklist:
Commit Structure
This architecture reduces maintenance overhead, improves git performance, adds sovereign attestation capabilities (TPM + ZKP + MNO endorsements), and provides a sustainable approach to integrating custom functionality with upstream dependencies.