Skip to content

Commit 3297d37

Browse files
MSC2832: HS -> AS authorization header (#2832)
* Proposal to fix homeserver -> appservice authorization Signed-off-by: Tulir Asokan <[email protected]> * Remove query parameter entirely instead of deprecating it Signed-off-by: Tulir Asokan <[email protected]> * Update title Co-authored-by: Jonathan de Jong <[email protected]> Co-authored-by: Jonathan de Jong <[email protected]>
1 parent 3f0ba9c commit 3297d37

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

proposals/2832-appservice-auth-fix.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# MSC2832: Homeserver -> Application Service authorization header
2+
Most of the auth tokens in the spec are passed in the `Authorization` header,
3+
with the `access_token` query parameter supported for backwards-compatibility.
4+
For some reason, the application service spec was not updated in the same way
5+
and it still requires using the archaic query parameter when the homeserver
6+
pushes transactions to the appservice.
7+
8+
## Proposal
9+
The `access_token` query parameter is removed from all requests made by the
10+
homeserver to appservice and is replaced with the `Authorization` header with
11+
`Bearer <token>` as the value.
12+
13+
### Backwards-compatibility
14+
Homeservers which want to support old spec versions in the appservice API may
15+
send both the query parameter and header. Similarly, appservices may accept the
16+
token from either source.
17+
18+
## Security considerations
19+
Not fixing this causes access tokens to be logged in many bridges.
20+
21+
## Alternatives
22+
We could add a way for appservices to explicitly specify which spec version
23+
they want in order to implement backwards-compatibility without sending both
24+
tokens.
25+
26+
## Unstable prefix
27+
The authorization header is already used in the client-server spec, and an
28+
unstable prefix would just unnecessarily complicate things.

0 commit comments

Comments
 (0)