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

feat(ingest/snowflake): Okta OAuth support; update docs #8157

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

asikowitz
Copy link
Collaborator

  • Moves some code around / renames for code cleanliness
  • Removes Optionals and adds an Enum for OauthConfiguration, to simplify logic
  • Updates docs
    • Adds rough Okta OAuth instructions
    • Adds qualifier for the OPERATE permission

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jun 1, 2023
+ Ensure client authentication method is `Client secret`
- Create an Okta user to sign into, noting the `Username` and `Password`
- Create a Snowflake user to correspond to your newly created Okta client credentials
+ *Ensure the user's `Login Name` matches your Okta user's `Username` (likely a password)*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean -
likely a password?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, supposed to be email, thx

raise ValueError(
f"'oauth_config.scopes' was none "
f"but should be set when using {v} authentication"
"Certificate authentication is not supported for Okta."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is always true for okta, it would help to move this to a validator in OAuthConfiguration .

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure you can set up okta auth with public / private keys, I just couldn't get it to work easily with snowflake

Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't say i fully understand what's going on here, but overall seems good

logger.info(f"using authenticator type '{v}'")
return v
elif oauth_config.client_secret is None:
raise ValueError(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can some of this validation logic live on the OAuthConfiguration object?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, but I'm not sure what will be snowflake specific and what won't just yet.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for updating these docs

@asikowitz asikowitz merged commit 9fa8489 into datahub-project:master Jun 7, 2023
@asikowitz asikowitz deleted the snowflake-okta-oauth branch June 7, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants