Skip to content

Commit 8bbf17d

Browse files
committed
MSC4305: Pushed Authorization Requests (PARs) for OAuth authentication
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
1 parent 5beaf2e commit 8bbf17d

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

proposals/4305-par.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# MSC4305: Pushed Authorization Requests (PARs) for OAuth authentication
2+
3+
Matrix v1.15 introduced [new authentication APIs] based on OAuth 2.0. Clients can discover the
4+
authorization server's metadata via [`GET /_matrix/client/v1/auth_metadata`] and then use the
5+
`authorization_endpoint` to initiate the login process. This requires the client to pass
6+
authorization request parameters via URL query parameters which has [a number of downsides]
7+
including the inablity to ensure cryptographic integrity, authenticity and confidentiality as well
8+
as URL length issues.
9+
10+
[RFC9126] introduces Pushed Authorization Requests (PARs) which let clients push authorization
11+
request payloads directly to the authorization server in exchange for a request URI to be used in a
12+
subsequent authorization request. PARs can be used in conjunction with other mechansisms such as
13+
[RFC9101] to address the security issues mentioned above.
14+
15+
This proposal introduces PARs into the new Matrix authentication APIs.
16+
17+
## Proposal
18+
19+
Two new properties are added to the response of [`GET /_matrix/client/v1/auth_metadata`]:
20+
21+
- `pushed_authorization_request_endpoint` (URI): The authorization server's PAR endpoint as per
22+
[RFC9126].
23+
- `require_pushed_authorization_requests` (boolean): Whether the authorization server accepts
24+
authorization requests *exclusively* via PAR. Defaults to `false` if omitted.
25+
26+
Specifics of how PARs integrate into other OAuth APIs can be found in [RFC9126]. In particular, the
27+
authorization endpoint MUST accept the PAR URI in a `request_uri` query parameter. Furthermore, the
28+
authorization server MAY enforce the use of PARs on a per-client basis using the
29+
`require_pushed_authorization_requests` property within the client metadata during dynamic client
30+
registration.
31+
32+
## Potential issues
33+
34+
None.
35+
36+
## Alternatives
37+
38+
None.
39+
40+
## Security considerations
41+
42+
None beyond the [considerations] in RFC9126.
43+
44+
## Unstable prefix
45+
46+
Until this proposal is accepted into the spec, implementations SHOULD refer to
47+
`pushed_authorization_request_endpoint` and `require_pushed_authorization_requests` as
48+
`de.gematik.msc4305.pushed_authorization_request_endpoint` and
49+
`de.gematik.msc4305.require_pushed_authorization_requests`, respectively.
50+
51+
## Dependencies
52+
53+
None.
54+
55+
[new authentication APIs]: https://spec.matrix.org/v1.15/client-server-api/#oauth-20-api
56+
[`GET /_matrix/client/v1/auth_metadata`]: https://spec.matrix.org/v1.15/client-server-api/#get_matrixclientv1auth_metadata
57+
[a number of downsides]: https://datatracker.ietf.org/doc/html/rfc9126#name-introduction
58+
[RFC9126]: https://datatracker.ietf.org/doc/html/rfc9126
59+
[RFC9101]: https://datatracker.ietf.org/doc/html/rfc9101
60+
[considerations]: https://datatracker.ietf.org/doc/html/rfc9126#name-security-considerations

0 commit comments

Comments
 (0)