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

[Bug]: Unable to use custom Okta URL #3104

Open
1 task
jmeekinsint opened this issue Sep 25, 2024 · 1 comment
Open
1 task

[Bug]: Unable to use custom Okta URL #3104

jmeekinsint opened this issue Sep 25, 2024 · 1 comment
Labels
category:provider_config general-usage General help/usage questions

Comments

@jmeekinsint
Copy link

Terraform CLI Version

1.7.3

Terraform Provider Version

0.95.0

Terraform Configuration

provider "snowflake" {
  user               = "svc_account" # required if not using profile or token. Can also be set via SNOWFLAKE_USER env var
  password               = "svc_account_password"
  authenticator     = "Okta"
  okta_url = "https://myapps.custom.com"
  role      = "APP_ADMIN"
  account = "xxxxxx.us-east-1" # Specify the Snowflake account and region
}

Category

category:provider_config

Object type(s)

No response

Expected Behavior

Ability to authentication using service account

Actual Behavior

Planning failed. Terraform encountered an error while generating this plan.


│ Error: open snowflake connection: 260011: failed to parse an authenticator: https://myapps.custom.com

│ with provider["registry.terraform.io/snowflake-labs/snowflake"],
│ on main.tf line 24, in provider "snowflake":
│ 24: provider "snowflake" {

Steps to Reproduce

Copy terraform provider information from problem.

Run terraform plan

IF you change url to have *.okta.com you get a different error - The specified authenticator is not accepted by your Snowflake account configuration. Please contact your local system administrator to get the correct URL to use.

How much impact is this issue causing?

Medium

Logs

No response

Additional Information

No response

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@jmeekinsint jmeekinsint added the bug Used to mark issues with provider's incorrect behavior label Sep 25, 2024
@sfc-gh-jmichalak
Copy link
Collaborator

Hi @jmeekinsint 👋
Okta URL host needs to to have a suffix okta.com (from the driver documentation):

To authenticate through Okta, specify https://<okta_account_name>.okta.com (URL prefix for Okta).

We are currently reworking the provider configuration, and we will adjust our documentation to be more descriptive.
About the second error, have you followed the instructions at https://docs.snowflake.com/en/user-guide/oauth-okta? It looks like a misconfiguration on your side, because this error comes from Snowflake.

@sfc-gh-jmichalak sfc-gh-jmichalak added general-usage General help/usage questions category:provider_config and removed bug Used to mark issues with provider's incorrect behavior labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:provider_config general-usage General help/usage questions
Projects
None yet
Development

No branches or pull requests

2 participants