Commit b5ce48d
committed
fix(okta): use ID token to expose app-level group claims to backend
Okta app-level group claims (configured via Sign On → Group claim filter)
are embedded in the ID token only — they do not appear in the access token
or the /v1/userinfo response. Passing the ID token to the Keep API allows
the backend to read the `groups` claim directly from the JWT payload and
resolve the correct role via OKTA_*_GROUPS mappings.
Changes:
- auth.config.ts: use account.id_token instead of account.access_token for
Okta; refresh flow also returns the new id_token; remove non-standard
`groups` scope from the authorization request
- okta_authverifier.py: skip userinfo call when `groups` is already present
in the JWT (ID tokens cannot be used as bearer for the userinfo endpoint);
downgrade userinfo log to debug to reduce PII exposure1 parent 7734f31 commit b5ce48d
2 files changed
Lines changed: 22 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | | - | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| |||
258 | 263 | | |
259 | 264 | | |
260 | 265 | | |
261 | | - | |
262 | 266 | | |
263 | 267 | | |
264 | 268 | | |
| |||
363 | 367 | | |
364 | 368 | | |
365 | 369 | | |
366 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
367 | 374 | | |
368 | 375 | | |
369 | 376 | | |
| |||
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
109 | | - | |
110 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
| |||
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
124 | | - | |
| 132 | + | |
125 | 133 | | |
126 | 134 | | |
127 | 135 | | |
| |||
0 commit comments