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

[Feature request] API extension: SOGS pubkey #185

Open
mdPlusPlus opened this issue Apr 8, 2023 · 4 comments
Open

[Feature request] API extension: SOGS pubkey #185

mdPlusPlus opened this issue Apr 8, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@mdPlusPlus
Copy link
Contributor

Hi, maintainer of sessioncommunities.online here.

We're supposing the following API extension:

  • Retrieval of the SOGS public key

Currently there's no way to get the public key of a SOGS via API.
If you have access to the API of a specific SOGS, you can get all the info you need to join one or more of the present communities except for the common public key. To get that, you need to open the preview (if accessible) or rely on a third-party source (session.directory, sessioncommunities.online) to provide the key for you.

As the maintainer of one of these third-party ressources, it means we need to make additional http requests to other sites and have to parse that info to (hopefully) find the correct public key to present.
This isn't only computationally wasteful and error-prone, it's also really inconvenient for everyone using the API.
(Anecdote: In the past one SOGS operator changed their public key, which resulted in conflicting public information about which key is the correct one. This resulted in confusion and made us implement a manual workaround to override found public keys with manual known good copies. Ideally this would just be a single API request.)

Since the information clearly is available on the server, I propose to make the public key available via the API.

@majestrate
Copy link
Contributor

would a /.well-known/sogs.ed25519 for a GET endpoint suffice?

@majestrate
Copy link
Contributor

we can use the /capabilities endpoint to signal when something like this is enabled.

we really do need a formal RFC style pipeline for these feature adds.

@KeeJef
Copy link
Collaborator

KeeJef commented Apr 11, 2023

In cases where the SOGS isn't using SSL wouldn't this be insecure, requesting the public key for a SOGS via an unsecured http request? It's expected that the public key be obtained out of band to secure against MITM, this seems like it would open that attack up

@KeeJef KeeJef added the enhancement New feature or request label Apr 11, 2023
@mdPlusPlus
Copy link
Contributor Author

For HTTP SOGS this problem exists anyway, since the only way to get their pubkey right now is to rely on the HTTP preview (Example: http://sog.caliban.org/r/privacy/) which can be MITM-ed, too.
Out-of-band postings of pubkeys suffer basically from the same problem as they are not signed.
At least that's my understanding of the situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants