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

libp2p + HTTP: Peer Authentication #481

Closed
wants to merge 1 commit into from

Conversation

marten-seemann
Copy link
Contributor

Building on a lot of discussions that happened prior to and during IPFS Camp, and with @MarcoPolo.


The client proves ownership of its private key by signing a value provided by the server. The server then issues an authentication token, which the client then sets as a header field on subsequent requests to the server. To allow the server to operate statelessly, it MAY encode the client’s peer ID into the authentication token.

TODO: specify endpoints and what exactly to sign. Or maybe there’s prior art we can reuse?
Copy link
Contributor

Choose a reason for hiding this comment

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

Haven't thought too much about this, but it would be great if we could use webauthn here

@marten-seemann marten-seemann mentioned this pull request Jan 22, 2023
Comment on lines +32 to +36
### On-Demand Server Authentication

In order to learn and verify the server’s peer ID, the client MAY use a challenge-response protocol. The client issues a POST request to a predefined HTTP endpoint, and the server signs this value (concatenated to a const string) with its private key. It then transfers its public key and the signature to the client.

TODO: this is really straightforward, but we need to specify how exactly this works
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This doesn't work for the reasons outlined in #508 (comment).

@MarcoPolo
Copy link
Contributor

Closing this in favor of focusing on #508

@MarcoPolo MarcoPolo closed this Jun 1, 2023
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

Successfully merging this pull request may close these issues.

2 participants