Skip to content

feat: show user-auth provisioners #14883

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

Merged
merged 9 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: show user-auth provisioners
  • Loading branch information
f0ssel committed Sep 30, 2024
commit edc99eff4cc4f55fe80c15f6a9cd37a2982809e7
6 changes: 4 additions & 2 deletions enterprise/coderd/provisionerkeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ func (api *API) provisionerKeyDaemons(rw http.ResponseWriter, r *http.Request) {

pkDaemons := []codersdk.ProvisionerKeyDaemons{}
for _, key := range sdkKeys {
// currently we exclude user-auth from this list
// Currently the user-auth key orgID is hardcoded to the default org.
// This will be changed when we update the `user-auth` keys to be
// directly tied to a user ID.
if key.ID.String() == codersdk.ProvisionerKeyIDUserAuth {
continue
key.OrganizationID = organization.ID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This says the default org, but the organization could be any org right? The organization.ID comes from the org in the url

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is confusing and will update it. The user-auth key.OrganizationID is hardcoded to the default org in the database and we are overwriting it here. The organization is valid here because it's the ID we use to query the list to begin with. It's just that for provisioners in the non-default org that use user-auth would have the default org ID returned here, so we edit the fake user-auth key to have the correct org here before returning it.

}
daemons := []codersdk.ProvisionerDaemon{}
for _, daemon := range recentDaemons {
Expand Down
Loading