You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2d93f56
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/platform/credentials.mdx
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ Both masking and model-bound projection match only exact values in either case.
93
93
94
94
Copilot's Function and code-execution tools receive a saved secret only when their code explicitly contains a valid `{{KEY}}` reference. Direct `environmentVariables.KEY` access, shell `$KEY`, dynamic names, literals, and configured-but-unused secrets do not mount a value. Code execution requires workspace write access, and the caller must be allowed to **use** the secret — the same set a workflow resolves for them: your own Personal secrets, and Workspace secrets you hold an active grant on as a Credential Member or Credential Admin, which a workspace admin holds on every key. A secret you hold no grant on does not mount, and neither does one whose grant is revoked or still pending.
95
95
96
-
This matches what a workflow Function block already resolves for the same person, deliberately. Being able to run a secret is not the same as being able to read it: the value stays masked under **Settings → Secrets**, and **See usage**stays visible only to that secret's admins, so a Credential Member using a secret in code is recorded for whoever can rotate it.
96
+
This matches what a workflow Function block already resolves for the same person, deliberately. Being able to run a secret is not normally the same as being able to read it: Credential Members can reveal a workspace secret under **Settings → Secrets** only when a Credential Admin has enabled **Show value in logs and Chat**. **See usage**remains visible only to that secret's admins, so a Credential Member using a secret in code is recorded for whoever can rotate it.
97
97
98
98
Headless surfaces use their saved **Secret access** setting:
99
99
@@ -118,7 +118,7 @@ Click **Details** on any secret row to open its detail view.
118
118
119
119
From here you can:
120
120
121
-
- View the **Key** and edit the **Value**
121
+
- View the **Key** and reveal the **Value** when visibility is enabled; Credential Admins can edit it
122
122
- Toggle **Visibility** — show the value unmasked in run output; see [Visibility](#visibility)
123
123
- Edit the **Description** — an optional note telling teammates what the secret is for. Workspace secrets only; a personal secret is not shared, so it has none
124
124
- Manage **Members** — invite teammates by email and assign them an **Admin** or **Member** role
@@ -135,6 +135,7 @@ By default, a secret's resolved value is masked everywhere Sim shows run output
135
135
- Run logs, Chat, and code output show the real value instead of `{{KEY}}`
136
136
- Files a run writes with the value in them stay readable and attachable
137
137
- The Secrets API list includes the value for this secret, so external agents can read it directly instead of scraping logs
138
+
- Credential Members can reveal the value under **Settings → Secrets**, without gaining permission to edit it
138
139
139
140
The value becomes visible to **anyone who can see this workspace's runs** — including publicly shared log links and log exports, and regardless of member restrictions on the secret itself. Only turn it on for values you'd be comfortable printing in a log.
140
141
@@ -146,7 +147,7 @@ The switch applies to future runs only. Logs written while the secret was masked
146
147
147
148
This answers the question worth asking before rotating a key: who has been using it, inside what, and how recently.
148
149
149
-
Only people who can read the value can see it — a Credential Admin on a workspace secret, or the owner of a personal one. For everyone else the action is visible but disabled, because the trail names workflows, people, and run IDs, which is the same information masking withholds. Two people who each hold a personal secret under the same name see only their own runs.
150
+
Only Credential Admins on a workspace secret, or the owner of a personal one, can see its usage. For everyone else the action is visible but disabled because the trail names workflows, people, and run IDs. Two people who each hold a personal secret under the same name see only their own runs.
150
151
151
152
<Callout>
152
153
Usage is recorded independently of execution logs, so it outlives them: logs expire under your workspace's retention setting, while the record of who touched a credential does not. It records what a run resolved, subject to the recognition limits under [Execution log protection](#execution-log-protection) — a read Sim cannot attribute is left out rather than guessed at, so treat an empty trail as "nothing recognized," not proof a secret was never used.
@@ -157,7 +158,7 @@ Usage is recorded independently of execution logs, so it outlives them: logs exp
157
158
|| Workspace | Personal |
158
159
|---|---|---|
159
160
|**Who sees the name**| All workspace members, including external workspace members | Only you |
160
-
|**Who sees the value**| Workspace admins and that secret's Credential Admins | Only you |
161
+
|**Who sees the value**| Workspace admins and that secret's Credential Admins; Credential Members when **Show value in logs and Chat** is enabled| Only you |
161
162
|**Use in workflows and code**| Any member can use | Only you can use |
162
163
|**Best for**| Production workflows, shared services | Testing, personal API keys |
163
164
|**Who can edit**| Workspace admins and that secret's Credential Admins | Only you |
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx
+12-11Lines changed: 12 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,8 @@ import { ChipInput } from '@sim/emcn'
7
7
constBULLET='\u2022'
8
8
9
9
/**
10
-
* Viewers always see this many bullets regardless of the real value, which the
11
-
* server withholds (empty string) for non-admins. A fixed length also avoids
12
-
* leaking the secret's length.
10
+
* Viewers without reveal access receive a fixed-length mask so the secret's
11
+
* length is not disclosed.
13
12
*/
14
13
constVIEWER_MASK_LENGTH=10
15
14
@@ -20,11 +19,11 @@ type SecretValueFieldProps = Omit<
20
19
value: string
21
20
onChange?: (value: string)=>void
22
21
/**
23
-
* Whether the caller may reveal (on focus) and edit the value. When `false`
24
-
* the real value is never shown — only a fixed-length mask — and the field is
25
-
* read-only (e.g. a non-admin viewer).
22
+
* Whether the caller may edit the value. Editors can always reveal it.
26
23
*/
27
24
canEdit?: boolean
25
+
/** Whether a read-only caller may reveal the value on focus. */
26
+
canReveal?: boolean
28
27
/** Render the real value without masking, e.g. an overridden/conflicted field. */
29
28
unmasked?: boolean
30
29
/** Force read-only even when {@link canEdit} is true (e.g. a conflicted field). */
@@ -33,9 +32,9 @@ type SecretValueFieldProps = Omit<
33
32
34
33
/**
35
34
* The single source of truth for displaying an environment-variable value:
36
-
* masks the value with bullets while unfocused, reveals it on focus for editors,
37
-
* and keeps the field read-only (masked) for viewers who can't edit. Shared by
38
-
* the secrets list and the secret detail page so masking never diverges.
35
+
* masks revealable values while unfocused, reveals them on focus, and grants
36
+
* editing independently. Callers without reveal access receive a fixed-length
37
+
* mask. Shared by the secrets list and secret detail page.
39
38
*
40
39
* Rendered as a {@link ChipInput}; the chip chrome carries the canonical 30px
41
40
* chip-field height, and the caller's `className` only positions it (e.g.
@@ -46,6 +45,7 @@ export function SecretValueField({
46
45
value,
47
46
onChange,
48
47
canEdit =true,
48
+
canReveal =false,
49
49
unmasked =false,
50
50
readOnly =false,
51
51
onFocus,
@@ -56,8 +56,9 @@ export function SecretValueField({
56
56
}: SecretValueFieldProps){
57
57
const[focused,setFocused]=useState(false)
58
58
consteditable=canEdit&&!readOnly
59
-
constmaskActive=canEdit&&!unmasked&&!focused
60
-
constdisplayValue=canEdit ? value : BULLET.repeat(VIEWER_MASK_LENGTH)
59
+
constrevealable=canEdit||canReveal
60
+
constmaskActive=revealable&&!unmasked&&!focused
61
+
constdisplayValue=revealable ? value : BULLET.repeat(VIEWER_MASK_LENGTH)
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secrets-manager/secrets-manager.tsx
0 commit comments