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

HttpSig #125

Merged
merged 50 commits into from
Mar 1, 2021
Merged
Changes from 4 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e686fea
Update HttpSig with Credentials
bblfish Feb 4, 2021
d563df7
Credentials piece
bblfish Feb 4, 2021
91a7f45
improvements to text
bblfish Feb 4, 2021
18d8d76
minor fix
bblfish Feb 4, 2021
535c436
improve grammar
bblfish Feb 4, 2021
c57a3c2
improve language on policies
bblfish Feb 4, 2021
bdee29f
clarify requirement on TLS and other
bblfish Feb 9, 2021
6286ac0
Update HttpSignature.md
bblfish Feb 9, 2021
7d7153a
Update HttpSignature.md
bblfish Feb 9, 2021
43c3989
Update HttpSignature.md
bblfish Feb 9, 2021
bfe1677
improve language on policies
bblfish Feb 4, 2021
745a783
Merge branch 'HttpSig' of github.com:bblfish/authentication-panel int…
bblfish Feb 10, 2021
817141f
put every sentence on newline for easier diffs
bblfish Feb 10, 2021
b014890
Introduce SSI Governance language
bblfish Feb 10, 2021
7ae6154
minor tweak to Sequence diagram
bblfish Feb 10, 2021
2ae6c3a
Update HttpSignature.md
bblfish Feb 11, 2021
fe2f8b2
Link to did key URL discussion, and fix clarify `>` text
bblfish Feb 11, 2021
4dcf550
Improve text. Add reference and examples for did:key: URLs
bblfish Feb 13, 2021
2fb7d20
Link to Univeral Wallet and Verifiable Credential spec
bblfish Feb 13, 2021
d360c9f
Update HttpSignature.md
bblfish Feb 14, 2021
526b490
Illustrate protocol with Authorization headers
bblfish Feb 14, 2021
9965ff9
change Http-Sig method to HttpSig
bblfish Feb 14, 2021
eba19d1
Merge branch 'HttpSig' of github.com:bblfish/authentication-panel int…
bblfish Feb 14, 2021
636c47d
Update HttpSignature.md
bblfish Feb 14, 2021
c8c3d7e
Update HttpSignature.md
bblfish Feb 14, 2021
6236b81
fix suggested by TallTed
bblfish Feb 14, 2021
9364c93
Merge branch 'HttpSig' of github.com:bblfish/authentication-panel int…
bblfish Feb 14, 2021
f428718
fix some spelling mistakes found by vimr
bblfish Feb 14, 2021
6f3ded4
Update HttpSignature.md
bblfish Feb 17, 2021
89bb2ca
Update HttpSignature.md
bblfish Feb 17, 2021
a9d617b
Update HttpSignature.md
bblfish Feb 17, 2021
b791faa
add executive summary
bblfish Feb 22, 2021
500c9a5
Unify refs to "Signing Http Messages" as HTTP-Sig
bblfish Feb 22, 2021
b8c9a47
HTTP-Sig the RFC was too similar to HttpSig the protocol
bblfish Feb 22, 2021
4f190ea
fix typo and clarify
bblfish Feb 22, 2021
f285937
The Summary is not high level enough for executives
bblfish Feb 24, 2021
b04dd9a
Update HttpSignature.md
bblfish Feb 24, 2021
7186efa
changes from feedback by Jos
bblfish Feb 25, 2021
6dd9563
Merge branch 'HttpSig' of github.com:bblfish/authentication-panel int…
bblfish Feb 25, 2021
7fe5fca
minor
bblfish Feb 25, 2021
4c2b449
Update HttpSignature.md
bblfish Feb 25, 2021
788e13f
Update HttpSignature.md
bblfish Feb 25, 2021
f33de24
Update HttpSignature.md
bblfish Feb 25, 2021
d158f1c
Update HttpSignature.md
bblfish Feb 25, 2021
01ea0f3
show some examples with did:key
bblfish Feb 25, 2021
1a33f02
Small improvement.
bblfish Feb 25, 2021
693d579
typo
bblfish Feb 25, 2021
121b223
Update HttpSignature.md
bblfish Feb 25, 2021
3be6550
Update HttpSignature.md
bblfish Mar 1, 2021
545a452
changes in response to feedback by @csarven
bblfish Mar 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions HttpSignature.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ It may also be possible to send the ACL rules directly in the body (Todo: resear

### The KeyId URL

In order for it to be clear that the `keyId` is to be interpreted as a URL, the `keyId` field MUST enclose the URL with `<` and `>` characters.
In order for it to be clear that the `keyId` is to be interpreted as a URL, the `keyId` field MUST enclose the URL with `'<'` and `'>'` characters.
To take an example from [§A.3.2.1](https://tools.ietf.org/html/draft-ietf-httpbis-message-signatures-01#appendix-A.3.2) of `Http-Sig` this would allow the following use of relative URLs referring to a resource on the requested server

```HTTP
Expand All @@ -91,17 +91,14 @@ located elsewhere on the web, such as the requestor's [Freedom Box](https://free

```HTTP
Signature-Input: sig1=(); keyId="<https://alice.freedombox/keys/test-key-a>"; created=1402170695
Signature: sig1=:cxieW5ZKV9R9A70+Ua1A/1FCvVayuE6Z77wDGNVFSiluSzR9TYFV
vwUjeU6CTYUdbOByGMCee5q1eWWUOM8BIH04Si6VndEHjQVdHqshAtNJk2Quzs6WC
2DkV0vysOhBSvFZuLZvtCmXRQfYGTGhZqGwq/AAmFbt5WNLQtDrEe0ErveEKBfaz+
IJ35zhaj+dun71YZ82b/CRfO6fSSt8VXeJuvdqUuVPWqjgJD4n9mgZpZFGBaDdPiw
pfbVZHzcHrumFJeFHWXH64a+c5GN+TWlP8NPg2zFdEc/joMymBiRelq236WGm5VvV
9a22RW2/yLmaU/uwf9v40yGR/I1NRA==:
Signature: sig1=:cxieW5ZKV9R9A70+Ua1A/1FCvVayuE6Z77wDGNVFSiluSz...==:
```

It could also allow key based did URLs as described in [issue 217 of the Solid Spec](https://github.com/solid/specification/issues/217#issuecomment-777509084).

The advantage of a URL is that it allows the client to use HTTP Methods such as `POST` or `PUT` to create keys, as well as `PUT`, `PATCH` and `DELETE` to edit them, solving the problem of key revocation.

We also reserve the use of keyIds enclosed with `>` and `<` characters for
We also reserve the use of keyIds enclosed with `'>'` and `'<'` characters for
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suggests >{keyId}< which I think is not what is intended.

"Enclosed with" usually enumerates first the prepend and second the append -- so if the intent is (as I believe) <{keyId}>, this should read

Suggested change
We also reserve the use of keyIds enclosed with `'>'` and `'<'` characters for
We also reserve the use of keyIds enclosed with `'<'` and `'>'` characters for

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>{keyId}< is exactly what was intended! :-)

The idea is that we want a way to say: this is the relative URL for the key, but it is not to be found out there on the internet, but by asking the client for it.
How does one ask the client for it? By using the P2P extension of HTTP/2 referred to, which allows the server to take on the role of a client on the same connection.

Do you think >{keyId}< would be clearer?

possible extensions of HTTP such as the [Peer-to-Peer Extension to HTTP/2 draft](https://tools.ietf.org/html/draft-benfield-http2-p2p-02) as discussed on the [ietf-http-wg mailing list](https://lists.w3.org/Archives/Public/ietf-http-wg/2021JanMar/0049.html).
This would allow the client to let the server know that it can request the key by making an HTTP `GET` request on the given relative URL, reducing to a minimum the reliance on the network.
With such a protocol available, the request could be signed as follows
Expand Down Expand Up @@ -226,8 +223,8 @@ App Server Doc Cred
| | |
| verify sig | |
| | |
| |-(6) -credential-------------------->|
| |<---------------(7) send credential--|
| |-(6) GET credential----------------->|
| |<-----------------(7) credential doc-|
| |
| WAC verification |
| |
Expand All @@ -237,10 +234,12 @@ App Server Doc Cred
Steps (4) and (5), where the server retrives a (cached)copy of the key, are as before.

Steps (6) can be run in parallel with (4) to fetch the Credential document.
This also can be cached.
If the URL is relative it will be found on Resource Server.
If the URL is remote it may need to be fetched.
If the URL is enclosed in `>` and `<` and a P2P extension is available the server can request the credential from the client directly using the same connection opened in (3).
This also can be cached.
If the `Credential` header URL
* is enclosed in '<' and '>' then
* if it is relative it can be fetched on the same server
* if is is an absolute URL it can be fetched by opening a new connection
* is enclosed in `>` and `<` and P2P HTTP extension is enabled, the server can request the credential from the client directly using the same connection opened in (3).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above, I think this probably should be

Suggested change
* is enclosed in `>` and `<` and P2P HTTP extension is enabled, the server can request the credential from the client directly using the same connection opened in (3).
* is enclosed in `<` and `>` and P2P HTTP extension is enabled, the server can request the credential from the client directly using the same connection opened in (3).

Copy link
Member Author

@bblfish bblfish Feb 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same point as above. Perhaps this is such an unusual idea that it requires more elaboration, perhaps even a picture or something.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it requires a lexical/literal example, at minimum. If there are other wrapping characters -- whether brackets, braces, parentheses, quotation marks, or otherwise -- which may be used in a more typical manner (the only thing I can quickly think of that uses >…< wrappers in that order is an ASCII emoticon for a cat, >^..^<), I would suggest using them instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way I see it is in terms of indexicals eg: I and you. In an HTTP connection of a client C to a server example.com, the you for the client is example.com. The server on the other hand knows nothing of the client so it only can say you. The client wishes to pass a key to the server but it can say: the key at my house at address so and so, or the key in your pocket, or the key in my pocket. We need to be able to distinguish between "the key in my pocket" and "the key in your pocket".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making such distinction doesn't seem to require any specific wrapping characters. It requires knowing who's "speaking", and to whom -- as the entity to which the possessive "my" or "your" refers changes in meaning with the speaker and the audience. In HTTP, we can speak of the Client and the Server, and describe what action each might be taking (requesting, responding, etc.). In other spheres, we have conventions like Requesting Party, Relying Party, Responding Party, etc., to serve the same purpose.

Sometimes, it's very hard to describe an interaction with generalities, but trivial to describe it through a concretized example. I think this might be one of those situations, at least at this point in the ecosystem's development.

Copy link
Member Author

@bblfish bblfish Feb 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making such distinction doesn't seem to require any specific wrapping characters. It requires knowing who's "speaking", and to whom -- as the entity to which the possessive "my" or "your" refers changes in meaning with the speaker and the audience.

Let us say we start with a connection from Phone to Pod .
Phone requests a secure resource, is returned a 401 by Pod, and then sends the Phone a signed message with a relative URL /auth/Cred1 referring to the Credential . Now that the Pod can turn around and be a client on the same connection, it is possible for it to also use relative URLs to make requests to the Phone, which was not possible before the P2P connection extension. So it is now possible for the phone to send a relative URL to the Pod that refers to the Phone's side of the connection. Relative URLs are relative to a communication.

So we want to allow the following two possibilities to exist:

  1. the Credential is on the Phone at >/auth/Cred1<
  2. the Credential is on the server at </auth/Cred1>

The relative path /auth/Cred1 is the same in both cases, so we use the angle bracket reversal to distinguish on which side the URL is relative to the roles at that stage in that conversation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote more about what P2P opens up to the web here w3c/architecture#14
I still want to integrate this into the spec here, but need to be careful not to make too much of it, as what is proposed can also work without it.


### Linking a WebKey to a WebID

Expand Down Expand Up @@ -316,4 +315,5 @@ This would allow resources to be protected with a rule such as
A client after receiving the response (2) in the above sequence diagram can search for the relevant [Verifiable Credential](https://www.w3.org/TR/vc-data-model/) in its credential store (containing perhaps a Drivers Licence, Birth certificate or MI6 007 licence to kill), order these in a privacy lattice, and choose the one the more appropriate for the task at hand.
The URL for that Credential can then be sent in the header (3).
The verification process then needs to verify that the signature is correct, and that the credential identifies the user with the same key, and is signed by a legitimate Certificate Authority.
(How to determine the legitimate Certificate Authority is outside the scope of this specification, and will require something like a [Web of Nations](https://co-operating.systems/2020/06/01/WoN.pdf)).
How to determine which Certificate Authority are legitimate for which claims, is outside the scope of this specification.
This is known in the Self-Sovereign Identity space as a Governance Framework, and in the end will lead to a [Web of Nations](https://co-operating.systems/2020/06/01/WoN.pdf).