Skip to content

Commit

Permalink
MSC2832: HS -> AS authorization header (#2832)
Browse files Browse the repository at this point in the history
* Proposal to fix homeserver -> appservice authorization

Signed-off-by: Tulir Asokan <tulir@maunium.net>

* Remove query parameter entirely instead of deprecating it

Signed-off-by: Tulir Asokan <tulir@maunium.net>

* Update title

Co-authored-by: Jonathan de Jong <jonathandejong02@gmail.com>

Co-authored-by: Jonathan de Jong <jonathandejong02@gmail.com>
  • Loading branch information
2 people authored and turt2live committed Jul 17, 2022
1 parent 3a05bd6 commit 5788b7d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions proposals/2832-appservice-auth-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# MSC2832: Homeserver -> Application Service authorization header
Most of the auth tokens in the spec are passed in the `Authorization` header,
with the `access_token` query parameter supported for backwards-compatibility.
For some reason, the application service spec was not updated in the same way
and it still requires using the archaic query parameter when the homeserver
pushes transactions to the appservice.

## Proposal
The `access_token` query parameter is removed from all requests made by the
homeserver to appservice and is replaced with the `Authorization` header with
`Bearer <token>` as the value.

### Backwards-compatibility
Homeservers which want to support old spec versions in the appservice API may
send both the query parameter and header. Similarly, appservices may accept the
token from either source.

## Security considerations
Not fixing this causes access tokens to be logged in many bridges.

## Alternatives
We could add a way for appservices to explicitly specify which spec version
they want in order to implement backwards-compatibility without sending both
tokens.

## Unstable prefix
The authorization header is already used in the client-server spec, and an
unstable prefix would just unnecessarily complicate things.

0 comments on commit 5788b7d

Please sign in to comment.