-
Notifications
You must be signed in to change notification settings - Fork 30
SNOW-2252444: Incorrect Error Message Displayed During Okta Authentication #913
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
base: master
Are you sure you want to change the base?
Conversation
…e testing purpose code
| { | ||
| CXX_LOG_WARN("sf::IAuthenticatorOKTA::authenticate::Fail to get one time token response, response body=%s.", | ||
| picojson::value(respData).serialize().c_str()); | ||
| m_errMsg = "SFAuthenticatorVerificationFailed::authenticate::Fail to get one time token response."; |
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.
This hides real reason in m_idp->m_errMsg. Auth tests failed:
[2025-08-07T18:01:37.120Z] 78: [ ERROR ] --- "SFAuthenticatorVerificationFailed::authenticate::Fail to get one time token response." != "Incorrect username or password was specified."
[2025-08-07T18:01:37.120Z] 78: [ FAILED ] test_okta_wrong_credentials
and
[2025-08-07T18:01:58.084Z] 78: [ ERROR ] --- strstr(error->msg, "SAML response is invalid or matching user is not found. Contact your local system administrator and provide the error code") != NULL
[2025-08-07T18:01:58.084Z] 78: [ FAILED ] test_external_browser_wrong_credentials
| { | ||
| IAuthenticatorOKTA::authenticate(); | ||
| if ((m_connection->error).error_code == SF_STATUS_SUCCESS && (isError() || m_idp->isError())) | ||
| if (isError() || m_idp->isError()) |
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.
Or maybe this hides real IDP error message?
| continue; | ||
| } | ||
| CXX_LOG_ERROR("SF::IAuthenticatorOKTA::authenticate::Failed to get the saml response. response body=%s.", picojson::value(resp).serialize().c_str()); | ||
| m_errMsg = "SFAuthenticatorVerificationFailed::authenticate::Failed to get the saml response."; |
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.
Same here, m_idp->m_errMsg will be ignored if we set m_errMsg.
No description provided.