web-payments / web-payments.org

Web Payments website and core specifications
https://web-payments.org/
29 stars 13 forks source link

sec:owner owl:inverseOf sec:publicKey ? #38

Open elf-pavlik opened 8 years ago

elf-pavlik commented 8 years ago

Should one consider sec:owner and sec:publicKey as inverse properties? Linked Data Signatures Verification Algorithm states:

Confirm that the Linked Data Document that describes the public key specifies its owner and that its owner's URL identifier can be dereferenced to reveal a bi-directional link back to the key

If sec:publicKey doesn't work as inverse of sec:owner, i would prefer to just use sec:owner in reverse direction and not use sec:publicKey all together.

I can find security vocabulary html spec https://web-payments.org/vocabs/security

And JSON-LD context https://w3id.org/security/v1

I can't find RDFS/OWL documents which could provide statements like owl:inverseOf

elf-pavlik commented 8 years ago

Given:

<https://alice.example/keys/1#key> a sec:Key ;
  sec:owner <https://alice.example/#identity> .

Then:

https://alice.example/api/tpf?s={https%3A%2F%2Falice.example%2Fkeys%2F1%23key}&p={https%3A%2F%2Fw3id.org%2Fsecurity%23owner}

In case where I automatically generate content for https://alice.example/#identity I could easily include triple with reverse property in identity document

<https://alice.example/keys/1#key> sec:owner <https://alice.example/#identity> .

But it requires some custom logic to include sec:publicKey triple if owl:inverseOf does not exist.

Even better I would propose to change sec context to alias

{ 
 "@context": {
    ...
   "sec:publicKey": { "@reverse": "sec:owner" }
  }
}