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

feat: implement DID management API #203

Conversation

paullatzelsperger
Copy link
Member

@paullatzelsperger paullatzelsperger commented Dec 19, 2023

What this PR changes/adds

This PR adds a CRUD management API for Decentralized Identifiers (DID). More specifically, it adds:

  • a DidManagementApi that contains swagger annotations
  • a DidManagementApiController that implements the REST interface
  • a DidDocumentServiceImpl, that acts as aggregate service and creates the transaction boundary
  • a DidRequestValidator, that validates the structure of a DidDocument
  • tests
  • some refactoring w.r.t. package names

Why it does that

For managing DID documents

Further notes

  • Although internally the IdentityHub manages DidResource objects, the Management API only exposes DidDocument objects (which are a part of DidResources) and provides specific endpoints for "actions", such as publish. This is done because those actions are synchronous, which means there is no state machine that could pick up e.g. a state change, so they need to be executed explicitly.
  • this API does not (cannot) adhere to strict REST principles: for example, publishing a DID should be POST /v1/dids/{did}/publish. however, since (web) DIDs can contain port definitions, which - if properly URL-encoded - are not discernible from the normal segment separator ":" anymore.

Linked Issue(s)

Closes #190

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@paullatzelsperger paullatzelsperger force-pushed the feat/implement_did_management_api branch from bd23c1f to 74f0e19 Compare December 19, 2023 20:44
@paullatzelsperger paullatzelsperger force-pushed the feat/implement_did_management_api branch from 74f0e19 to c27b329 Compare December 19, 2023 20:49
…hub/did/spi/DidDocumentService.java

Co-authored-by: Jim Marino <[email protected]>
@paullatzelsperger paullatzelsperger merged commit d3238c7 into eclipse-edc:main Dec 20, 2023
10 checks passed
@paullatzelsperger paullatzelsperger deleted the feat/implement_did_management_api branch December 20, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api dcp enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IATP: Create management API for DID
4 participants