-
Notifications
You must be signed in to change notification settings - Fork 87
remove api token and addition access key #6960
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Greptile OverviewGreptile SummaryThis PR migrates the Okta connector from legacy API token authentication to OAuth2 access token authentication. The changes deprecate the Key changes:
Issues identified:
Confidence Score: 3/5
Important Files ChangedFile Analysis
|
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.
14 files reviewed, 3 comments
src/fides/api/schemas/connection_configuration/connection_secrets_okta.py
Show resolved
Hide resolved
|
|
||
| client_config: | ||
| protocol: http | ||
| protocol: https |
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.
style: protocol change from http to https appears unrelated to OAuth2 migration. Check that this doesn't break existing test expectations for the mock server.
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.
Does this pass tests in CI, of so, keep
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (82.06%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## main #6960 +/- ##
==========================================
- Coverage 87.32% 82.06% -5.26%
==========================================
Files 525 525
Lines 34418 34477 +59
Branches 3960 3970 +10
==========================================
- Hits 30055 28295 -1760
- Misses 3500 5361 +1861
+ Partials 863 821 -42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| api_token: Optional[str] = Field( | ||
| default=None, | ||
| title="API Token (Deprecated)", | ||
| description="Legacy API token (ignored). Configure OAuth2 Client Credentials instead.", | ||
| json_schema_extra={"sensitive": True, "deprecated": True}, | ||
| ) |
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.
This will be removed in fast follow, correct?
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.
The idea behind keeping this field is to ensure that existing integrations relying on it elsewhere don't inadvertently affect other parts of the functionality. For now, I've only left it referenced; I'd probably go ahead and remove this field only once I'm confident that the Okta access tokens are properly integrated and nothing breaks as a result.
| if self.configuration.secrets.get("api_token"): | ||
| logger.warning( | ||
| "Deprecated Okta API token detected in secrets. This value is ignored; " | ||
| "configure OAuth2 Client Credentials instead." | ||
| ) |
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.
Where is this secret set? Does this actually exist? ... this is just for bridge support right now, correct? Will be removed for GA?
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.
Also, all other api_token references need to be cleaned up in follow up PR
https://github.com/ethyca/fides/search?q=api_token
https://github.com/ethyca/fides/search?q=OKTA_API_TOKEN
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.
this is just for okta? just want to confirm
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.
perhaps rename or confirm
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.
same here, is this ONLY idp/okta?
stephenkiers
left a comment
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.
Left comments. Also want you to confirm the changes to the tests are ONLY for okta oauth, they seem generic and overreaching
|
Just a drive by comment since Github auto-tagged me. I agree with @stephenkiers on this:
Too many SaaS-related files got caught up in this change. We should roll these back so we don't give the impression later that SaaS functionality changed in this PR. |
Ticket ENG-1916
https://ethyca.atlassian.net/browse/ENG-1916
Description Of Changes
Analyzed existing OAuth2 client-credentials patterns to guide the Okta worker migration and removed the remaining Okta API-token legacy usage so the connector now expects OAuth2-only secrets. Adjusted schemas, fixtures, configs, and tests to align with the new access-token fields while warning if a legacy token is still supplied.
Code Changes
reviewed existing OAuth2 client-credentials strategy implementations and documented reusable patterns (analysis only; no code changes required)
removed api_token handling from OktaConnector and introduced _get_oauth_access_token() erroring when OAuth2 secrets are missing
updated OktaSchema to deprecate/ignore api_token, surface access_token, and adjusted connection model defaults
refreshed SaaS YAML fixtures, integration tests, and Okta connection fixtures to rely on access_token
ensured Nox/test helpers reference OAuth2 environment variables instead of legacy API-token settings
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works