# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
