stack secrets from external providers (1Password, HashiCorp Vault, Infisical and Doppler)

This commit is contained in:
jarek committed 2026-08-13 10:20:29 +02:00
1 parent d7f435dd5f
commit f43736d94a
28 files changed
+667 -100

No files matched your search

+11
View File
@@ -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) {