-
Notifications
You must be signed in to change notification settings - Fork 171
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-1825482: PAT + OAuth Authorization Code + OAuth Client Credentials support #1978
Open
sfc-gh-dheyman
wants to merge
41
commits into
master
Choose a base branch
from
oauth-code-flow
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,943
−227
Open
Changes from 38 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
1741680
Draft OAuth authz code flow
sfc-gh-dheyman 195ff36
Refactor
sfc-gh-dheyman a3dad01
Implement full flow
sfc-gh-dheyman 0982aaf
Add wiremock test
sfc-gh-dheyman 4acd8df
refactored
sfc-gh-dheyman 214c98c
Add test scenarios
sfc-gh-dheyman dc55937
Added support for Okta oauth authorization code flow
sfc-gh-dheyman 857d8a2
Add logs
sfc-gh-dheyman dc578a7
Merge branch 'master' into oauth-code-flow
sfc-gh-dheyman 4662dfc
format
sfc-gh-dheyman c110329
Merge branch 'oauth-code-flow' of github.com:snowflakedb/snowflake-jd…
sfc-gh-dheyman 06b0e24
reformat
sfc-gh-dheyman 86d61ef
Fix shading
sfc-gh-dheyman c8de884
Extracted wiremock config to files
sfc-gh-dheyman 77a9ce0
linkage checker
sfc-gh-dheyman 9365dbf
CR suggestions applied
sfc-gh-dheyman 971ba0d
CR suggestions applied
sfc-gh-dheyman 538d61b
CR
sfc-gh-dheyman c8af6a8
Reformat
sfc-gh-dheyman b1b7854
Fix attempt at flaky wiremock tests
sfc-gh-dheyman 26e67d6
Add internal api
sfc-gh-dheyman e32e81b
Merge branch 'master' of github.com:snowflakedb/snowflake-jdbc into o…
sfc-gh-dheyman e346a58
SNOW-1831099: OAuth Client Credentials Flow Implementation (#1993)
sfc-gh-dheyman 05565c7
Merge branch 'master' of github.com:snowflakedb/snowflake-jdbc into o…
sfc-gh-dheyman 1e4971c
Added copyright
sfc-gh-dheyman e8dc943
Refactor
sfc-gh-dheyman a45009a
SNOW-1825471: PAT authentication support (#1995)
sfc-gh-dheyman 862b250
Add response from redirect server
sfc-gh-dheyman 0312556
SNOW-1831103/SNOW-1853435: Refresh token & OAuth tokens caching suppo…
sfc-gh-dheyman 53a307b
Merge branch 'master' into oauth-code-flow
sfc-gh-dheyman db9949c
Remove unnecessary import from AbstractDriverIT
sfc-gh-dheyman 2b3328f
Add authorization code redirect request handler & tests
sfc-gh-dheyman cb7fad0
Refactor log
sfc-gh-dheyman a073c6b
CR suggestions applied
sfc-gh-dheyman 5c9d8eb
Remove import
sfc-gh-dheyman 935acb9
Add fixes
sfc-gh-dheyman cdff04e
Remove obsolete config
sfc-gh-dheyman fa3761b
Merge branch 'master' into oauth-code-flow
sfc-gh-dheyman 9100523
CR suggestions applied
sfc-gh-dheyman 00ac44a
Merge branch 'oauth-code-flow' of github.com:snowflakedb/snowflake-jd…
sfc-gh-dheyman 3a3c8e7
Conflicts resolved
sfc-gh-dheyman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/net/snowflake/client/core/CachedCredentialType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we update the year? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
*/ | ||
|
||
package net.snowflake.client.core; | ||
|
||
enum CachedCredentialType { | ||
ID_TOKEN("ID_TOKEN"), | ||
MFA_TOKEN("MFATOKEN"), | ||
OAUTH_ACCESS_TOKEN("OAUTH_ACCESS_TOKEN"), | ||
OAUTH_REFRESH_TOKEN("OAUTH_REFRESH_TOKEN"); | ||
|
||
private final String value; | ||
|
||
CachedCredentialType(String value) { | ||
this.value = value; | ||
} | ||
|
||
String getValue() { | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we need this parameter in the final code? When are we planning to drop this flag?
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.
We will drop this as soon as backend is ready. I'll create a Jira for it.