Commit 2ccbd39
AAP-56394 Fix SAML authentication uid selection (ansible#871)
The determine_username_from_uid_social pipeline was selecting the
'username' value from the pipeline kwargs/details, which is generally
correct for most authenticators, however for SAML specifically the 'uid'
is not the exact username, but the username prepended with 'IdP:' (hard
coded for our SAML authenticators). The incorrect use of 'username' was
causing the AuthenticatorUser not to be found. This was OK in the case
that another user didn't exist with the same email, but if such a user
does exist, the authentication process errors out with a "more than one
user found" error, blocking the SAML user from logging in permanently
unless the "conflicting" local user was removed.
---------
Co-authored-by: Bryan Havenstein <[email protected]>
Co-authored-by: Claude <[email protected]>1 parent 011f49c commit 2ccbd39
File tree
2 files changed
+25
-1
lines changed- ansible_base/authentication/utils
- test_app/tests/authentication/utils
2 files changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
252 | 273 | | |
253 | 274 | | |
254 | 275 | | |
| |||
0 commit comments