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: Signed Credential Issuer's Metadata #1418

Conversation

mishasizov-SK
Copy link
Contributor

JWT example:

eyJhbGciOiJFUzI1NiIsImtpZCI6ImRpZDprZXk6ekRuYWVwNEhad2pnYnREMlh1MmRQTGd6eWd3S0tnMUNOQk5FWE4xbjVhVGJRc0JLVSN6RG5hZXA0SFp3amdidEQyWHUyZFBMZ3p5Z3dLS2cxQ05CTkVYTjFuNWFUYlFzQktVIn0.eyJpYXQiOjE2OTQ1ODE5ODIsImlzcyI6ImRpZDprZXk6ekRuYWVwNEhad2pnYnREMlh1MmRQTGd6eWd3S0tnMUNOQk5FWE4xbjVhVGJRc0JLVSIsInN1YiI6ImRpZDprZXk6ekRuYWVwNEhad2pnYnREMlh1MmRQTGd6eWd3S0tnMUNOQk5FWE4xbjVhVGJRc0JLVSIsIndlbGxfa25vd25fb3BlbmlkX2lzc3Vlcl9jb25maWd1cmF0aW9uIjp7ImF1dGhvcml6YXRpb25fc2VydmVyIjoiaHR0cHM6Ly9hcGktZ2F0ZXdheS50cnVzdGJsb2MubG9jYWw6NTU2Ni9vaWRjL2F1dGhvcml6ZSIsImNyZWRlbnRpYWxfZW5kcG9pbnQiOiJodHRwczovL2FwaS1nYXRld2F5LnRydXN0YmxvYy5sb2NhbDo1NTY2L29pZGMvY3JlZGVudGlhbCIsImNyZWRlbnRpYWxfaXNzdWVyIjoiaHR0cHM6Ly9hcGktZ2F0ZXdheS50cnVzdGJsb2MubG9jYWw6NTU2Ni9pc3N1ZXIvaV9teXByb2ZpbGVfY210cl9wMjU2X2xkcC92MS4wIiwiY3JlZGVudGlhbHNfc3VwcG9ydGVkIjpbeyJjcmVkZW50aWFsU3ViamVjdCI6eyJkaXNwbGF5TmFtZSI6eyJkaXNwbGF5IjpbeyJsb2NhbGUiOiJ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VmVyaWZpZWRFbXBsb3llZSJdfV0sImRpc3BsYXkiOlt7ImxvY2FsZSI6ImVuLVVTIiwibmFtZSI6ImlfbXlwcm9maWxlX2NtdHJfcDI1Nl9sZHAiLCJ1cmwiOiJodHRwOi8vdmMtcmVzdC1lY2hvLnRydXN0YmxvYy5sb2NhbDo4MDc1In1dfX0.MEYCIQD6KOZns0aPMM5BD1qXwZRmUd2K0MBS31QvSXJrM2Qw0gIhAMXoDx5ApTlHAU1o940kRiR0u-dVl9LBf6m3TMqmFL7x

Parsed JWT header:

{
  "alg": "ES256",
  "kid": "did:key:zDnaep4HZwjgbtD2Xu2dPLgzygwKKg1CNBNEXN1n5aTbQsBKU#zDnaep4HZwjgbtD2Xu2dPLgzygwKKg1CNBNEXN1n5aTbQsBKU"
}

Parsed payload:

{
  "iat": 1694581982,
  "iss": "did:key:zDnaep4HZwjgbtD2Xu2dPLgzygwKKg1CNBNEXN1n5aTbQsBKU",
  "sub": "did:key:zDnaep4HZwjgbtD2Xu2dPLgzygwKKg1CNBNEXN1n5aTbQsBKU",
  "well_known_openid_issuer_configuration": {
    "authorization_server": "https://api-gateway.trustbloc.local:5566/oidc/authorize",
    "credential_endpoint": "https://api-gateway.trustbloc.local:5566/oidc/credential",
    "credential_issuer": "https://api-gateway.trustbloc.local:5566/issuer/i_myprofile_cmtr_p256_ldp/v1.0",
    "credentials_supported": [
      {
        "credentialSubject": {
          "displayName": {
            "display": [
              {
                "locale": "en-US",
                "name": "Employee"
              }
            ]
          },
          "givenName": {
            "display": [
              {
                "locale": "en-US",
                "name": "Given Name"
              }
            ]
          },
          "jobTitle": {
            "display": [
              {
                "locale": "en-US",
                "name": "Job Title"
              }
            ]
          },
          "mail": {
            "display": [
              {
                "locale": "en-US",
                "name": "Mail"
              }
            ]
          },
          "photo": {
            "display": [
              {
                "name": "Photo"
              }
            ]
          },
          "preferredLanguage": {
            "display": [
              {
                "locale": "en-US",
                "name": "Preferred Language"
              }
            ]
          },
          "surname": {
            "display": [
              {
                "locale": "en-US",
                "name": "Surname"
              }
            ]
          }
        },
        "cryptographic_binding_methods_supported": [
          "jwk"
        ],
        "cryptographic_suites_supported": [
          "ECDSAP256DER"
        ],
        "display": [
          {
            "background_color": "#12107c",
            "locale": "en-US",
            "logo": {
              "alt_text": "a square logo of a employee verification",
              "url": "https://example.com/public/logo.png"
            },
            "name": "Verified Employee",
            "text_color": "#FFFFFF"
          }
        ],
        "format": "ldp_vc",
        "id": "VerifiedEmployee_LDP",
        "types": [
          "VerifiableCredential",
          "VerifiedEmployee"
        ]
      }
    ],
    "display": [
      {
        "locale": "en-US",
        "name": "i_myprofile_cmtr_p256_ldp",
        "url": "http://vc-rest-echo.trustbloc.local:8075"
      }
    ]
  }
}

@cla-bot cla-bot bot added the cla-signed label Sep 13, 2023
@mishasizov-SK mishasizov-SK force-pushed the feat_Signed_Credential_Issuers_Metadata branch from e98c08e to 7842f9c Compare September 13, 2023 06:21
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch coverage: 94.11% and no project coverage change.

Comparison is base (6498c5b) 85.29% compared to head (a0306cf) 85.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1418   +/-   ##
=======================================
  Coverage   85.29%   85.30%           
=======================================
  Files         163      164    +1     
  Lines       10269    10322   +53     
=======================================
+ Hits         8759     8805   +46     
- Misses       1102     1108    +6     
- Partials      408      409    +1     
Files Changed Coverage Δ
component/profile/reader/file/reader.go 13.19% <ø> (ø)
pkg/restapi/v1/util/bind.go 0.00% <0.00%> (ø)
pkg/service/wellknown/fetcher/wellknown_service.go 100.00% <ø> (ø)
pkg/restapi/v1/issuer/controller.go 92.04% <88.23%> (-1.07%) ⬇️
cmd/vc-rest/startcmd/start.go 80.90% <100.00%> (+0.14%) ⬆️
...kg/service/wellknown/provider/wellknown_service.go 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mishasizov-SK mishasizov-SK force-pushed the feat_Signed_Credential_Issuers_Metadata branch 2 times, most recently from 79599be to cf4be03 Compare September 13, 2023 09:33
@mishasizov-SK mishasizov-SK marked this pull request as ready for review September 13, 2023 10:17
Signed-off-by: Mykhailo Sizov <mykhailo.sizov@securekey.com>
@mishasizov-SK mishasizov-SK force-pushed the feat_Signed_Credential_Issuers_Metadata branch from cf4be03 to a0306cf Compare September 14, 2023 08:16
@fqutishat fqutishat merged commit b9f9e9a into trustbloc:main Sep 14, 2023
@mishasizov-SK mishasizov-SK deleted the feat_Signed_Credential_Issuers_Metadata branch September 20, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants