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

domain of publicKeyJWK should be rdf:JSON #73

Closed
bblfish opened this issue Dec 29, 2022 · 3 comments
Closed

domain of publicKeyJWK should be rdf:JSON #73

bblfish opened this issue Dec 29, 2022 · 3 comments
Assignees
Labels
before CR This issue needs to be resolved before the Candidate Recommendation phase. pr exists A pull request exists to address this issue.

Comments

@bblfish
Copy link

bblfish commented Dec 29, 2022

The json-ld contexts for publicKeyJWK make the value be a rdf:JSON, which cleverly allows the unobtrusive integration of the key as a literal into JSON. But the spec has the range be rdfs:string.

So in the Http Signature protocol I am developing
I wrote the key in JSON-LD like this

{
"@context": [
    "https://w3id.org/security/v1",
    { "ex": "http://example.org/vocab#" }
  ],
  "id": "#",
  "controller": "/people/alice#i",
  "publicKeyJwk": { 
        "kty":"RSA",
        "e":"AQAB",
        "n" : "hAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsPBRrwWEBnez6d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsdJKFqMGmXCQvEG7YemcxDTRPxAleIAgYYRjTSd_QBwVW9OwNFhekro3RtlinV0a75jfZgkne_YiktSvLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKIlE0PuKxI4T-HIaFpv8-rdV6eUgOrB2xeI1dSFFn_nnv5OoZJEIB-VmuKn3DCUcCZSFlQPSXSfBDiUGhwOw76WuSSsf1D4b_vLoJ10w",
        "alg":"PS512",
        "kid":"2021-04-01-laptop"
  }
}

Which I worked out to be equivalent to the following turtle

@prefix security: <https://w3id.org/security#> .

</keys/alice#>
     security:controller </people/alice#i> ;
     security:publicKeyJwk """{
            "alg":"PS512",
            "e":"AQAB",
            "kid":"2021-04-01-laptop",
            "kty":"RSA",
            "n":hAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsPBRrwWEBnez6d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsdJKFqMGmXCQvEG7YemcxDTRPxAleIAgYYRjTSd_QBwVW9OwNFhekro3RtlinV0a75jfZgkne_YiktSvLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKIlE0PuKxI4T-HIaFpv8-rdV6eUgOrB2xeI1dSFFn_nnv5OoZJEIB-VmuKn3DCUcCZSFlQPSXSfBDiUGhwOw76WuSSsf1D4b_vLoJ10w"
      }"""^^rdf:JSON .

also if you have publicKeyJWK you should also have privateKeyJWK so that we don't need to forever be tied to PEMs, which is the only option offered at the moment for private keys.

@msporny
Copy link
Member

msporny commented Jul 4, 2023

@bblfish wrote:

The json-ld contexts for publicKeyJWK make the value be a rdf:JSON

Yes, agreed. We'll do this in a future PR.

@msporny msporny added ready for pr This issue is ready to be resolved via a pull request before CR This issue needs to be resolved before the Candidate Recommendation phase. labels Jul 4, 2023
@msporny msporny self-assigned this Jul 15, 2023
@msporny
Copy link
Member

msporny commented Jul 29, 2023

PR #135 has been raised to address this issue. This issue will be closed when that PR is merged.

@msporny msporny added pr exists A pull request exists to address this issue. and removed ready for pr This issue is ready to be resolved via a pull request labels Jul 29, 2023
@msporny
Copy link
Member

msporny commented Aug 12, 2023

PR #135 has been merged, closing.

@msporny msporny closed this as completed Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
before CR This issue needs to be resolved before the Candidate Recommendation phase. pr exists A pull request exists to address this issue.
Projects
None yet
Development

No branches or pull requests

2 participants