Skip to content

Commit 1a45338

Browse files
committed
forbid user and pk auth
1 parent 5d470f0 commit 1a45338

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

enterprise/coderd/provisionerdaemons.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ func (p *provisionerDaemonAuth) authorize(r *http.Request, orgID uuid.UUID, tags
111111
return nil, xerrors.New("user unauthorized")
112112
}
113113

114+
// Allow fallback to PSK auth if the user is not allowed to create provisioner daemons.
115+
// This is to preserve backwards compatibility with existing user provisioner daemons.
114116
// If using PSK auth, the daemon is, by definition, scoped to the organization.
115117
tags = provisionersdk.MutateTags(uuid.Nil, tags)
116118
return tags, nil

0 commit comments

Comments
 (0)