- Notifications
You must be signed in to change notification settings - Fork928
feat: add keys to organization provision daemons#14627
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
e5b9cc9
683876b
7192df7
c0beed9
4082678
6a19014
1e88381
0f60bc9
f676ba4
c0ae056
56373ce
174f02a
9f59974
bdb5f57
dde933c
8283329
f7f6ab1
3814ff1
5e457f4
607638b
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1491,6 +1491,11 @@ func (api *API) CreateInMemoryTaggedProvisionerDaemon(dialCtx context.Context, n | ||||||||||||
dbTypes = append(dbTypes, database.ProvisionerType(tp)) | ||||||||||||
} | ||||||||||||
keyID, err := uuid.Parse(string(codersdk.ProvisionerKeyIDBuiltIn)) | ||||||||||||
if err != nil { | ||||||||||||
return nil, xerrors.Errorf("failed to parse built-in provisioner key ID: %w", err) | ||||||||||||
} | ||||||||||||
Comment on lines +1494 to +1497 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
const (ProvisionerKeyIDBuiltIn="00000000-0000-0000-0000-000000000001"ProvisionerKeyIDUserAuth="00000000-0000-0000-0000-000000000002"ProvisionerKeyIDPSK="00000000-0000-0000-0000-000000000003") There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. They should be safe, but I'd rather just follow the no panic principal here so we at least return a proper error in the response | ||||||||||||
//nolint:gocritic // in-memory provisioners are owned by system | ||||||||||||
daemon, err := api.Database.UpsertProvisionerDaemon(dbauthz.AsSystemRestricted(dialCtx), database.UpsertProvisionerDaemonParams{ | ||||||||||||
Name: name, | ||||||||||||
@@ -1501,6 +1506,7 @@ func (api *API) CreateInMemoryTaggedProvisionerDaemon(dialCtx context.Context, n | ||||||||||||
LastSeenAt: sql.NullTime{Time: dbtime.Now(), Valid: true}, | ||||||||||||
Version: buildinfo.Version(), | ||||||||||||
APIVersion: proto.CurrentVersion.String(), | ||||||||||||
KeyID: keyID, | ||||||||||||
}) | ||||||||||||
if err != nil { | ||||||||||||
return nil, xerrors.Errorf("failed to create in-memory provisioner daemon: %w", err) | ||||||||||||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.