You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function, validateURLs, in lib/authentication/auth_okta.js has an "!" on line 174 that needs to be removed. Currently, the function is throwing an error when the auth url and sso url match, when it should only be throwing the error when those two values do NOT match. Removing the "!" would fix this validation.
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of NodeJS driver are you using? v20.12.2
What operating system and processor architecture are you using? Ubuntu 22.04
What version of NodeJS are you using?
(node --version and npm --version) v20.12.2
What are the component versions in the environment (npm list)? [email protected]
5.Server version:* E.g. 1.90.1
You may get the server version by running a query:
SELECT CURRENT_VERSION();
8.14.2
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
Attempted to connect to Snowflake using Okta Authentication
var snowflake = require('snowflake-sdk');
snowflake.configure(
{
logLevel: 'trace'
});
The auth url being passed in the code block above is: https://org-name.okta.com
The sso url that is returned when attempting login with the code block above is: https://org-name.okta.com/...
The hosts and protocols match in both urls, but the validateURLs function is incorrectly returning a mismatch due to the "!" on line 174, resulting in this error message: Unable to connect: The prefix of the SSO/token URL and the specified authenticator do not match.
When the "!" is removed from line 174 in the validateURLs function, the following success message is printed: Successfully connected as id: <connection_id>
What is your Snowflake account identifier, if any? (Optional)
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Remove "!" From Okta Authentication validateURLs Function in lib/authentication/auth_okta.js line 174
SNOW-1332126: Remove "!" From Okta Authentication validateURLs Function in lib/authentication/auth_okta.js line 174
Apr 16, 2024
The function,
validateURLs
, inlib/authentication/auth_okta.js
has an "!" on line 174 that needs to be removed. Currently, the function is throwing an error when the auth url and sso url match, when it should only be throwing the error when those two values do NOT match. Removing the "!" would fix this validation.Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of NodeJS driver are you using?
v20.12.2
What operating system and processor architecture are you using?
Ubuntu 22.04
What version of NodeJS are you using?
(
node --version
andnpm --version
)v20.12.2
What are the component versions in the environment (
npm list
)?[email protected]
5.Server version:* E.g. 1.90.1
You may get the server version by running a query:
8.14.2
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
Attempted to connect to Snowflake using Okta Authentication
What did you expect to see?
What should have happened and what happened instead?
What should have happened:
Successfully connected as id: <connection_id>
What happened instead:
Unable to connect: The prefix of the SSO/token URL and the specified authenticator do not match.
If the "!" is removed from the
validateURLs
function, the library behaves as expected and Okta authentication is successful.Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
e.g
Add this to get standard output.
The auth url being passed in the code block above is:
https://org-name.okta.com
The sso url that is returned when attempting login with the code block above is:
https://org-name.okta.com/...
The hosts and protocols match in both urls, but the validateURLs function is incorrectly returning a mismatch due to the "!" on line 174, resulting in this error message:
Unable to connect: The prefix of the SSO/token URL and the specified authenticator do not match.
When the "!" is removed from line 174 in the
validateURLs
function, the following success message is printed:Successfully connected as id: <connection_id>
The text was updated successfully, but these errors were encountered: