fix(orchestrator): detect GitHub SAML SSO session expiry and prompt users to re-authorize#3253
Conversation
6776cee to
462448f
Compare
Changed Packages
|
3b658c2 to
6c068e2
Compare
6c068e2 to
1428c7e
Compare
| // TODO: This will be removed before merging, it's only here to simulate GitHub SAML SSO errors during developmen and testing. | ||
| if (localStorage.getItem('SIMULATE_SAML_SSO_ERROR') === 'true') { | ||
| const samlError = new Error( | ||
| 'GitHub SAML SSO session expired. Re-authorize at: https://github.com/orgs/test-org/sso', | ||
| ); | ||
| onSamlSsoError?.(samlError); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Added this block so reviewers can simulate this sso error by setting localStorage.setItem('SIMULATE_SAML_SSO_ERROR', true) in thee browser console.
This will be removed before merging.
Signed-off-by: Karthik <karthik.jk11@gmail.com>
Signed-off-by: Karthik <karthik.jk11@gmail.com>
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3253 +/- ##
==========================================
- Coverage 53.29% 53.27% -0.02%
==========================================
Files 2407 2408 +1
Lines 86420 86473 +53
Branches 23957 23972 +15
==========================================
+ Hits 46056 46070 +14
- Misses 38887 38929 +42
+ Partials 1477 1474 -3
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|



Hey, I just made a Pull Request!
Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3216
Changes included in this PR:
x-github-ssoresponse header when availableScreenshots:
How to Test:
Create these workflow and schema files:
packages/backend/.devModeTemp/repository/workflows/github-sso-test.sw.yamlpackages/backend/.devModeTemp/repository/workflows/schemas/github-sso-test-input-schema.jsonstart the application using
yarn devSet the simulate sso variable in localstorage
localStorage.setItem('SIMULATE_SAML_SSO_ERROR', true)Execute the
Github SSO Testworkflow by visiting http://localhost:3000/orchestrator/workflows/github-sso-test/executeNOTE:
SIMULATE_SAML_SSO_ERRORlogic is only added for the testing purpose, I will remove this before merging it.✔️ Checklist