Navigation

Define a Secret

Overview

You can define a new Realm Secret in the Realm UI, with the Admin API, or with the Realm CLI. Realm Secrets are not included in exported application directories.

Procedure

1

Create a New Secret

You can define a new Secret from the Secret configuration screen in the Realm UI. To navigate to the configuration screen, click Values & Secrets in the left-hand navigation and then select the Secrets tab. Click Add a Secret.

2

Name the Secret

Enter a unique Secret Name. This name is used to refer to the Secret from authentication providers, service configurations, and Values.

Secret Name Restrictions

Secret names must not exceed 64 characters and may only contain ASCII letters, numbers, underscores, and hyphens. The first character must be a letter or number.

3

Define the Secret

Enter the Secret’s definition in the Secret Value input and then enter the same definition in the Confirm Secret Value input. The definitions must match in order to save the Secret.

../../_images/secret-value-realm-ui.png

Secret Value Length Restrictions

Secret values may not exceed 500 characters in length.

4

Save the Secret

After you have named and defined the new Secret, click Save. Once saved, you can immediately reference the Secret by name in service configurations and secret Values.

Summary

  • You can only define a Realm Secret using the Realm UI, the Admin API, or the Realm CLI.
  • Realm Secrets are not exported and cannot be read directly.