Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

[Bug] Did ion resolver not working with docker build #641

Open
nitro-neal opened this issue Aug 4, 2023 · 5 comments
Open

[Bug] Did ion resolver not working with docker build #641

nitro-neal opened this issue Aug 4, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@nitro-neal
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

❯ curl -X PUT localhost:8080/v1/schemas -d '{
  "name": "Person Credential",
  "schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "credentialSubject": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
         },
          "lastName": {
            "type": "string"
         }
        },
        "required": ["firstName", "lastName"]
      }
    }
  }
}'
❯ curl -X PUT localhost:8080/v1/dids/ion -d '{"keyType": "secp256k1"}'
{"did":{"@context":["https://www.w3.org/ns/did/v1",{"@base":"did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w"}],"id":"did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w","verificationMethod":[{"id":"#590b51d0-ce6c-46ba-88fa-de49fda1b960","type":"secp256k1","controller":"did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w","publicKeyJwk":{"kty":"EC","crv":"secp256k1","x":"zaS33htuaxDrWh44fenNE1Inr3vx5fMeZRlsdJhLyqI","y":"ybryKUabJV1z5aL_8HdG7p4ACYSDWshXiSSVe53_9-w","alg":"ES256K","kid":"1bad384a-9237-4d4f-9301-24e1cb5b5e9a"}}],"authentication":["#590b51d0-ce6c-46ba-88fa-de49fda1b960"],"assertionMethod":["#590b51d0-ce6c-46ba-88fa-de49fda1b960"]}}
❯  curl -X PUT localhost:8080/v1/credentials -d '{
  "issuer": "did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w",
  "verificationMethodId": "#590b51d0-ce6c-46ba-88fa-de49fda1b960",
  "subject": "did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w",
  "schemaId": "e217cef2-7be3-4cef-a5b8-97545aa482da",
  "data": {
    "firstName": "Satoshi",
    "lastName": "Nakamoto"
  }
}'
{"id":"08f10bb3-a5df-4ec0-a0c7-5481c7bd0c08","fullyQualifiedVerificationMethodId":"did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w#590b51d0-ce6c-46ba-88fa-de49fda1b960","credential":{"@context":["https://www.w3.org/2018/credentials/v1"],"id":"http://localhost:8080/v1/credentials/08f10bb3-a5df-4ec0-a0c7-5481c7bd0c08","type":["VerifiableCredential"],"issuer":"did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w","issuanceDate":"2023-08-04T19:09:06Z","credentialSubject":{"firstName":"Satoshi","id":"did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w","lastName":"Nakamoto"},"credentialSchema":{"id":"e217cef2-7be3-4cef-a5b8-97545aa482da","type":"JsonSchema2023"}},"credentialJwt":"eyJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6aW9uOkVpRGRpUGdNcFlyVzhTWVFEcnAxMWY3eVpqemt6UDFycUFFODNHTTB2MzkzNHcjNTkwYjUxZDAtY2U2Yy00NmJhLTg4ZmEtZGU0OWZkYTFiOTYwIiwidHlwIjoiSldUIn0.eyJpYXQiOjE2OTExNzYxNDYsImlzcyI6ImRpZDppb246RWlEZGlQZ01wWXJXOFNZUURycDExZjd5Wmp6a3pQMXJxQUU4M0dNMHYzOTM0dyIsImp0aSI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC92MS9jcmVkZW50aWFscy8wOGYxMGJiMy1hNWRmLTRlYzAtYTBjNy01NDgxYzdiZDBjMDgiLCJuYmYiOjE2OTExNzYxNDYsIm5vbmNlIjoiZGJjY2QwMjEtZWQ5Ny00ZTYzLWIyNjgtMGQ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BnTXBZclc4U1lRRHJwMTFmN3laanprelAxcnFBRTgzR00wdjM5MzR3IiwidmMiOnsiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJmaXJzdE5hbWUiOiJTYXRvc2hpIiwibGFzdE5hbWUiOiJOYWthbW90byJ9LCJjcmVkZW50aWFsU2NoZW1hIjp7ImlkIjoiZTIxN2NlZjItN2JlMy00Y2VmLWE1YjgtOTc1NDVhYTQ4MmRhIiwidHlwZSI6Ikpzb25TY2hlbWEyMDIzIn19fQ.f_bc6cD-fW5NADarYPR5oucm0yCmCi3_TJBp9CcYZoPyYgGMNv228aXh4JBL5dmS4ptjvANYTuuMx4CeM3lavQ"}'
{"verified":false,"reason":"verifying JWT credential: error getting issuer DID<did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w> to verify credential<http://localhost:8080/v1/credentials/08f10bb3-a5df-4ec0-a0c7-5481c7bd0c08>: unable to resolve DID did:ion:EiDdiPgMpYrW8SYQDrp11f7yZjzkzP1rqAE83GM0v3934w"}

To Reproduce
Steps to reproduce the behavior:

  1. Create a schema
  2. Create a did ion
    3 Create a cred
  3. Do verification of cred
  4. Notice it is not valid because it cannot resolve

building from docker

@nitro-neal nitro-neal added the bug Something isn't working label Aug 4, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in SSI Aug 4, 2023
@nitro-neal
Copy link
Contributor Author

❯ curl -X PUT https://ssi.tbddev.org/v1/schemas -d '{
  "name": "Person Credential",
  "schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "credentialSubject": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
         },
          "lastName": {
            "type": "string"
         }
        },
        "required": ["firstName", "lastName"]
      }
    }
  }
}'
{"id":"8ab433fc-3d53-4cab-a298-09c6cfa35a98","type":"JsonSchema2023","schema":{"$id":"http://localhost:8080/v1/schemas/8ab433fc-3d53-4cab-a298-09c6cfa35a98","$schema":"https://json-schema.org/draft/2020-12/schema","name":"Person Credential","properties":{"credentialSubject":{"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["firstName","lastName"],"type":"object"}},"type":"object"}}

~
❯ curl -X PUT https://ssi.tbddev.org/v1/dids/ion -d '{"keyType": "secp256k1"}'

{"did":{"@context":["https://www.w3.org/ns/did/v1",{"@base":"did:ion:EiCXlUTBBqh6u28F208wYHngnVz4RJNkt2iddatxIAW-mg"}],"id":"did:ion:EiCXlUTBBqh6u28F208wYHngnVz4RJNkt2iddatxIAW-mg","verificationMethod":[{"id":"#75242a6d-9386-43c8-8350-65fd696c8153","type":"secp256k1","controller":"did:ion:EiCXlUTBBqh6u28F208wYHngnVz4RJNkt2iddatxIAW-mg","publicKeyJwk":{"kty":"EC","crv":"secp256k1","x":"a2dpDSE7DMfLpevuCrJIrX9KDILJc_Ni3gqIMRy1gGs","y":"8yT5TbheYmIT4odDAAt-hqlcxDU9emr3Gk94JJW1NRw","alg":"ES256K","kid":"1f2ee117-fe84-499a-bcb6-03d4ad10ad1d"}}],"authentication":["#75242a6d-9386-43c8-8350-65fd696c8153"],"assertionMethod":["#75242a6d-9386-43c8-8350-65fd696c8153"]}}

~
❯ curl -X PUT https://ssi.tbddev.org/v1/credentials -d '{
  "issuer": "did:ion:EiCXlUTBBqh6u28F208wYHngnVz4RJNkt2iddatxIAW-mg",
  "verificationMethodId": "#75242a6d-9386-43c8-8350-65fd696c8153",
  "subject": "did:ion:EiCXlUTBBqh6u28F208wYHngnVz4RJNkt2iddatxIAW-mg",
  "schemaId": "8ab433fc-3d53-4cab-a298-09c6cfa35a98",
  "data": {
    "firstName": "Satoshi",
    "lastName": "Nakamoto"
  }
}'
{"id":"949f73e9-2a97-419d-889e-37774f0334f8","fullyQualifiedVerificationMethodId":"did:ion:EiCXlUTBBqh6u28F208wYHngnVz4RJNkt2iddatxIAW-mg#75242a6d-9386-43c8-8350-65fd696c8153","credential":{"@context":["https://www.w3.org/2018/credentials/v1"],"id":"http://localhost:8080/v1/credentials/949f73e9-2a97-419d-889e-37774f0334f8","type":["VerifiableCredential"],"issuer":"did:ion:EiCXlUTBBqh6u28F208wYHngnVz4RJNkt2iddatxIAW-mg","issuanceDate":"2023-08-04T19:19:26Z","credentialSubject":{"firstName":"Satoshi","id":"did:ion:EiCXlUTBBqh6u28F208wYHngnVz4RJNkt2iddatxIAW-mg","lastName":"Nakamoto"},"credentialSchema":{"id":"8ab433fc-3d53-4cab-a298-09c6cfa35a98","type":"JsonSchema2023"}},"credentialJwt":"eyJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6aW9uOkVpQ1hsVVRCQnFoNnUyOEYyMDh3WUhuZ25WejRSSk5rdDJpZGRhdHhJQVctbWcjNzUyNDJhNmQtOTM4Ni00M2M4LTgzNTAtNjVmZDY5NmM4MTUzIiwidHlwIjoiSldUIn0.eyJpYXQiOjE2OTExNzY3NjYsImlzcyI6ImRpZDppb246RWlDWGxVVEJCcWg2dTI4RjIwOHdZSG5nblZ6NFJKTmt0MmlkZGF0eElBVy1tZyIsImp0aSI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC92MS9jcmVkZW50aWFscy85NDlmNzNlOS0yYTk3LTQxOWQtODg5ZS0zNzc3NGYwMzM0ZjgiLCJuYmYiOjE2OTExNzY3NjYsIm5vbmNlIjoiMTUxODJjNjAtMTZkNS00N2UzLTlhODctYTg4MWMwNjNiZjEwIiwic3ViIjoiZGlkOmlvbjpFaUNYbFVUQkJxaDZ1MjhGMjA4d1lIbmduVno0UkpOa3QyaWRkYXR4SUFXLW1nIiwidmMiOnsiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCJdL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hbWUiOiJTYXRvc2hpIiwibGFzdE5hbWUiOiJOYWthbW90byJ9LCJjcmVkZW50aWFsU2NoZW1hIjp7ImlkIjoiOGFiNDMzZmMtM2Q1My00Y2FiLWEyOTgtMDljNmNmYTM1YTk4IiwidHlwZSI6Ikpzb25TY2hlbWEyMDIzIn19fQ.iyjmqIi71SQUFiSU58TXWND8gRnc4z6FqvRkumMTtWWap2MrUOBbPqnDKvzWTJfFTeRt3yC9j9ZCJEWMH60gWw"}'
{"verified":true}

it works on our ssi.tbddev.org so the problem is that our resolver is not working correctly on our docker build.

@nitro-neal nitro-neal changed the title [Bug] Can't verify fresh VC with did ion issuer [Bug] Did ion resolver not working with docker build Aug 4, 2023
@decentralgabe
Copy link
Member

I believe this is tied to setting ion as a local resolution method in the config

@andresuribe87
Copy link
Contributor

ssi.tbddev.org hasn't been deployed in a while, so this might be related to some changes that were introduced recently.

@decentralgabe
Copy link
Member

@nitro-neal is this still valid?

@decentralgabe
Copy link
Member

decentralgabe commented Aug 18, 2023

this appears to be a bug with the driver itself not supporting m1/2 chips decentralized-identity/uni-resolver-driver-did-ion#29

https://stackoverflow.com/questions/69368720/docker-errors-when-trying-to-build-in-arm64-apple-m1-failed-to-resolve-full-pa

I recommend we build a new image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
No open projects
Status: 🆕 New
Development

No branches or pull requests

3 participants