> For the complete documentation index, see [llms.txt](https://docs.cosmocloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cosmocloud.io/resources/secrets.md).

# Secrets

**Secrets** provides a centralised and secure way to store and manage your application's environment variables or what we call a **Secret. I**t can be used anywhere in your application without exposing the secrets to outer environments.

There are 3 types of Secrets which can be stored in cosmocloud -

## Database Secret <a href="#database-secret" id="database-secret"></a>

**Database Secret** is a confidential credential used to establish secure connections and access databases. It includes authentication information that allows Cosmocloud to authenticate itself to your database.

Database secrets typically include credentials such as -&#x20;

* Database name
* Mode
* Project Id
* Public key
* Private key
* Cluster name
* MongoDB URI

## Authentication Secret <a href="#authentication-secret" id="authentication-secret"></a>

**Authentication Secret** is a secret used to connect to your external Authentication Provider - be it an SSO provider or your own self hosted Authentication Layer.

## Custom secret <a href="#custom-secret" id="custom-secret"></a>

**Custom Secrets** are used to define your own custom Key-Value pairs which can be used to define and set custom environment variables.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cosmocloud.io/resources/secrets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
