Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Move access_tokens out of query params (SYN-299) #1290

Closed
matrixbot opened this issue Mar 9, 2015 · 5 comments
Closed

Move access_tokens out of query params (SYN-299) #1290

matrixbot opened this issue Mar 9, 2015 · 5 comments
Labels
z-auth (Deprecated Label) z-feature (Deprecated Label)

Comments

@matrixbot
Copy link
Member

Using access_tokens in query params is really quite insecure. We should do some combination of:

  • Allow access_token in header
  • Use a hmac scheme with and/or without expiration.

(Imported from https://matrix.org/jira/browse/SYN-299)

(Reported by @erikjohnston)

@matrixbot
Copy link
Member Author

Jira watchers: @erikjohnston @richvdh

@matrixbot
Copy link
Member Author

matrixbot commented Mar 9, 2015

Links exported from Jira:

relates to SPEC-112
relates to #1403
relates to SYN-259

@matrixbot
Copy link
Member Author

We now use macaroons, but the token is still in the query param, so presumably still suffers the same problems

-- @richvdh

@matrixbot
Copy link
Member Author

matrixbot commented Mar 1, 2016

(copied from SPEC-112)

So, this bug had a few references to Macaroons, but I feel that none of the posts that did so explained how Macaroons help - so I'll try and do so.

The really nice thing with Macaroons is that anyone can further constrain them, but nobody can remove a constraint once it's added. This allows the client to constrain the macaroon sent back to the server to a very short lifetime (on the order of seconds), while the one it actually holds may have a very long validity period indeed. If anyone sniffs the in-flight Macaroon, it will (by and large) be useless too soon to do them any good.

In addition, it can be constrained to the operation in question (if Synapse supported such caveats), so the sniffed macaroon would (say) only be usable for sending messages (and not state events), or perhaps even only to a specific room.

It can also be constrained to the user's external IP, which helps even more.

This would (partially) resolve #1290, too, so I'm copying it there, although TBH the right solution to that is probably "Authorization: Macaroon "

-- Alex Elsayed

@matrixbot matrixbot added z-auth (Deprecated Label) z-feature (Deprecated Label) labels Nov 7, 2016
@matrixbot matrixbot changed the title Move access_tokens out of query params (SYN-299) Move access_tokens out of query params (https://github.com/matrix-org/synapse/issues/1290) Nov 7, 2016
@matrixbot matrixbot changed the title Move access_tokens out of query params (https://github.com/matrix-org/synapse/issues/1290) Move access_tokens out of query params (SYN-299) Nov 7, 2016
@richvdh
Copy link
Member

richvdh commented Mar 7, 2017

I believe this was fixed by #1098.

@richvdh richvdh closed this as completed Mar 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-auth (Deprecated Label) z-feature (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

2 participants