# Manage Secret

**SECRETS**

Secrets are key-value pairs that can have a global value or environment specific value, based on your use case .They are stored securely in a vault and Ozone injects them into the pipeline runtime on-demand. The secrets are cleaned up once the pipeline run ends.

### **Steps to create a secret** <a href="#steps-to-create-a-variable" id="steps-to-create-a-variable"></a>

1. Once you log in to Ozone, select **Resources** on the left sidebar under **Setup**

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2Fi0IvtLu0ifdUkTnZ71br%2FScreenshot%202024-09-05%20082937.png?alt=media&#x26;token=eea001e9-6057-4d4c-b38f-444df0ca1b95" alt=""><figcaption></figcaption></figure>

2. After clicking on Resources a menu appears, click on Secrets to get the Secrets page

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2FE82ZEsYESpOgzXC0OPSI%2FScreenshot%202024-09-05%20082945.png?alt=media&#x26;token=42c22a0b-3bf8-4cbc-b01e-4191db43314c" alt=""><figcaption></figcaption></figure>

3. After this users can click on the **+ New Secret** button to open the modal window for variable creation

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2FPdLEKTg0aDGqecUl7lGF%2FScreenshot%202024-09-05%20083334.png?alt=media&#x26;token=7f16ba92-4a8e-400c-a3a0-a3bfbb0c7582" alt=""><figcaption></figcaption></figure>

4. This will open the modal window for **secret creation**

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2FUzwXGrgmaCxuxcvVf1eS%2FScreenshot%202024-09-05%20082611%20(1).png?alt=media&#x26;token=2ab8de74-031c-4ff5-b7da-80bd465a8a8b" alt=""><figcaption></figcaption></figure>

5. Users can choose the scope of the secrets to either be global or environment-specific according to their use case\
   \
   a. **Global Secret**\
   \
   By default a global variable is set at initial, the user can set any value to the secret which will be accessible throughout all the Environments

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2Fz4db7fNr5mjw760amps6%2FScreenshot%202024-09-05%20082705.png?alt=media&#x26;token=920bf5cc-521c-4fb8-9264-a161ce721b38" alt=""><figcaption></figcaption></figure>

&#x20;    **b. Local secret**\
\
To create a local variable, simply toggle the switch as shown below. Users can enter the value for the variables according to the Environments they desire<br>

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2FYMiYtfmHsmbWH8bqmQsJ%2FScreenshot%202024-09-05%20083722.png?alt=media&#x26;token=7ddfcf31-4d17-4db3-94bb-04a687ae1ca1" alt=""><figcaption></figcaption></figure>

6. Once the user is done entering the values, they can click on the **Create** Button to create the variable
7. Once the Variables have Successfully been created it will be shown in the form of a tabular list, as shown below. In the table list, you can see what the type of secret is created

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2FMvYskFz4uH90Y7p29ruB%2FScreenshot%202024-09-05%20082724.png?alt=media&#x26;token=00cf91b1-9c85-408c-be1b-06f6f5c4cae8" alt=""><figcaption></figcaption></figure>

### **Steps to edit/view a secret** <a href="#steps-to-edit-view-a-variable" id="steps-to-edit-view-a-variable"></a>

1. Click on the pen icon highlighted below to Edit/view the secret details

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2F3MjJuYA7rrelpNIUSKaS%2Fasdasdsad.png?alt=media&#x26;token=31d1a625-8fe7-4bd4-8c84-869dc0bd94a3" alt=""><figcaption></figcaption></figure>

2. This will open the modal window with the existing details of the secrets. The user can edit or change the details accordingly\
   \
   The secret name can't be edited after it's created

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2FoWdZvQtvoDSgLahdzxK7%2FScreenshot%202024-09-05%20082736%20(1).png?alt=media&#x26;token=be9c3eac-a677-4eb7-a482-499e6f04c750" alt=""><figcaption></figcaption></figure>

3. Once the user has Edited the necessary details, Click on **Save**.
4. The user will be able to see the changes in the table as shown below

<figure><img src="https://3829750647-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAObcOkMb6sCSnSdcUOTm%2Fuploads%2FR4ZdXcRqd1mCEMTXV0Lx%2FScreenshot%202024-09-05%20082724.png?alt=media&#x26;token=5bbd738f-46c6-4494-b52f-8dd8f5c31ad8" alt=""><figcaption></figcaption></figure>
