Skip to content
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

SNOW-1692674: Unable to auth with custom Okta url #1213

Closed
jmeekinsint opened this issue Sep 26, 2024 · 9 comments
Closed

SNOW-1692674: Unable to auth with custom Okta url #1213

jmeekinsint opened this issue Sep 26, 2024 · 9 comments
Assignees
Labels
enhancement The issue is a request for improvement or a new feature status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team

Comments

@jmeekinsint
Copy link

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of GO driver are you using?
    Latest Version

  2. What operating system and processor architecture are you using?
    OSX - intel

  3. What version of GO are you using?
    run go version in your console

4.Server version:* E.g. 1.90.1
You may get the server version by running a query:

SELECT CURRENT_VERSION();
  1. What did you do?

When using Okta custom url for the okta_url - unable to authentication because it only accepts *.okta.com

  1. What did you expect to see?

I would like to see the ability to provide the custom okta url for authentication

@jmeekinsint jmeekinsint added the bug Erroneous or unexpected behaviour label Sep 26, 2024
@github-actions github-actions bot changed the title Unable to auth with custom Okta url SNOW-1692674: Unable to auth with custom Okta url Sep 26, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Sep 27, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage Issue is under initial triage status-information_needed Additional information is required from the reporter labels Sep 27, 2024
@sfc-gh-dszmolka
Copy link
Contributor

sfc-gh-dszmolka commented Sep 27, 2024

hi - thanks for raising this. can you please provide the relevant configuration bit from your program, how you configure the authenticator ? of course if needed, please mask out the actual URL, i would like to see the format only. thank you !

edit reason for asking because if you configure authentication: https://<somehost> then it must indeed end with .okta.com at this moment because this scenario would be the configuration Native Okta and at this moment it must be .okta.com as documented

at this moment no other (custom) format for Native Okta is supported, of course this can be handled as a feature request to support it. but first it would be great to get confirmation about how you use the authenticator.

@jmeekinsint
Copy link
Author

jmeekinsint commented Oct 1, 2024

Example of this would be - dsn := "serviceaccount:password@accountname/dbname/schemaname?authenticator=https://myapps.companyname.com"

where https://myapps.companyname.com is the main Okta url used and configured within snowflake.

Python does allow for this type of connection using the python snowflake connector library.

example:

sfAccount: str = 'account', # Put Account Name here from the SF URL (left of .snowflake.com)
sfauthenticator: str = 'https://myapps.example.com/snowflake/okta', # Put the Authenticator URL here

ctx = snowflake.connector.connect(
    user='[email protected]',
    password='xxxxx',
    account=sfAccount,
    authenticator=sfauthenticator,
)
cs = ctx.cursor()
print(cs)

@sfc-gh-dszmolka
Copy link
Contributor

thank you for sending the example; good to confirm your use-case indeed relevant to the Native Okta authenticator, and especially using custom domain for the IdP.

indeed, PythonConnector and some other drivers (for example the node.js one) already support custom URL for Native Okta auth, gosnowflake doesn't support it yet. we'll look at this enhancement request and i'll keep this ticket posted with the progress (no timeline estimated)

@sfc-gh-dszmolka sfc-gh-dszmolka added enhancement The issue is a request for improvement or a new feature status-triage_done Initial triage done, will be further handled by the driver team and removed bug Erroneous or unexpected behaviour status-triage Issue is under initial triage status-information_needed Additional information is required from the reporter labels Oct 1, 2024
@jmeekinsint
Copy link
Author

Thank you, I do see some other support. My main use case is related to terraform which is written to use the Go driver as of now.

@sfc-gh-dszmolka
Copy link
Contributor

got you, so externalbrowser is probably not an alternative for you. until this gets implemented (and, Snowflake Terraform Provider rebased on the future gosnowflake version which will support custom Okta URL..), would keypair or oauth authentications be a workaround for you? both allow for noninteractive auth and already supported by gosnowflake

@sfc-gh-dszmolka sfc-gh-dszmolka added the status-pr_pending_merge A PR is made and is under review label Oct 8, 2024
@sfc-gh-dszmolka
Copy link
Contributor

PR under review #1216

@sfc-gh-dszmolka sfc-gh-dszmolka added status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. and removed status-pr_pending_merge A PR is made and is under review labels Oct 8, 2024
@sfc-gh-dszmolka
Copy link
Contributor

PR is merged and will be part of the next upcoming release cycle. (Usually we release towards end of a given month)

@jmeekinsint
Copy link
Author

jmeekinsint commented Oct 8, 2024 via email

@sfc-gh-dszmolka
Copy link
Contributor

released with v1.12.0 in October 2024 release cycle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is a request for improvement or a new feature status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

3 participants