Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

refactor(agent-vault): rename the shared variable scope to global

Scott Wilson10fef3587d95
diff --git a/backend/e2e-test/routes/v1/agent-vault.spec.ts b/backend/e2e-test/routes/v1/agent-vault.spec.ts
index 193f384476..72b5d81ade 100644
--- a/backend/e2e-test/routes/v1/agent-vault.spec.ts
+++ b/backend/e2e-test/routes/v1/agent-vault.spec.ts
@@ -1766,7 +1766,7 @@ describe("Agent Vault V1 Router", async () => {
expect(listed.statusCode).toBe(403);
expect(listed.payload).not.toContain("admin_only_value");
expect(listed.payload).not.toContain("TOKEN");
- // By id, a shared variable reads to a member like one that does not exist, as another member's personal one does.
+ // By id, a global variable reads to a member like one that does not exist, as another member's personal one does.
expect((await member.asIdentity("GET", `${variablesUrl}/${variable.id}/value`)).statusCode).toBe(404);
expect((await member.asIdentity("DELETE", `${variablesUrl}/${variable.id}`)).statusCode).toBe(404);
expect((await member.asIdentity("POST", variablesUrl, { key: "MINE", value: "x" })).statusCode).toBe(403);
@@ -2032,11 +2032,11 @@ describe("Agent Vault V1 Router", async () => {
expect.objectContaining({ id: adminVariableId, usedByServices: [] })
]);
- // Personal variables never show among the shared ones, and a member can't list those.
- const sharedList = await inject("GET", variablesUrl);
- expect(sharedList.statusCode).toBe(200);
+ // Personal variables never show among the global ones, and a member can't list those.
+ const globalList = await inject("GET", variablesUrl);
+ expect(globalList.statusCode).toBe(200);
expect(
- (JSON.parse(sharedList.payload) as { variables: { id: string }[] }).variables.map((variable) => variable.id)
+ (JSON.parse(globalList.payload) as { variables: { id: string }[] }).variables.map((variable) => variable.id)
).not.toContain(adminVariableId);
expect((await member.as("GET", variablesUrl)).statusCode).toBe(403);
expect(JSON.parse(created.payload).variable.scope).toBe("personal");
diff --git a/backend/src/db/migrations/20261013120000_agent-vault-personal-values.ts b/backend/src/db/migrations/20261013120000_agent-vault-personal-values.ts
index 9b07c524c3..fe1a690244 100644
--- a/backend/src/db/migrations/20261013120000_agent-vault-personal-values.ts
+++ b/backend/src/db/migrations/20261013120000_agent-vault-personal-values.ts
@@ -4,7 +4,7 @@ import { TableName } from "../schemas";
import { createOnUpdateTrigger, dropOnUpdateTrigger } from "../utils";
const PROJECT_KEY_UNIQUE = "agent_vault_variables_projectid_key_unique";
-const SHARED_KEY_UNIQUE = "agent_vault_variables_shared_key_unique";
+const GLOBAL_KEY_UNIQUE = "agent_vault_variables_global_key_unique";
const USER_KEY_UNIQUE = "agent_vault_variables_user_key_unique";
const IDENTITY_KEY_UNIQUE = "agent_vault_variables_identity_key_unique";
@@ -12,7 +12,7 @@ const IDENTITY_KEY_UNIQUE = "agent_vault_variables_identity_key_unique";
const NO_TARGET = "'00000000-0000-0000-0000-000000000000'::uuid";
export async function up(knex: Knex): Promise<void> {
- // A variable with an owner is that user's or identity's own; one without is shared across Agent Vault.
+ // A variable with an owner is that user's or identity's own; one without is global across Agent Vault.
if (!(await knex.schema.hasColumn(TableName.AgentVaultVariable, "userId"))) {
await knex.schema.alterTable(TableName.AgentVaultVariable, (t) => {
t.uuid("userId");
@@ -29,7 +29,7 @@ export async function up(knex: Knex): Promise<void> {
);
await knex.raw(
`CREATE UNIQUE INDEX ?? ON ?? ("projectId", "key") WHERE "userId" IS NULL AND "identityId" IS NULL`,
- [SHARED_KEY_UNIQUE, TableName.AgentVaultVariable]
+ [GLOBAL_KEY_UNIQUE, TableName.AgentVaultVariable]
);
// The owner column leads, so each index also serves its foreign key's cascade.
await knex.raw(`CREATE UNIQUE INDEX ?? ON ?? ("userId", "projectId", "key") WHERE "userId" IS NOT NULL`, [
@@ -154,9 +154,9 @@ export async function down(knex: Knex): Promise<void> {
if (await knex.schema.hasColumn(TableName.AgentVaultVariable, "userId")) {
await knex.raw(`DROP VIEW IF EXISTS analytics.??`, [TableName.AgentVaultVariable]);
- // Variables of one owner can't move into the shared namespace, where their keys may clash.
+ // Variables of one owner can't move into the global namespace, where their keys may clash.
await knex(TableName.AgentVaultVariable).whereNotNull("userId").orWhereNotNull("identityId").delete();
- await knex.raw(`DROP INDEX IF EXISTS ??`, [SHARED_KEY_UNIQUE]);
+ await knex.raw(`DROP INDEX IF EXISTS ??`, [GLOBAL_KEY_UNIQUE]);
await knex.raw(`DROP INDEX IF EXISTS ??`, [USER_KEY_UNIQUE]);
await knex.raw(`DROP INDEX IF EXISTS ??`, [IDENTITY_KEY_UNIQUE]);
await knex.raw(`ALTER TABLE ?? DROP CONSTRAINT IF EXISTS "agent_vault_variables_one_owner"`, [
diff --git a/backend/src/ee/routes/v1/agent-vault-routers/agent-vault-variable-router.ts b/backend/src/ee/routes/v1/agent-vault-routers/agent-vault-variable-router.ts
index 48e291d97a..82c84c371f 100644
--- a/backend/src/ee/routes/v1/agent-vault-routers/agent-vault-variable-router.ts
+++ b/backend/src/ee/routes/v1/agent-vault-routers/agent-vault-variable-router.ts
@@ -30,12 +30,12 @@ export const registerAgentVaultVariableRouter = async (server: FastifyZodProvide
schema: {
hide: false,
operationId: "listAgentVaultVariables",
- description: "List Agent Vault's shared variables, or your own personal ones",
+ description: "List Agent Vault's global variables, or your own personal ones",
tags: [ApiDocsTags.AgentVaultVariables],
querystring: z.object({
scope: z
.nativeEnum(AgentVaultVariableScope)
- .default(AgentVaultVariableScope.Shared)
+ .default(AgentVaultVariableScope.Global)
.describe(AGENT_VAULT.VARIABLE.listScope),
orderBy: z.enum(["key", "serviceCount"]).default("key").describe(AGENT_VAULT.VARIABLE.orderBy),
orderDirection: z.enum(["asc", "desc"]).default("asc").describe(AGENT_VAULT.VARIABLE.orderDirection),
@@ -74,12 +74,12 @@ export const registerAgentVaultVariableRouter = async (server: FastifyZodProvide
schema: {
hide: false,
operationId: "createAgentVaultVariable",
- description: "Create a shared variable, or a personal one of your own",
+ description: "Create a global variable, or a personal one of your own",
tags: [ApiDocsTags.AgentVaultVariables],
body: z.object({
scope: z
.nativeEnum(AgentVaultVariableScope)
- .default(AgentVaultVariableScope.Shared)
+ .default(AgentVaultVariableScope.Global)
.describe(AGENT_VAULT.VARIABLE.createScope),
key: AgentVaultVariableKeySchema.describe(AGENT_VAULT.VARIABLE.key),
value: AgentVaultVariableValueSchema.describe(AGENT_VAULT.VARIABLE.value)
@@ -120,7 +120,7 @@ export const registerAgentVaultVariableRouter = async (server: FastifyZodProvide
schema: {
hide: false,
operationId: "updateAgentVaultVariable",
- description: "Update a shared variable, or a personal one of your own",
+ description: "Update a global variable, or a personal one of your own",
tags: [ApiDocsTags.AgentVaultVariables],
params: z.object({
variableId: z.string().uuid().describe(AGENT_VAULT.VARIABLE.variableId)
@@ -184,7 +184,7 @@ export const registerAgentVaultVariableRouter = async (server: FastifyZodProvide
hide: false,
operationId: "deleteAgentVaultVariable",
description:
- "Delete a shared variable, or a personal one of your own. A variable in use, by a service or by your personal values, can't be deleted.",
+ "Delete a global variable, or a personal one of your own. A variable in use, by a service or by your personal values, can't be deleted.",
tags: [ApiDocsTags.AgentVaultVariables],
params: z.object({
variableId: z.string().uuid().describe(AGENT_VAULT.VARIABLE.variableId)
@@ -225,7 +225,7 @@ export const registerAgentVaultVariableRouter = async (server: FastifyZodProvide
schema: {
hide: false,
operationId: "getAgentVaultVariableValue",
- description: "Get the value of a shared variable, or a personal one of your own",
+ description: "Get the value of a global variable, or a personal one of your own",
tags: [ApiDocsTags.AgentVaultVariables],
params: z.object({
variableId: z.string().uuid().describe(AGENT_VAULT.VARIABLE.variableId)
diff --git a/backend/src/ee/services/agent-vault-proxy/agent-vault-proxy-service.ts b/backend/src/ee/services/agent-vault-proxy/agent-vault-proxy-service.ts
index def40c8366..829bf6bea1 100644
--- a/backend/src/ee/services/agent-vault-proxy/agent-vault-proxy-service.ts
+++ b/backend/src/ee/services/agent-vault-proxy/agent-vault-proxy-service.ts
@@ -445,7 +445,7 @@ export const agentVaultProxyServiceFactory = ({
/**
* A member-provided field comes from what the session's actor saved for the service, expanded against their own
- * personal variables only, after the admin's fields were expanded against the shared ones: a value is never
+ * personal variables only, after the admin's fields were expanded against the global ones: a value is never
* expanded twice. A service whose actor hasn't set every field the admin leaves to them goes out flagged and
* without a credential, so the proxy refuses it instead of sending a half-built one.
*/
diff --git a/backend/src/ee/services/agent-vault-variable/agent-vault-variable-dal.test.ts b/backend/src/ee/services/agent-vault-variable/agent-vault-variable-dal.test.ts
index 42dd5375f9..c68f00b873 100644
--- a/backend/src/ee/services/agent-vault-variable/agent-vault-variable-dal.test.ts
+++ b/backend/src/ee/services/agent-vault-variable/agent-vault-variable-dal.test.ts
@@ -123,11 +123,11 @@ describe("findValuesForResolve", () => {
expect(values.map((value) => value.id)).toEqual([FIRST_ID]);
});
- test("a shared lookup never returns a personal variable, and a personal one returns only its owner's", async () => {
+ test("a global lookup never returns a personal variable, and a personal one returns only its owner's", async () => {
const personal = row(SECOND_ID, USER_ID);
const { dal } = buildDAL({ primaryRows: [row(FIRST_ID), personal], replicaRows: [row(FIRST_ID), personal] });
- const shared = await dal.findValuesForResolve({
+ const global = await dal.findValuesForResolve({
variableIds: [FIRST_ID, SECOND_ID],
projectId: PROJECT_ID,
owner: null
@@ -138,7 +138,7 @@ describe("findValuesForResolve", () => {
owner: { userId: USER_ID }
});
- expect(shared.map((value) => value.id)).toEqual([FIRST_ID]);
+ expect(global.map((value) => value.id)).toEqual([FIRST_ID]);
expect(own.map((value) => value.id)).toEqual([SECOND_ID]);
});
});
diff --git a/backend/src/ee/services/agent-vault-variable/agent-vault-variable-dal.ts b/backend/src/ee/services/agent-vault-variable/agent-vault-variable-dal.ts
index 5613b4906f..0476ccc8f1 100644
--- a/backend/src/ee/services/agent-vault-variable/agent-vault-variable-dal.ts
+++ b/backend/src/ee/services/agent-vault-variable/agent-vault-variable-dal.ts
@@ -15,8 +15,8 @@ export type TAgentVaultVariable = Omit<TAgentVaultVariables, "accessBundleId">;
export type TAgentVaultVariableOrderBy = "key" | "serviceCount";
-// `owner: null` is the shared variables; an owner is that user's or identity's personal ones. Every read and lock
-// names one, so a shared lookup never matches a personal key and the other way round.
+// `owner: null` is the global variables; an owner is that user's or identity's personal ones. Every read and lock
+// names one, so a global lookup never matches a personal key and the other way round.
export type TAgentVaultVariableOwnerScope = { projectId: string; owner: TAgentVaultOwner | null };
export type TFindAgentVaultVariablesDTO = TAgentVaultVariableOwnerScope & {
@@ -210,7 +210,7 @@ export const agentVaultVariableDALFactory = (db: TDbClient) => {
};
// Reads the primary even without a tx, so a service or personal value saved a moment ago shows as using its
- // variables. A shared variable is referenced by services, a personal one by its owner's personal values, so each
+ // variables. A global variable is referenced by services, a personal one by its owner's personal values, so each
// variable only ever appears in one of the two.
const findServicesUsing = async (variableIds: string[], tx?: Knex): Promise<TAgentVaultServiceUsingVariable[]> => {
if (!variableIds.length) return [];
diff --git a/backend/src/ee/services/agent-vault-variable/agent-vault-variable-service.ts b/backend/src/ee/services/agent-vault-variable/agent-vault-variable-service.ts
index 1590f59001..cbe7d762a2 100644
--- a/backend/src/ee/services/agent-vault-variable/agent-vault-variable-service.ts
+++ b/backend/src/ee/services/agent-vault-variable/agent-vault-variable-service.ts
@@ -63,7 +63,7 @@ export const agentVaultVariableServiceFactory = ({
kmsService.createCipherPairWithDataKey({ type: KmsDataKey.SecretManager, projectId });
/**
- * Shared variables are admin only, reads included: a member can use a service without seeing what it is built
+ * Global variables are admin only, reads included: a member can use a service without seeing what it is built
* from, and Edit on access bundles is the action only an admin holds. Personal variables are the caller's own,
* and any Agent Vault member keeps them. Nobody, an admin included, can name or read another actor's.
*/
@@ -72,7 +72,7 @@ export const agentVaultVariableServiceFactory = ({
scope: AgentVaultVariableScope
): Promise<TAgentVaultVariableOwnerScope> => {
const { permission } = await getAgentVaultPermission({ permissionService }, { projectId, ctx });
- if (scope === AgentVaultVariableScope.Shared) {
+ if (scope === AgentVaultVariableScope.Global) {
ForbiddenError.from(permission).throwUnlessCan(
ProjectPermissionAgentVaultAccessBundleActions.Edit,
ProjectPermissionSub.AgentVaultAccessBundles
@@ -116,7 +116,7 @@ export const agentVaultVariableServiceFactory = ({
};
// A member who lost a bundle keeps their personal variables, but not a view into the bundle: its services drop out
- // of what they see. Shared variables are admin-only, and an admin reaches every bundle.
+ // of what they see. Global variables are admin-only, and an admin reaches every bundle.
const splitByReach = async (
{ projectId, ctx, owner }: { projectId: string; ctx: TGenericPermission; owner: TAgentVaultOwner | null },
services: TAgentVaultServiceUsingVariable[]
@@ -138,7 +138,7 @@ export const agentVaultVariableServiceFactory = ({
const projectVariable = (variable: TAgentVaultVariable, services: TAgentVaultServiceUsingVariable[]) => ({
id: variable.id,
key: variable.key,
- scope: isPersonal(variable) ? AgentVaultVariableScope.Personal : AgentVaultVariableScope.Shared,
+ scope: isPersonal(variable) ? AgentVaultVariableScope.Personal : AgentVaultVariableScope.Global,
usedByServices: services
.filter((service) => service.variableId === variable.id)
.map(
@@ -221,7 +221,7 @@ export const agentVaultVariableServiceFactory = ({
throw new BadRequestError({
message: owner
? `You can keep at most ${cap} variables in Agent Vault. Delete one that none of your values use first.`
- : `Agent Vault can hold at most ${cap} shared variables. Delete one that no service uses first.`
+ : `Agent Vault can hold at most ${cap} global variables. Delete one that no service uses first.`
});
}
diff --git a/backend/src/ee/services/agent-vault/CLAUDE.md b/backend/src/ee/services/agent-vault/CLAUDE.md
index 752fcbb6c2..d8e2b0e9b5 100644
--- a/backend/src/ee/services/agent-vault/CLAUDE.md
+++ b/backend/src/ee/services/agent-vault/CLAUDE.md
@@ -18,7 +18,7 @@ never in anything the agent holds.
```
agent-vault/ shared: enums, host grammar, conflict detection, reachability
agent-vault-access-bundle/ bundles, services, credential encryption, grants
-agent-vault-variable/ shared and personal variables and the reads behind Used By
+agent-vault-variable/ global and personal variables and the reads behind Used By
agent-vault-member/ product membership (list, add, role, remove)
agent-vault-personal-value/ each actor's own values for the fields a service leaves to members
agent-vault-session/ mint, revoke, list, get
@@ -190,7 +190,7 @@ path decides what a service can reach, so it stays literal.
session project's variables.
- **A variable delete and a service save meet on the variable row**: the delete locks it `FOR UPDATE`, a save
locks what it references `FOR SHARE` (`insertReferenceRows`). Create serialises on a per-project advisory lock;
- the shared-key partial unique index is the backstop.
+ the global-key partial unique index is the backstop.
- A stored value never comes back in any form, a lone `{{KEY}}` included. The sheet lists the keys a stored
field uses under the field and keeps the field masked until it is retyped. Settled: putting a lone
reference back in its field made it the one stored field that shows, and left a field mixing text with a
@@ -229,7 +229,7 @@ path decides what a service can reach, so it stays literal.
query can land on a different replica. An id with no variable behind it on either stays as text and is
logged rather than dropping the service, which would also drop the service's method and path restrictions.
Values saved before variables existed hold no id tokens, so they pass through untouched.
-- Shared variables are admin only, reads included: their routes check `Edit` on access bundles, which a member lacks,
+- Global variables are admin only, reads included: their routes check `Edit` on access bundles, which a member lacks,
and the bundle read gives a member its services without `variableReferences` (left out, not empty, since
an empty list would claim they use none). Every value is sealed and no response but the value route returns
one. That route is a GET with no-store headers and one audit event per read.
@@ -248,19 +248,19 @@ variables**, rows of `agent_vault_variables` with an owner, that only their own
service's sealed secret holds only the admin's fields, so a bearer token left to members stores no secret at
all and the column is NULL. Code that reads `encryptedCredential` NULL as passthrough has to check
`memberProvidedFields` first.
-- **One variables resource, two scopes.** `scope` on `/agent-vault/variables` (`shared`, the default, or
+- **One variables resource, two scopes.** `scope` on `/agent-vault/variables` (`global`, the default, or
`personal`) picks the list and the owner of a new one; every variable read and lock in the DAL takes an owner
- (`null` for shared) so a shared lookup never matches a personal key, and resolve expands each kind only against
+ (`null` for global) so a global lookup never matches a personal key, and resolve expands each kind only against
its own. By id, a variable the caller may not act on is a 404, never a 403: someone else's personal one, and a
- shared one for a member. Shared keys are unique per project (500 cap), personal ones per owner (100 cap), each
+ global one for a member. Global keys are unique per project (500 cap), personal ones per owner (100 cap), each
enforced by a partial unique index plus an advisory lock per project or per owner.
- **Everything personal is scoped to the caller, never to an id the caller sends.** No route names another actor,
so an admin can't list, read or set anyone else's variables or values. The owner is a user or a machine identity
(`ownerOf`); the UI only covers users for now, but resolve and the API already work for an identity's own
sessions.
-- **Resolve fills member fields last**: the admin's fields are expanded against shared variables first, then each
+- **Resolve fills member fields last**: the admin's fields are expanded against global variables first, then each
personal value against the session actor's personal variables only, so neither is ever expanded twice and a
- personal `{{KEY}}` can't reach a shared variable. A service whose actor hasn't set every member-provided field
+ personal `{{KEY}}` can't reach a global variable. A service whose actor hasn't set every member-provided field
goes out with `personalValuesMissing: true` and a passthrough credential. The proxy refuses it with a 403 (CLI
change); an older proxy that ignores the flag forwards the request without a credential, never with the admin's.
- **A save is a PATCH**: a field sent replaces that field's saved value, a field left out keeps it, and every
@@ -279,7 +279,7 @@ variables**, rows of `agent_vault_variables` with an owner, that only their own
variable also clears the owner's values on bundles they no longer reach, which otherwise would hold the variable
in place with nothing able to edit them. Personal variables survive all of this, and their Used By lists only
the bundles the owner still reaches.
-- Personal variables follow the shared variables' reference rules: sealed text names them by id, a reference row
+- Personal variables follow the global variables' reference rules: sealed text names them by id, a reference row
per personal value (`agent_vault_personal_value_references`, a deferred foreign key), the delete takes the variable
row `FOR UPDATE` and a personal values save takes the rows it references `FOR SHARE`. Used By on a variable reads
both reference tables; any one variable only ever appears in one of them.
diff --git a/backend/src/ee/services/agent-vault/agent-vault-enums.ts b/backend/src/ee/services/agent-vault/agent-vault-enums.ts
index b728033891..9987913248 100644
--- a/backend/src/ee/services/agent-vault/agent-vault-enums.ts
+++ b/backend/src/ee/services/agent-vault/agent-vault-enums.ts
@@ -56,7 +56,7 @@ export enum AgentVaultVariableReferenceField {
}
export enum AgentVaultVariableScope {
- Shared = "shared",
+ Global = "global",
Personal = "personal"
}
diff --git a/backend/src/ee/services/agent-vault/agent-vault-owner-fns.ts b/backend/src/ee/services/agent-vault/agent-vault-owner-fns.ts
index c643512c18..f475c0e39d 100644
--- a/backend/src/ee/services/agent-vault/agent-vault-owner-fns.ts
+++ b/backend/src/ee/services/agent-vault/agent-vault-owner-fns.ts
@@ -27,7 +27,7 @@ export const ownerColumns = (owner: TAgentVaultOwner | null) => {
return owner.userId ? { userId: owner.userId, identityId: null } : { userId: null, identityId: owner.identityId! };
};
-// `null` matches the rows no one owns, the shared ones.
+// `null` matches the rows no one owns, the global ones.
export const whereOwner = <T extends Knex.QueryBuilder>(query: T, table: string, owner: TAgentVaultOwner | null) => {
if (!owner) return query.whereNull(`${table}.userId`).whereNull(`${table}.identityId`);
return owner.userId
diff --git a/backend/src/ee/services/audit-log/audit-log-types.ts b/backend/src/ee/services/audit-log/audit-log-types.ts
index 0d65864885..c8352f571c 100644
--- a/backend/src/ee/services/audit-log/audit-log-types.ts
+++ b/backend/src/ee/services/audit-log/audit-log-types.ts
@@ -6541,7 +6541,7 @@ interface AgentVaultVariableCreateEvent {
accessBundleName?: string;
variableId: string;
key: string;
- // shared, or personal for a variable only its owner sees and uses. Absent on events from before personal ones.
+ // global, or personal for a variable only its owner sees and uses. Absent on events from before personal ones.
scope?: string;
};
}
@@ -6553,7 +6553,7 @@ interface AgentVaultVariableUpdateEvent {
accessBundleName?: string;
variableId: string;
key: string;
- // shared, or personal for a variable only its owner sees and uses. Absent on events from before personal ones.
+ // global, or personal for a variable only its owner sees and uses. Absent on events from before personal ones.
scope?: string;
// Present only when the update changed the key.
previousKey?: string;
@@ -6568,7 +6568,7 @@ interface AgentVaultVariableDeleteEvent {
accessBundleName?: string;
variableId: string;
key: string;
- // shared, or personal for a variable only its owner sees and uses. Absent on events from before personal ones.
+ // global, or personal for a variable only its owner sees and uses. Absent on events from before personal ones.
scope?: string;
};
}
@@ -6580,7 +6580,7 @@ interface AgentVaultVariableValueViewEvent {
accessBundleName?: string;
variableId: string;
key: string;
- // shared, or personal for a variable only its owner sees and uses. Absent on events from before personal ones.
+ // global, or personal for a variable only its owner sees and uses. Absent on events from before personal ones.
scope?: string;
};
}
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index 49397127d0..314cc5bbde 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -4498,7 +4498,7 @@ export const AGENT_VAULT = {
substitutionValue: `The real value the placeholder is replaced with. ${AGENT_VAULT_VARIABLE_REFERENCES} Never returned once saved.`,
updateSubstitutionValue: `The real value the placeholder is replaced with. ${AGENT_VAULT_VARIABLE_REFERENCES} Omit to keep the value already stored.`,
variableReferences:
- "The shared variables this service's credential, custom header values and substitution values use. Not returned to Agent Vault members, since only admins can see shared variables. A member's own personal variables are listed under personalValues.",
+ "The global variables this service's credential, custom header values and substitution values use. Not returned to Agent Vault members, since only admins can see global variables. A member's own personal variables are listed under personalValues.",
referenceField:
"Which value uses the variable: credential-value (a bearer token or a basic password), credential-username, custom-header or substitution.",
referenceCustomHeaderId: "The custom header whose value uses the variable.",
@@ -4528,11 +4528,11 @@ export const AGENT_VAULT = {
VARIABLE: {
variableId: "The ID of the variable.",
scope:
- "shared for a variable admins set up for services, or personal for one of your own, which only your personal values can use and only you can see. Personal keys are unique among your own variables.",
+ "global for a variable admins set up for services, or personal for one of your own, which only your personal values can use and only you can see. Personal keys are unique among your own variables.",
listScope:
- "Which variables to list: shared (the default), which needs the admin role, or personal for your own. Nobody can list another member's personal variables.",
+ "Which variables to list: global (the default), which needs the admin role, or personal for your own. Nobody can list another member's personal variables.",
createScope:
- "shared (the default) creates a variable services can use, which needs the admin role. personal creates one of your own, which only your personal values can use.",
+ "global (the default) creates a variable services can use, which needs the admin role. personal creates one of your own, which only your personal values can use.",
key: "The name values use to refer to the variable, as `{{KEY}}`. Starts with a letter and uses only upper case letters, numbers and underscores.",
value: "The value the proxy puts in place of each `{{KEY}}`.",
updateValue: "The value the proxy puts in place of each `{{KEY}}`. Omit to keep the stored value.",
diff --git a/docs/documentation/platform/agent-vault/variables.mdx b/docs/documentation/platform/agent-vault/variables.mdx
index a2062d0247..eed94b11f2 100644
--- a/docs/documentation/platform/agent-vault/variables.mdx
+++ b/docs/documentation/platform/agent-vault/variables.mdx
@@ -8,7 +8,7 @@ A variable is a value that you can use in any [service](/documentation/platform/
When an agent sends a request, the [proxy](/documentation/platform/agent-vault/proxies) replaces each reference with the variable's value.
<Info>
- Only [Agent Vault admins](/documentation/platform/agent-vault/access-control#product-membership) can view and update shared variables, the variables that services use. Every member, including admins, can also keep [personal variables](#personal-variables).
+ Only [Agent Vault admins](/documentation/platform/agent-vault/access-control#product-membership) can view and update global variables, the variables that services use. Every member, including admins, can also keep [personal variables](#personal-variables).
</Info>
## Add a variable
@@ -17,7 +17,7 @@ To add a variable:
<Steps>
<Step>
- In Agent Vault, go to **Variables** > **Shared Variables**.
+ In Agent Vault, go to **Variables** > **Global Variables**.
<Frame>
<img src="/images/platform/agent-vault/variables-empty.png" alt="The Variables page with no variables and an Add Variable button" />
@@ -25,7 +25,7 @@ To add a variable:
</Step>
<Step>
- Select **Add Shared Variable**.
+ Select **Add Global Variable**.
<Frame>
<img src="/images/platform/agent-vault/variable-create.png" alt="The Add Variable dialog with GITHUB_TOKEN as the key and a hidden value" />
@@ -41,7 +41,7 @@ To add a variable:
</Step>
<Step>
- Select **Add Shared Variable**. The variable appears in the list on the **Shared Variables** tab.
+ Select **Add Global Variable**. The variable appears in the list on the **Global Variables** tab.
<Frame>
<img src="/images/platform/agent-vault/variables.png" alt="The Variables page listing seven variables with hidden values. The Used By column shows access bundle badges, such as code-review, on-call, and release-notes for GITHUB_TOKEN, with a tooltip listing the github service in code-review. SLACK_BOT_TOKEN shows three badges and +1 for one more access bundle. SENTRY_AUTH_TOKEN shows Unused." />
@@ -81,7 +81,7 @@ To use a variable:
Select a variable from the list. Infisical inserts the reference, such as `{{GITHUB_TOKEN}}`.
<Tip>
- You can also create a variable without leaving the service. Type its key, then select **Create** at the end of the list. The **Add Shared Variable** dialog opens with the key filled in, so you only need to enter a **Value**.
+ You can also create a variable without leaving the service. Type its key, then select **Create** at the end of the list. The **Add Global Variable** dialog opens with the key filled in, so you only need to enter a **Value**.
</Tip>
<Frame>
@@ -150,11 +150,11 @@ If any service still uses the variable, the dialog lists those services, and you
## Personal variables
-A personal variable works like a shared variable, with two differences: only your [personal values](/documentation/platform/agent-vault/access-bundles#set-up-your-personal-values) can use it, and only you can read it. Use one when several services ask you for the same value, such as a personal GitHub token that services in two access bundles require.
+A personal variable works like a global variable, with two differences: only your [personal values](/documentation/platform/agent-vault/access-bundles#set-up-your-personal-values) can use it, and only you can read it. Use one when several services ask you for the same value, such as a personal GitHub token that services in two access bundles require.
To see your personal variables, go to **Variables** in Agent Vault. If you're an admin, select the **Personal Variables** tab.
-You add, update, and delete personal variables the same way as [shared variables](#add-a-variable), with these limits:
+You add, update, and delete personal variables the same way as [global variables](#add-a-variable), with these limits:
- You can keep up to 100 personal variables
- If your personal values for a service use a variable, you can't delete the variable until you change those values
diff --git a/frontend/src/components/agent-vault/VariableFormDialog.tsx b/frontend/src/components/agent-vault/VariableFormDialog.tsx
index df73d75322..d922dbac0f 100644
--- a/frontend/src/components/agent-vault/VariableFormDialog.tsx
+++ b/frontend/src/components/agent-vault/VariableFormDialog.tsx
@@ -107,7 +107,7 @@ const VariableForm = ({
variable,
initialKey,
onCreated,
- scope = AgentVaultVariableScope.Shared
+ scope = AgentVaultVariableScope.Global
}: Omit<Props, "onCloseAutoFocus">) => {
const isPersonal = scope === AgentVaultVariableScope.Personal;
const createVariable = useCreateAgentVaultVariable();
@@ -221,12 +221,12 @@ const VariableForm = ({
<>
<DialogHeader>
<DialogTitle>
- {isUpdate ? "Edit" : "Add"} {isPersonal ? "Personal" : "Shared"} Variable
+ {isUpdate ? "Edit" : "Add"} {isPersonal ? "Personal" : "Global"} Variable
</DialogTitle>
<DialogDescription>
{isPersonal
? "Store a value once and reuse it for any service that asks you for a value. Only you can read it."
- : "Store a value once and use it from any service in any access bundle."}
+ : "Store a value once and use it from any service in any access bundle. Only admins can manage it and see its value."}
</DialogDescription>
</DialogHeader>
@@ -311,7 +311,7 @@ const VariableForm = ({
isPending={isSubmitting}
isDisabled={isUpdate && !isDirty}
>
- {isUpdate ? "Save" : `Add ${isPersonal ? "Personal" : "Shared"} Variable`}
+ {isUpdate ? "Save" : `Add ${isPersonal ? "Personal" : "Global"} Variable`}
</Button>
</DialogFooter>
</form>
diff --git a/frontend/src/components/agent-vault/service-sheet/ServiceVariablesContext.ts b/frontend/src/components/agent-vault/service-sheet/ServiceVariablesContext.ts
index 29983022a2..27ca229d7d 100644
--- a/frontend/src/components/agent-vault/service-sheet/ServiceVariablesContext.ts
+++ b/frontend/src/components/agent-vault/service-sheet/ServiceVariablesContext.ts
@@ -15,7 +15,7 @@ type TServiceVariables = {
/** Opens the new-variable dialog on top of the sheet. Resolves to null if it is dismissed. */
requestVariable: (key: string) => Promise<TAgentVaultVariable | null>;
/**
- * Set when the fields reference the caller's own variables instead of the shared ones. There are few enough to hold
+ * Set when the fields reference the caller's own variables instead of the global ones. There are few enough to hold
* whole, so the list is filtered here rather than searched on the server. Undefined while it loads.
*/
localVariables?: TAgentVaultVariable[];
diff --git a/frontend/src/components/agent-vault/service-sheet/stepMeta.ts b/frontend/src/components/agent-vault/service-sheet/stepMeta.ts
index 948a31dfa5..fa2991d96c 100644
--- a/frontend/src/components/agent-vault/service-sheet/stepMeta.ts
+++ b/frontend/src/components/agent-vault/service-sheet/stepMeta.ts
@@ -40,7 +40,7 @@ export const SERVICE_STEPS: StepMeta[] = [
rightDescription:
"Agents reach this service without ever holding the credential themselves. Custom headers go out on top of it, and a substitution swaps a placeholder your agent already sends for the real value.",
rightTip:
- "To use a variable, type {{ in any value and pick it from the list. The proxy puts the variable's value in its place."
+ "To use a global variable, type {{ in any value and pick it from the list. The proxy puts the variable's value in its place. For a member-provided field, each member sets their own value after the service is added, and can use their personal variables there."
},
{
step: ServiceStep.Review,
diff --git a/frontend/src/hooks/api/agentVault/enums.ts b/frontend/src/hooks/api/agentVault/enums.ts
index f90bab6f4a..95762e895a 100644
--- a/frontend/src/hooks/api/agentVault/enums.ts
+++ b/frontend/src/hooks/api/agentVault/enums.ts
@@ -43,9 +43,9 @@ export enum AgentVaultSessionScope {
All = "all"
}
-/** Shared variables are an admin's, for services; personal ones are the caller's own, for their personal values. */
+/** Global variables are an admin's, for services; personal ones are the caller's own, for their personal values. */
export enum AgentVaultVariableScope {
- Shared = "shared",
+ Global = "global",
Personal = "personal"
}
diff --git a/frontend/src/hooks/api/agentVault/queries.tsx b/frontend/src/hooks/api/agentVault/queries.tsx
index b90718ff2b..64c7d06ec1 100644
--- a/frontend/src/hooks/api/agentVault/queries.tsx
+++ b/frontend/src/hooks/api/agentVault/queries.tsx
@@ -577,7 +577,7 @@ export const useAgentVaultVariableKeyStatus = (
{
enabled = true,
isCached = true,
- scope = AgentVaultVariableScope.Shared
+ scope = AgentVaultVariableScope.Global
}: { enabled?: boolean; isCached?: boolean; scope?: AgentVaultVariableScope } = {}
) => {
const { currentOrg } = useOrganization();
diff --git a/frontend/src/pages/agent-vault/AgentVaultVariablesPage/AgentVaultVariablesPage.tsx b/frontend/src/pages/agent-vault/AgentVaultVariablesPage/AgentVaultVariablesPage.tsx
index ed66c74a52..499bbb0f3d 100644
--- a/frontend/src/pages/agent-vault/AgentVaultVariablesPage/AgentVaultVariablesPage.tsx
+++ b/frontend/src/pages/agent-vault/AgentVaultVariablesPage/AgentVaultVariablesPage.tsx
@@ -11,7 +11,7 @@ import { ProjectMembershipRole } from "@app/hooks/api/roles/types";
import { VariablesCard } from "./components/VariablesCard";
-// Shared variables are an admin's alone, so a member sees only their personal ones, without tabs. Nobody can see
+// Global variables are an admin's alone, so a member sees only their personal ones, without tabs. Nobody can see
// anyone else's personal variables, admins included.
export const AgentVaultVariablesPage = () => {
const { t } = useTranslation();
@@ -26,7 +26,7 @@ export const AgentVaultVariablesPage = () => {
});
const tab =
isAdmin && selectedTab !== AgentVaultVariableScope.Personal
- ? AgentVaultVariableScope.Shared
+ ? AgentVaultVariableScope.Global
: AgentVaultVariableScope.Personal;
const updateTab = (value: string) => {
@@ -56,11 +56,11 @@ export const AgentVaultVariablesPage = () => {
{isAdmin ? (
<Tabs value={tab} onValueChange={updateTab}>
<TabsList variant="av" aria-label="Agent Vault variable lists">
- <TabsTrigger value={AgentVaultVariableScope.Shared}>Shared Variables</TabsTrigger>
+ <TabsTrigger value={AgentVaultVariableScope.Global}>Global Variables</TabsTrigger>
<TabsTrigger value={AgentVaultVariableScope.Personal}>Personal Variables</TabsTrigger>
</TabsList>
- <TabsContent value={AgentVaultVariableScope.Shared}>
- <VariablesCard scope={AgentVaultVariableScope.Shared} />
+ <TabsContent value={AgentVaultVariableScope.Global}>
+ <VariablesCard scope={AgentVaultVariableScope.Global} />
</TabsContent>
<TabsContent value={AgentVaultVariableScope.Personal}>
<VariablesCard scope={AgentVaultVariableScope.Personal} />
diff --git a/frontend/src/pages/agent-vault/AgentVaultVariablesPage/components/VariablesCard.tsx b/frontend/src/pages/agent-vault/AgentVaultVariablesPage/components/VariablesCard.tsx
index 509d09720d..e328c42120 100644
--- a/frontend/src/pages/agent-vault/AgentVaultVariablesPage/components/VariablesCard.tsx
+++ b/frontend/src/pages/agent-vault/AgentVaultVariablesPage/components/VariablesCard.tsx
@@ -210,7 +210,7 @@ type Props = {
scope?: AgentVaultVariableScope;
};
-export const VariablesCard = ({ scope = AgentVaultVariableScope.Shared }: Props) => {
+export const VariablesCard = ({ scope = AgentVaultVariableScope.Global }: Props) => {
const isPersonal = scope === AgentVaultVariableScope.Personal;
const revealValue = useRevealAgentVaultVariableValue();
@@ -327,7 +327,7 @@ export const VariablesCard = ({ scope = AgentVaultVariableScope.Shared }: Props)
<Card>
<CardHeader>
<CardTitle>
- {isPersonal ? "Personal Variables" : "Shared Variables"}
+ {isPersonal ? "Personal Variables" : "Global Variables"}
<DocumentationLinkBadge href={AgentVaultDocsUrls.variables} />
</CardTitle>
<CardDescription>
@@ -338,8 +338,9 @@ export const VariablesCard = ({ scope = AgentVaultVariableScope.Shared }: Props)
</>
) : (
<>
- A variable stores one value that any service can use as{" "}
- <code className="font-mono">{toVariableReference("KEY")}</code>.
+ A global variable stores one value that any service can use as{" "}
+ <code className="font-mono">{toVariableReference("KEY")}</code>. Only admins can
+ manage these and see their values.
</>
)}
</CardDescription>
@@ -351,7 +352,7 @@ export const VariablesCard = ({ scope = AgentVaultVariableScope.Shared }: Props)
<span tabIndex={0}>
<Button variant="av" isDisabled>
<PlusIcon />
- Add {isPersonal ? "Personal" : "Shared"} Variable
+ Add {isPersonal ? "Personal" : "Global"} Variable
</Button>
</span>
</TooltipTrigger>
@@ -364,7 +365,7 @@ export const VariablesCard = ({ scope = AgentVaultVariableScope.Shared }: Props)
) : (
<Button variant="av" onClick={() => openForm(null)}>
<PlusIcon />
- Add {isPersonal ? "Personal" : "Shared"} Variable
+ Add {isPersonal ? "Personal" : "Global"} Variable
</Button>
)}
</CardAction>