---
title: Default secrets object (deprecated)
description: IG automatically creates a secrets object in each route in the configuration, and in config.json and admin.json.
component: pinggateway
version: 2023.11
page_id: pinggateway:reference:default-secrets-object
canonical_url: https://docs.pingidentity.com/pinggateway/2023.11/reference/default-secrets-object.html
revdate: 2022-09-29T12:22:51Z
section_ids:
  secrets-usage: Usage
  secrets-properties: Properties
  secrets-example: Example
---

# Default secrets object (deprecated)

|   |                                                                                                                                                                                                                                          |
| - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | This object is deprecated; use [SecretsProvider](SecretsProvider.html) instead. For more information, refer to the [Deprecated](https://docs.pingidentity.com/pinggateway/release-notes/deprecated.html) section of the *Release Notes*. |

IG automatically creates a secrets object in each route in the configuration, and in `config.json` and `admin.json`.

When the secrets object is not used to declare a secrets store in the configuration, IG creates a default [SystemAndEnvSecretStore](secrets.html#SystemAndEnvSecretStore) in the local secrets service. When the secrets object is used to declare a secrets store, the default is not installed in the local secrets service.

## Usage

```json
{
  "secrets": {
    "stores": [ SecretStore reference, ... ]
  }
}
```

## Properties

* `"stores"`: *array of SecretStore [references](preface.html#definition-reference), required*

  One or more of the following secret stores:

  * [Base64EncodedSecretStore](secrets.html#Base64EncodedSecretStore)

  * [FileSystemSecretStore](secrets.html#FileSystemSecretStore)

  * [HsmSecretStore](secrets.html#HsmSecretStore)

  * [JwkSetSecretStore](secrets.html#JwkSetSecretStore)

  * [KeyStoreSecretStore](secrets.html#KeyStoreSecretStore)

  * [SystemAndEnvSecretStore](secrets.html#SystemAndEnvSecretStore)

## Example

The following example configures two secret stores:

```json
{
  "secrets": {
    "stores": [
       {
        "type": "FileSystemSecretStore",
        "config": {
          "directory": "/path/to/secrets",
          "format": "BASE64"
        }
      },
      {
        "type": "SystemAndEnvSecretStore",
        "config": {
          "format": "PLAIN"
        }
      }
    ]
  }
}
```
