> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/administrative-settings-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/administrative-settings-1/admin-panel-options/configurations/secret-management.md).

# Secret Management

The ***Secret Management*** setting gives facility to prevent the database-related or any other sensitive/confidential information from getting exposed. In Secret Management Settings the Admin configures the Key of the Sensitive data but the actual value is saved in Kubernetes as Environmental Variable by the DevOps Team.

## Steps to Add Secret Key

* Click on the ***Secret Management*** icon from the Configuration Admin option.​

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FRdzkEd4hQ0GA16Enzrc7%2Fimage.png?alt=media&amp;token=36195922-535f-4e10-8bbb-b70752f65552" alt=""><figcaption></figcaption></figure>

* The ***Secret Management*** page opens.
* Click on the ***New*** option to add a new secre&#x74;***.***

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2Fm522n2PBH2dnY45cbdiu%2Fimage.png?alt=media&amp;token=197219e2-ecf3-4da9-b212-032bbad6ea9c" alt=""><figcaption></figcaption></figure>

* Click on the ***Add New Field*** icon for the Secret Management option.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FUHPpr1V1TVO4MPbQRaaV%2Fimage.png?alt=media&amp;token=751819db-dd7f-4623-8467-b155fdc3909c" alt=""><figcaption></figcaption></figure>

* The option to add ***Secret Key*** will come as shown in the below images.    &#x20;

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FzdbV9gXFUYXaDz6cCLcZ%2Fimage.png?alt=media&amp;token=f254be12-2732-46ac-b4b7-7f5c612877aa" alt=""><figcaption></figcaption></figure>

* Provide the ***Secret Key*** in the given space.
* Click the ***Save*** option.

&#x20;   &#x20;

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2F3c4dG2je7KGIs3DEhHZm%2Fimage.png?alt=media&amp;token=f310fd39-2660-4530-b551-414925bd793b" alt=""><figcaption></figcaption></figure>

* A confirmation appears.&#x20;
* The secret will be saved and displayed in the list as shown below.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FdN01OtbbMQF2Ur5OmXyH%2Fimage.png?alt=media&amp;token=3fd2b7a7-ed7f-46fd-bde5-f5bf2d872a7a" alt=""><figcaption></figcaption></figure>

* To add a new field click on the + icon provided for the Secret (Mongo) as shown below images.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FbLzVGRYb6tJ6P1z8u6zb%2Fimage.png?alt=media&amp;token=c3a2a34b-a094-468c-97e2-886f37eb0bf5" alt=""><figcaption></figcaption></figure>

* Add multiple fields inside this secret like Port, Host, Username, Password, etc depending upon the requirement.    &#x20;

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2F442jUSwXRpCZyvJDcw9Z%2Fimage.png?alt=media&amp;token=c0cfd68c-0cba-4658-8fb6-93863da2f0a4" alt=""><figcaption></figcaption></figure>

* Once We have added all the required fields, click the ***Save*** option to save all the fields of Secret.
* A confirmation message appears.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FXwhDltNYKYKpuWSCNpKi%2Fimage.png?alt=media&amp;token=6956bd5e-7a16-48ad-8abf-caec845c30ff" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark>*

* *Click the **View***<img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FlQxjamZ8pw2RRkc7n7dI%2Fimage.png?alt=media&amp;token=af348d4f-4818-40da-86da-ad66bd552a9f" alt="" data-size="line"> *icon to display all the added fields.*
* *Click the **Delete*** <img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FOLI95TJzn9ODS9vByZSq%2Fimage.png?alt=media&amp;token=ca31f022-9677-45da-9133-b2b815a0f1a9" alt="" data-size="line">*icon to remove the added Secret key.*
* *Click the **Close*** <img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FwwBR7Q4eswU9m8bxLl1r%2Fimage.png?alt=media&amp;token=29051906-7a2d-4c0a-a981-d63dd9762138" alt="" data-size="line">*icon to remove an added field.*
  {% endhint %}

### Steps to Share a Secret Key <a href="#steps-to-share-a-secret-key" id="steps-to-share-a-secret-key"></a>

Once Admin has configured the settings, it is possible to share it to a user/User Group to use this secret by clicking the ***Share*** <img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2F6J2KcCfU3o7QnNVrzZu8%2Fimage.png?alt=media&amp;token=6ff024aa-5d31-498e-a475-333bb01dfb5a" alt="" data-size="line">icon provided next to the saved Secret Key.

* Click the ***Share*** icon for a saved Secret Key.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2F18rU52yM1wR0z0WTTc7L%2Fimage.png?alt=media&amp;token=808a9621-bc8c-4aa4-9fba-2af45ff8e3e5" alt=""><figcaption></figcaption></figure>

* The ***Share Secret Key*** window opens.
* Select the **USER** or **USER GROUP** option to list the users (Use the **EXCLUDE USER** to exclude the user from the right to access a shared Secret Key).
* Select User(s)/User Group(s) from the list.
* Use arrow to move the selected user(s) and user group(s) to the right side box.

&#x20;     ![](https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FgIYwbDdlghRYwPHEQjJ9%2Fimage.png?alt=media\&token=ae00132d-abb7-4698-b847-766e9538dd49)​

* Once the selected user(s) and user group(s) appear in the right side box.
* Click the ***Save*** option.

&#x20;     ![](https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2Fmbm9CxUl5kXay5kXrl0f%2Fimage.png?alt=media\&token=6adeca5b-8be3-41a2-ab1b-2f964b076756)​

* A confirmation message appears and the Secret Key gets shared to the selected user(s) or user group(s).

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FbcfIwz58uHz5qkJWpnZk%2Fimage.png?alt=media&amp;token=422d3680-f5ee-4c5a-b724-601aa45aa04d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please Note: Once Configuration is done Admin needs to request the DevOps team to add the actual keys in the Kubernetes. The names of the Keys should be in the below format: MONGO\_HOST, MOGO\_PORT , MONGO\_USERNAME , MONGO\_PORT

Once the ***DevOps*** team has been configured the secret key’s value, it can be used in any module. For Reference check out the Secret tab inside the ***Data Science Lab*** Module.

Hence, We can see that the actual value of Mongo-related fields is not exposed anywhere in the platform.
{% endhint %}
