feat: backend support for creating and storing service accounts#22698
Open
feat: backend support for creating and storing service accounts#22698
Conversation
0063e70 to
1ad59a7
Compare
1ad59a7 to
36a539d
Compare
Add is_service_account column to users table with CHECK constraints enforcing login_type='none' and empty email for service accounts. Update user creation API to validate service account constraints. Related to: https://linear.app/codercom/issue/DEVEX-19/feat-admins-can-createmanage-service-accounts-via-uicli https://linear.app/codercom/issue/DEVEX-21/feat-allow-option-for-sharing-workspaces-for-only-service-accouts
36a539d to
253df8c
Compare
Contributor
Documentation CheckUpdates Needed
Already Covered
Automated review via Coder Tasks |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
is_service_accountboolean column to the users table and updatesthe user creation API so that service accounts can be created as a distinct
user type.
Changes
is_service_accountcolumn with CHECK constraintsenforcing
login_type='none'and empty email for service accounts.Modify email unique indexes to exclude empty emails so multiple service
accounts can coexist.
handler (no email, no password, login type must be
none).GetUserByEmailOrUsernameto skip empty emailmatching.
account creation and validation.
Related to:
https://linear.app/codercom/issue/DEVEX-19/feat-admins-can-createmanage-service-accounts-via-uicli
https://linear.app/codercom/issue/DEVEX-21/feat-allow-option-for-sharing-workspaces-for-only-service-accouts