Integrate Credo (credo-ts) as SSI/VC foundation for real SD-JWT VC employee credential issuance#23
Open
Integrate Credo (credo-ts) as SSI/VC foundation for real SD-JWT VC employee credential issuance#23
Conversation
…dential issuance Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create issues for requirements FR-0010, FR-0011, and TR-0009
Integrate Credo (credo-ts) as SSI/VC foundation for real SD-JWT VC employee credential issuance
Feb 22, 2026
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.
Replaces the unsigned stub credential implementation with cryptographically-signed SD-JWT VCs using Credo (credo-ts) as the SSI framework foundation, addressing FR-0010, FR-0011, and TR-0009.
New modules
src/agent/CredoAgent.ts— Singleton Credo agent lifecycle. On startup: creates a P-256 key viaNodeKeyManagementService, registers adid:jwkissuer DID, then exposesissueEmployeeCredential()backed byagent.sdJwtVc.sign(). All credential claims are selectively disclosable.src/storage/InMemoryStorageService.ts— Credo-compatibleStorageServiceusing nestedMaps. Implements full tag query evaluation including$or,$and,$notand array-contains semantics — required for DID record lookups at signing time.Updated files
src/index.ts— CallsinitCredoAgent()beforeapp.listen()so the agent (and issuer key/DID) are ready before any request is served.src/routes/credentials.ts—POST /credentials/employeeis nowasync; the stub is replaced withissueEmployeeCredential(). Adds a500 ISSUANCE_ERRORpath.Result
Header decodes to
{"typ":"vc+sd-jwt","alg":"ES256","kid":"#0"}— real ES256 signature over adid:jwkissuer DID.Notes
InMemoryStorageServiceis intentionally ephemeral (keys and DID regenerate on restart). Replace with Askar or@credo-ts/drizzle-storage+ PostgreSQL for production persistence.allowInsecureHttpUrlsisfalseinNODE_ENV=production.@credo-ts/askarwas evaluated but requires nativeffi-napibindings incompatible with Node 24 in this environment;@credo-ts/node'sNodeKeyManagementServiceis used instead for crypto operations.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh gh auth status(http block)https://api.github.com/user/usr/bin/curl curl -s -H Authorization: token ****** REDACTED(http block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.