Skip to content

OID4VC extension for Eclipse Dataspace Components enabling OID4VCI issuance and OID4VP presentation of Verifiable Credentials.

License

Notifications You must be signed in to change notification settings

SoftwareAG/edc-oid4vc-extension

Repository files navigation

OID4VC Extension for Eclipse Dataspace Components (EDC)

This OID4VC extension enables the EDC Connector to interact with OID4VC-compliant issuers and verifiers:

  • The EDC can receive Verifiable Credentials using the OID4VCI protocol (OpenID for Verifiable Credential Issuance).
  • The EDC can present Verifiable Credentials using the OID4VP protocol (OpenID for Verifiable Presentations).

The OID4VC extension provided by this repository is located in the directory “oid4vc-extension” (see Usage). The remaining parts of this repository are not strictly needed to build the extension. The Gradle project in the directory “runtimes/consumer” is used for setting up an EDC Connector that includes this extension for demonstration purposes (see Demonstration). Further contents in this repository originate from the EDC extension template, which provides the basic setup, and the superuser-seed extension, which is also employed for the demonstration (see Acknowledgements).

Usage

Clone the repository, then build and publish the extension locally:

./gradlew oid4vc-extension:build
./gradlew oid4vc-extension:publishToMavenLocal

Add the OID4VC extension as a dependency in your EDC runtime:

implementation("com.softwareag.edc:oid4vc-extension:1.0.0")

Demonstration

You can also test the OID4VC extension using the prebuilt consumer runtime:

./gradlew build
java -Dedc.fs.config=runtimes/consumer/config.properties -jar runtimes/consumer/build/libs/consumer.jar 

For this demo, we'll use the walt.id portal — a user-friendly, OID4VC-compliant issuer and verifier.

Note

Your EDC’s DID must be publicly reachable to interact with this external service. Expose the corresponding ports of the EDC or host the DID publicly. To test locally, consider using a reverse proxy tunneling service like serveo.

Once set up, follow the steps below to try the demonstration:

  1. (Optional) Create an EDC Participant

If you haven’t created an EDC participant yet, you can do so with the following command. Note: This also generates a new keypair, which should be exposed under your DID.

curl -X POST http://localhost:29196/identity/v1alpha/participants/ \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: c3VwZXItdXNlcg==.c3VwZXItc2VjcmV0LWtleQo=" \
  -d '{
    "roles": [],
    "serviceEndpoints": [],
    "active": true,
    "participantId": "exampleParticipant",
    "did": "<your-did>",
    "key": {
      "keyId": "<your-did>#key-1",
      "privateKeyAlias": "<your-did>#key-1",
      "keyGeneratorParams": {
        "algorithm": "RSA"
      }
    }
  }'
  1. Claim a Credential Offer (using OIDVCI)

Go to walt.id portal and issue a credential. Copy the offer url.

curl -X POST http://localhost:29191/api/oid4vc/exampleParticipant/claimCredentialOffer \
  -H "Content-Type: application/json" \
  -d '{
    "offerUri": "<credential-offer-url>"
  }'
  1. Present a credential (using OID4VP)

Go to walt.id portal and choose the credential you issued for verification. Copy the presentation url.

curl -X POST http://localhost:29191/api/oid4vc/exampleParticipant/presentCredentials \
  -H "Content-Type: application/json" \
  -d '{
    "offerUri": "<credential-presentation-url>"
  }'

Acknowledgements

This project is based on the official Template Repository for projects using Eclipse Dataspace Components (Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)).

This project includes the superuser-seed extension for seeding the Identity Hub of the demo consumer runtime (Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG), Copyright (c) 2024 Metaform Systems, Inc.).

Funding notes

This work was developed within the research project Gaia-X 4 Advanced Mobility Services (Gaia-X 4 AMS), part of the Gaia-X 4 Future Mobility project family, supported by the German Federal Ministry for Economic Affairs and Energy (BMWE) with funding from the European Union based on the NextGenerationEU package.

Funding logo

Disclaimer: The views and opinions expressed in this work are solely those of the authors and do not necessarily reflect the views of the BMWE, the European Union, or the European Commission. Neither the BMWE, nor the European Union, nor the European Commission can be held responsible for them.

Legal notes

The following applies to this project “OID4VC Extension for Eclipse Dataspace Components (EDC)”.

Copyright (c) 2024–2025 Software GmbH, Darmstadt, Germany

This project is licensed under the Apache License, Version 2.0 (the “LICENSE”); you may not use this software except in compliance with the LICENSE. A copy of the LICENSE is provided in the file LICENSE_Apache-2-0.txt. You may also obtain a copy of the LICENSE at https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the LICENSE is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE for the specific language governing permissions and limitations under the LICENSE.

This project may comprise separate components provided by third-party developers and contributors. Copyright notices and license texts for these can be found in the file thirdparty.txt in this same directory or in license files in the respective directories where a component may be stored.

Caution

Logos, trademarks, etc. are not covered by the license of this project. These may only be used in accordance with the regulations of the respective owner.

About

OID4VC extension for Eclipse Dataspace Components enabling OID4VCI issuance and OID4VP presentation of Verifiable Credentials.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published