Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: JWT Sign and Verify Admin Endpoints with DID Support #2300

Merged
merged 21 commits into from
Jul 12, 2023

Conversation

burdettadam
Copy link
Contributor

This pull request introduces two new endpoints to the admin wallet API:

POST /wallet/jwt/sign: This endpoint allows for the creation of a JWS (JSON Web Signature) by providing a DID (Decentralized Identifier) or verification method along with a header and payload. The JWS is generated using the associated keys linked to the provided DID.

POST /wallet/jwt/verify: With this endpoint, you can verify a JWS by providing the JWS itself. The implementation includes a DID resolver, which leverages the JWS header to resolve a DID document. This document is then used to verify the signature of the provided JWS.

These new endpoints expand the functionality of our admin wallet API, empowering users to perform signing and verification operations conveniently. I have tested the code and ensured its compatibility with our existing system.

Signed-off-by: Adam Burdett [email protected]
Co-authored-by: Daniel Bluhm [email protected]

burdettadam and others added 19 commits June 7, 2023 17:07
Signed-off-by: Adam Burdett <[email protected]>
Signed-off-by: Adam Burdett <[email protected]>
And fix issue with did:sov: from unqualified dids

Signed-off-by: Daniel Bluhm <[email protected]>
Signed-off-by: Adam Burdett <[email protected]>
Signed-off-by: Adam Burdett <[email protected]>
Signed-off-by: Daniel Bluhm <[email protected]>
Signed-off-by: Adam Burdett <[email protected]>
@dbluhm
Copy link
Contributor

dbluhm commented Jul 11, 2023

To give an idea of how we're thinking these might be used, we've found this kind of endpoint to be really helpful for things like signing governance files and other documents that we want to be able to commit to with keys associated with our public DIDs, etc.

An additional clarification: this does not include any changes to support issuing or presenting JWT credentials using ICv2 or PPv2; however, while simple, this does implement the basic crypto and JWT formatting steps.

@dbluhm dbluhm merged commit a9bb9e1 into openwallet-foundation:main Jul 12, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants