> 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.3/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
