Repository navigation
Commit f2421ca
committed
Answer a cancelled authentication with access_denied
When the End-User cancels the authentication, the client now gets an
access_denied error at its redirect URI, with the request's state and iss,
in the request's response mode (RFC 6749 sections 4.1.2.1 and 4.2.2.1),
instead of SimpleSAMLphp's error page. A cancel is SimpleSAMLphp's
UserAborted, raised through the authentication state by an authentication
source or an authentication processing filter which lets the End-User
cancel. Every other authentication error keeps SimpleSAMLphp's handling.
The FAPI 2.0 "user rejects authentication" test of the OpenID4VCI HAIP
plan needs this (HT2 of the HAIP plan).
- Every login the module starts for an authorization request, including
the re-authentication prompt=login or an expired max_age asks for, gets
SimpleSAMLphp's ErrorURL (the authorization endpoint) and the redirect
to answer the client at (AuthorizationErrorRedirect) in its state. The
processing chain's state gets the same exception handler URL and
redirect, and a cancel raised in-request out of processState() is
answered directly.
- The authorization endpoint hands a request carrying SimpleSAMLphp's
exception state id to AuthenticationService::rethrowAuthenticationException(),
which answers a cancel with access_denied and throws anything else as
it was raised.
- A cancel is the response to a pushed authorization request, so it
consumes the request first, as a successful response does: one
request_uri yields at most one response, and a request_uri consumed
meanwhile is refused.
- An authentication handed back with an exception clears the session's
mark that a login was performed, so that after a failed or cancelled
re-authentication the earlier session is not taken for a fresh login.
- The redirect keeps the response mode by its value: the form_post one
holds the services which render its page, which must not go into the
session. ResponseModeInterface gains getMode(), and ResponseModeResolver
finds the response mode of a value.
- The conformance image gets a test-only module, oidcconformance, whose
authentication source extends exampleauth:UserPass: logging in as
`cancel` cancels, since SimpleSAMLphp's login page has no cancel
button. The proxied introspection harness mounts it too.
- Docs: the upgrade guide and the Authentication Processing filters
section say how a cancel is answered and how a filter raises one.1 parent 2866b49 commit f2421ca
31 files changed
Lines changed: 1239 additions & 39 deletions
File tree
- docker
- proxied-introspection-harness
- ssp
- modules/oidcconformance/src/Auth/Source
- docs
- src
- Controllers
- Server
- RequestRules/Rules
- ResponseModes
- Services
- ValueAbstracts
- tests/unit/src
- Controllers
- Server
- RequestRules/Rules
- ResponseModes
- Services
- ValueAbstracts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
1213 | 1221 | | |
1214 | 1222 | | |
1215 | 1223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
879 | 890 | | |
880 | 891 | | |
881 | 892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| |||
0 commit comments