-
Notifications
You must be signed in to change notification settings - Fork 359
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: SSO Improvement - alter user_sessions
table to include access token, implement CRUD ops, GET, POST, PATCH APIs and det token
CLIs
#9867
Conversation
✅ Deploy Preview for determined-ui canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9867 +/- ##
==========================================
- Coverage 54.42% 54.37% -0.05%
==========================================
Files 1262 1268 +6
Lines 158880 159302 +422
Branches 3631 3630 -1
==========================================
+ Hits 86463 86626 +163
- Misses 72283 72542 +259
Partials 134 134
Flags with carried forward coverage won't be shown. Click here to find out more.
|
long_lived_tokens
table and implement CRUD operations
long_lived_tokens
table and implement CRUD operationslong_lived_tokens
table, implement CRUD operations, create APIs
long_lived_tokens
table, implement CRUD operations, create APIslong_lived_tokens
table, implement CRUD operations, create GET, POST, DELETE APIs
user_sessions
table to include access token, implement CRUD ops, GET, POST, PATCH APIs and CLIsuser_sessions
table to include access token, implement CRUD ops, GET, POST, PATCH APIs and det token
CLIs
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.
nice work on this, it's come a long way!
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.
LGTM
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.
I'm continuing to review, but this is my feedback so far.
master/static/migrations/20241010174718_alter-user-session-add-access-token-info.tx.up.sql
Outdated
Show resolved
Hide resolved
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.
Continuing to review, submitting some in-progress minor feedback
… REVOKE own access tokens (#10064)
Ticket
This is a feature branch for SSO Improvement project
DET-10397
DET-10396
DET-10454
DET-10403
DET-10455
DET-10398
DET-10405
DET-10455
Description
Allowing users to create long lived access tokens that they can use for authentication.
Altering '
user_sessions
' table for tracking access tokens that can be used for authentication & association with the appropriate user.Updated table fields:
APIs:
CLI commands:
det token -h
det token login [-h] token
det token list [-h] [--show-inactive] [--json | --yaml] [username]
det token create [-h] [--expiration-days EXPIRATION_DAYS] [--description DESCRIPTION] [--json | --yaml] [username]
det token describe [-h] [--json | --yaml] token_id [token_id ...]
det token revoke [-h] token_id
det token edit [-h] [--description DESCRIPTION] [--json | --yaml] token_id
Test Plan
Completed local tests
After migration, you can see the altered '
user_sessions
' table, along with CRUD operations to support POST, GET and PATCH operations.Migration to create a table of the given schema:
To build and generate files
To mock
otherwise:
To check:
Checklist
docs/release-notes/
See Release Note for details.