-
Notifications
You must be signed in to change notification settings - Fork 5
SK-2505: Add support for custom tokenUri #271
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
SK-2505: Add support for custom tokenUri #271
Conversation
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
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.
Pull request overview
This PR adds support for custom token URIs to enable Bring Your Own Cloud (BYOC) integrations while maintaining backward compatibility. The implementation allows users to optionally specify a custom token endpoint through the tokenUri field in credentials.
Changes:
- Added
tokenUrifield to theCredentialsclass with getter/setter methods - Updated token generation logic in
BearerTokenandSignedDataTokensto support custom token URIs with validation - Enhanced error messaging for invalid token URI scenarios
- Added comprehensive test coverage for various token URI scenarios (valid, null, empty, invalid, HTTP/HTTPS)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/skyflow/config/Credentials.java | Added tokenUri field with getter/setter methods |
| src/main/java/com/skyflow/utils/Utils.java | Updated bearer token generation to conditionally use custom tokenUri |
| src/main/java/com/skyflow/utils/validations/Validations.java | Added validation for tokenUri format |
| src/main/java/com/skyflow/serviceaccount/util/BearerToken.java | Implemented tokenUri override logic in bearer token generation |
| src/main/java/com/skyflow/serviceaccount/util/SignedDataTokens.java | Implemented tokenUri override logic in signed data token generation |
| src/main/java/com/skyflow/errors/ErrorMessage.java | Updated error message for invalid token URI |
| src/test/java/com/skyflow/utils/UtilsTests.java | Added tests for tokenUri handling in Utils class |
| src/test/java/com/skyflow/serviceaccount/util/BearerTokenTests.java | Added comprehensive tests for bearer token with custom tokenUri |
| src/test/java/com/skyflow/serviceaccount/util/SignedDataTokensTests.java | Added comprehensive tests for signed data tokens with custom tokenUri |
| src/test/java/com/skyflow/SkyflowTests.java | Added tests for Skyflow client initialization with custom tokenUri |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/test/java/com/skyflow/serviceaccount/util/SignedDataTokensTests.java
Show resolved
Hide resolved
src/main/java/com/skyflow/serviceaccount/util/SignedDataTokens.java
Outdated
Show resolved
Hide resolved
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
Why
Outcome