> For the complete documentation index, see [llms.txt](https://docs.1kosmos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1kosmos.com/authentication/admin-portal/settings/managing-secrets.md).

# Managing Secrets

Keep your sensitive data out of your code. Secret Store lets administrators securely store and manage API keys, client secrets, and tokens used in workflows and integrations.

***

### Why use Secret Store

Previously, secrets were hardcoded in workflow JavaScript, which could expose them in the front end and database. With Secret Store:

* Secrets are stored securely in encrypted form
* Secrets are never exposed in the UI, database, or logs

### Create a secret

1. Log in to your tenant as a community administrator.
2. Navigate to **Settings > Secret Store**.
3. Click **Add new secret**.
4. Enter a **Name** (a unique identifier used in workflows) and a **Value** (the API key, password, token, etc.).
5. Click **Create**.

### Use secrets in workflows

Reference a secret inside workflow JavaScript using value substitution:

```
{{secrets.<secret_name>}}
```

For example:

```
const apiPassword = {{secrets.abc_api_key}};
```

At runtime, the system automatically replaces this with the actual secret value when executing the workflow.

### How secrets are protected

* **Write-only** — once created, the value can never be viewed again
* **Masked** in the UI
* **Never stored in plain text**
* **Not exposed in logs** — even if explicitly printed, values are obfuscated
* **Not directly accessible** by other users
* Only the **application runtime** can resolve and use secrets

{% hint style="info" %}
**Note:** Secrets can only be added or deleted — they cannot be edited or viewed after being added to the Secret Store.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.1kosmos.com/authentication/admin-portal/settings/managing-secrets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
