stack secrets from external providers (1Password, HashiCorp Vault, Infisical and Doppler)
This commit is contained in:
28 files changed
+667
-100
No files matched your search
@@ -70,6 +70,17 @@ export const POST: RequestHandler = async (event) => {
|
||||
return json({ error: 'secretProviderId must be a number or null' }, { status: 400 });
|
||||
}
|
||||
|
||||
// Binding a secret provider resolves its secrets into the container at deploy;
|
||||
// require the secrets permission so a stacks-only user can't exfiltrate a
|
||||
// provider's secrets by binding it and reading the container env.
|
||||
if (
|
||||
typeof data.secretProviderId === 'number' &&
|
||||
auth.authEnabled &&
|
||||
!(await auth.can('secrets', 'view', data.environmentId || undefined))
|
||||
) {
|
||||
return json({ error: 'Permission denied: binding a secret provider requires the secrets permission' }, { status: 403 });
|
||||
}
|
||||
|
||||
// Check for name conflicts with existing stacks (regular/external/git)
|
||||
const existing = await getStackSource(trimmedStackName, data.environmentId || null);
|
||||
if (existing) {
|
||||
|
||||
Reference in new issue
Block a user