> For the complete documentation index, see [llms.txt](https://docs.ovaledge.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ovaledge.com/release8.2/deployment-and-maintenance/integration/aws-secrets-manager-with-vm.md).

# AWS Secrets Manager with VM

This article explains how to integrate AWS Secrets Manager with the OvalEdge application to securely manage sensitive credentials and configuration values.

## **Prerequisites**

* **AWS Secret Format**: Ensure a secret is created in AWS Secrets Manager with the following JSON structure:

  ```json
  {
    "jdbcstringurl": "jdbc:mysql://db.example.com:3306/ovaledge",
    "username": "db_user",
    "password": "db_pass",
    "readjdbcstringurl": "jdbc:mysql://readreplica.example.com:3306/ovaledge",
    "encryptdecryptkey": "your-encryption-key",
    "eshost": "es.example.com",
    "esport": "9200",
    "esprotocol": "https",
    "esusername": "elastic_user",
    "espassword": "elastic_pass"
  }
  ```
* **IAM Role Permissions**: Attach an IAM role to the EC2 instance hosting the OvalEdge application with the following policy:

  ```json
  {
    "Version": "2012-10-17",
    "Statement": [
      {
        "Effect": "Allow",
        "Action": "secretsmanager:GetSecretValue",
        "Resource": "arn:aws:secretsmanager:<region>:<account-id>:secret:secrets*"
      }
    ]
  }
  ```

  * Ensure the IAM role is associated with the instance as an **Instance Profile**.

## **Integration Steps**

### **Configure oasis.properties**

* Log in to the OvalEdge Tomcat server.
* Open the configuration file:

  ```bash
  sudo nano /opt/ovaledge/conf/oasis.properties
  ```
* Add or update the following configurations:

  ```properties
  ### AWS Secrets Manager Configurations ###
  aws-secrets=true
  aws-secretregion=us-west-2
  aws-secretname=secrets

  # Vault Keys for Database & Elasticsearch
  secret.key.jdbcstring=jdbcstringurl
  secret.key.username=username
  secret.key.password=password
  secret.key.read.jdbcstring=readjdbcstringurl
  secret.key.encryptdecryptkey=encryptdecryptkey
  secret.key.eshost=eshost
  secret.key.esport=esport
  secret.key.esprotocol=esprotocol
  secret.key.esusername=esusername
  secret.key.espassword=espassword
  ```
* Replace **`aws-secretname=secrets`** with the actual name of your AWS Secret, if different.
* **Restart Tomcat**
  * Restart the Tomcat service to apply the new configurations:

    ```bash
    sudo systemctl restart tomcat
    ```

***

Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ovaledge.com/release8.2/deployment-and-maintenance/integration/aws-secrets-manager-with-vm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
