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

Add support for JWKS #46

Open
awoie opened this issue Sep 25, 2019 · 4 comments
Open

Add support for JWKS #46

awoie opened this issue Sep 25, 2019 · 4 comments

Comments

@awoie
Copy link

awoie commented Sep 25, 2019

JOSE/IETF specifications often use URIs that point to JSON Web Key Sets (JWKS), e.g., OpenID Connect. It would be great if we could find a way that allows a DID URL to be used in such a way. This could be either done by using matrix parameters, or something similar.

We could also limit the scope by just including public keys that have the publicKeyJWK type.

Is there a way to use DID URLs in such a way already?

@awoie
Copy link
Author

awoie commented Sep 26, 2019

My did:example method specification could always say that an additional jwks section will be created and that all publicKeyJwk entries should be included in that section as follows:

{ 
   "@context":[ 
      "https://www.w3.org/2019/did/v1",
      "https://w3id.org/security/v1"
   ],
   "id":"did:example:123456789abcdefghi",
   "publicKey":[ 
      { 
         "id":"did:example:123456789abcdefghi#keys-1",
         "type":"RsaVerificationKey2018",
         "controller":"did:example:123456789abcdefghi",
         "publicKeyJwk": ...
      }
   ],
   "jwks":{ 
      "id":"did:example:123456789abcdefghi#jwks",
      "keys":[ 
         { 
            "alg":"RS256",
            "kty":"RSA",
            "use":"sig",
            "x5c":[ 
               "MIIC+DCCAeCgAwIBAgIJBIGjYW6hFpn2MA0GCSqGSIb3DQEBBQUAMCMxITAfBgNVBAMTGGN1c3RvbWVyLWRlbW9zLmF1dGgwLmNvbTAeFw0xNjExMjIyMjIyMDVaFw0zMDA4MDEyMjIyMDVaMCMxITAfBgNVBAMTGGN1c3RvbWVyLWRlbW9zLmF1dGgwLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMnjZc5bm/eGIHq09N9HKHahM7Y31P0ul+A2wwP4lSpIwFrWHzxw88/7Dwk9QMc+orGXX95R6av4GF+Es/nG3uK45ooMVMa/hYCh0Mtx3g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zZFMDQ4QzQ2MDAyQjVDNjk1RTM2Qg",
            "x5t":"NjVBRjY5MDlCMUIwNzU4RTA2QzZFMDQ4QzQ2MDAyQjVDNjk1RTM2Qg"
         }
      ]
   }
}

Then, I will be able to resolve did:example:123456789abcdefghi#jwks to the final jwks. Is that correct @peacekeeper ?

@awoie
Copy link
Author

awoie commented Sep 26, 2019

Of course one downside would be interoperability. Service providers that rely on that feature would need to know which DID methods support JWKS but the same holds true for any other publicKey type.

@awoie
Copy link
Author

awoie commented Sep 26, 2019

If the example query above is not correct, could you provide an example of how the query could look like to get the jwks section in the DID Document?

@awoie
Copy link
Author

awoie commented Sep 26, 2019

We could think about introducing DID method decorators. One such decorator could be to add this jwks section based on the publicKey section in the DID document. In this way, we could achieve some sort of interoperability. I could imagine that other decorators could make sense as well. Every DID method author could choose which decorators are supported by their DID method.

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

No branches or pull requests

1 participant