-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MEN-7277 - show SSO info depending on configured SSO type #4423
Conversation
@mzedel, Let me know if you want to start the integration pipeline by mentioning me and the command "start pipeline". my commands and optionsYou can trigger a pipeline on multiple prs with:
You can start a fast pipeline, disabling full integration tests with:
You can trigger GitHub->GitLab branch sync with:
You can cherry pick to a given branch or branches with:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a slight problem when I choose OIDC as SSO method (see also the recording on priv):
in the dev mode:
helpers.js:534 Uncaught TypeError: _constants_organizationConstants_js__WEBPACK_IMPORTED_MODULE_6__.SSO_TYPES.find is not a function
at getSsoByType (helpers.js:534:47)
at organization.js:162:40
at handleChange (InputBase.js:364:1)
at SelectInput.js:291:1
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
at invokeGuardedCallback (react-dom.development.js:4277:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
at executeDispatch (react-dom.development.js:9041:1)
at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1)
and in regular prod build:
helpers.js:534 Uncaught TypeError: u.c0.find is not a function
at ne (helpers.js:534:47)
at organization.js:162:28
at onChange (InputBase.js:364:7)
at SelectInput.js:291:9
at Object.Re (react-dom.production.min.js:54:317)
at ze (react-dom.production.min.js:54:471)
at react-dom.production.min.js:55:35
at Nn (react-dom.production.min.js:105:68)
at Bn (react-dom.production.min.js:106:380)
at react-dom.production.min.js:117:104
Thanks for taking a look @merlin-northern! Based on this error I looked again into the API specs for the SSO config retrieval here and I think for this task to provide a correct set of links the backend needs to return the type of config along with the |
I can fix that. |
…pe of SSO - slightly improved encapsulation of SSO method information Ticket: None Changelog: Title Signed-off-by: Manuel Zedel <manuel.zedel@northern.tech>
…f SSO configured Ticket: MEN-7277 Changelog: Title Signed-off-by: Manuel Zedel <manuel.zedel@northern.tech>
Merging these commits will result in the following changelog entries: Changelogsgui (men-7277)New changes in gui since master: Bug Fixes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. also tested with the SAML and OIDC metadata upload and start of the login process.
if (contentType.includes(APPLICATION_JSON_CONTENT_TYPE)) { | ||
const { id } = response; | ||
const ssoLoginUrl = getSsoStartUrlById(id); | ||
const { id, kind } = response; | ||
const type = kind.split('/')[1]; | ||
const ssoLoginUrl = SSO_TYPES[type].getStartUrl(id); | ||
window.location.replace(ssoLoginUrl); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I havent tested this flow, lets do it on staging.
Hello 😺 This PR contains changelog entries. Please, verify the need of backporting it to the following release branches: |
No description provided.