Repository navigation
feat(ssi-auth): integrate Eclipse EDC IdentityHub as delegated wallet backend - #4
Merged
Merged
Conversation
added 5 commits
September 9, 2026 22:46
…d update identity hub test suite
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.
Summary
This PR integrates Eclipse EDC IdentityHub as a delegated wallet backend for Alexandria alongside Fafnir, adopting hexagonal architecture principles, rich key management (PEM and JWK), DID lifecycle management, Verifiable Credential storage & querying, DCP issuance requests, participant context administration, and structured error propagation.
Key Changes
1. Hexagonal Architecture Alignment
wallet.Wallet): Extended the secondary port interface to declare capabilities for extended key management, DID publishing/unpublishing, service endpoints, credential containers, DCP requests, and participant context administration.identityhub/):Adapterand low-levelEdcClient(edc_client.go) adhering to hexagonal naming conventions.normalize.gowith robust type parsing and safe JSON serialization.fafnir/):client.gotoadapter.gofor architectural consistency.common.ErrNotImplementedInFafnir.rest/):wallet_router.goand wire DTOs inwallet_dto.go.2. Key Pair Operations
JsonWebKey2020/Ed25519) inPOST /api/v1/ssi-auth/wallet/keys.POST /api/v1/ssi-auth/wallet/keys/:id/rotate) with configurable overlap duration.POST /api/v1/ssi-auth/wallet/keys/:id/revoke).GET /api/v1/ssi-auth/wallet/keys(excluded unused.usagefield).3. DID Lifecycle & Service Endpoints
POST /api/v1/ssi-auth/wallet/did: Registration.GET /api/v1/ssi-auth/wallet/did/:id/state: Query state (PUBLISHED,UNPUBLISHED).POST /api/v1/ssi-auth/wallet/did/:id/publish: Publish DID (reactivating participant context if needed).POST /api/v1/ssi-auth/wallet/did/:id/unpublish: Unpublish DID (deactivating participant context as required by IdentityHub).DELETE /api/v1/ssi-auth/wallet/did/:id: Delete DID after unpublishing.POST /api/v1/ssi-auth/wallet/did/:id/endpoints: Add service endpoint.DELETE /api/v1/ssi-auth/wallet/did/:id/endpoints/:endpoint_id: Remove service endpoint via query param (?serviceId=).4. Verifiable Credentials & DCP Requests
POST /api/v1/ssi-auth/wallet/credential: Supports bothverifiableCredentialContainerand flat format, automatically building minimal W3C credential JSON when omitted.GET /api/v1/ssi-auth/wallet/vcs: Fixed response serialization for raw JWT strings; safely normalizes and outputs complete credential payloads.GET /api/v1/ssi-auth/wallet/vcs?type=:type: Filtering by credential type.DELETE /api/v1/ssi-auth/wallet/credential/:id: Deletes stored credential.POST /api/v1/ssi-auth/wallet/dcp/request: SupportsissuerDidandcredentialsdescriptors, with fallback extraction ofrequestIdfrom the HTTPLocationheader.GET /api/v1/ssi-auth/wallet/dcp/request/:id: Query DCP request status.5. Participant Context Management
POST /api/v1/ssi-auth/wallet/participants: Create participant contexts with optionalkeyDescriptor(defaults to EdDSA/Ed25519).GET /api/v1/ssi-auth/wallet/participants/:id: Query participant context.POST /api/v1/ssi-auth/wallet/participants/:id/state: Activate/deactivate participant context.POST /api/v1/ssi-auth/wallet/participants/:id/token: Regenerate API key token and update the in-memory client immediately.PUT /api/v1/ssi-auth/wallet/participants/:id/token: Hot-update participant API token in memory.6. Configuration, Documentation & Postman
config/config-ih.yamlfor local development against IdentityHub.docs/adr/0002-identityhub-integration-data-models-mutation-queries-and-structured-errors.md.postman/collections/Ssi-auth/IdentityHub/.Verification
task fmt: All Go files formatted withgofumpt.task lint: 0 issues withgolangci-lint.task test: 100% unit tests passing across all packages (cmd,internal/...).task test:integration:identityhub: Live integration tests passing against running IdentityHub container.