# HashiCorp Vault

<div class="docs-screenshot-compact">

   ![Grouporder](./assets/shot-01.png)

   </div>

   <div class="docs-screenshot-compact">

   ![Grouporder](./assets/shot-02.png)

   </div>

## About Mindflow

Mindflow is an AI-driven automation platform designed for SecOps. It empowers teams to operate at a new level of performance by intuitively automating repetitive mundane tasks and seamlessly orchestrating all their tools. With the largest library of integrated services in the market and revolutionary generative-AI automation, Mindflow makes impactful automation simple and gives back power to IT practitioners.

You can find a [**demo of Mindflow here**](https://share.vidyard.com/watch/4H4VkRESpsBBoE4svi1gk6?).

## About the Vault Integration

We developed the integration based on the [Vault HTTP API documentation](https://developer.hashicorp.com/vault/api-docs). It is available to all Mindflow users and mutual customers.

   <div class="docs-screenshot-compact">

   ![Hashicorp Vault integration in Mindflow](./assets/hashicorp-vault-integration-mindflow.png)

   </div>

Hashicorp Vault integration in Mindflow

## Authentication

## Setting up

Before you can create and deploy a playbook in Mindflow, you would need to get the following information from Vault:

1. **Vault Address**: Vault cluster URL

2. **Vault Namespace**

3. **role_id**

4. **Secret_id**

All of this information is available in your organization’s Vault. Head over to a Vault Cluster and fetch the information using the steps below as a quick reference.

   <div class="docs-screenshot-compact">

   ![Secretid](./assets/secretid-5.png)

   </div>

## Retrieve Token in Mindflow

Use the dedicated built-in step, **Transform Data**, to add the credentials you found using the steps above to retrieve the **token**.

   <div class="docs-screenshot-compact">

   ![Secretid](./assets/secretid.png)

   </div>

## Authentication Vault in Mindflow

Then, configure my Authenticate to Vault step to retrieve the token needed to interact with the endpoints available from the Hashicorp Vault API.

   <div class="docs-screenshot-compact">

   ![Secretid](./assets/secretid-6.png)

   </div>

When the step is run, it will return the token.

   <div class="docs-screenshot-compact">

   ![Secretid](./assets/secretid-3.png)

   </div>

This token can now be used in Mindflow to authenticate and execute flows.

## Example Use Cases

## 1. Generate Temporary AWS Credentials for Secure API Access

   <div class="docs-screenshot-compact">

   ![Secretid](./assets/secretid-4.png)

   </div>

**Overview:** When a user sends a command, a Slack webhook initiates the flow. Vault generates temporary AWS credentials, updates AWS configurations, and logs the action in Jira. Confirmation is sent back to Slack.

**Benefits:** This use case enhances security by automating the issuance of temporary credentials, reducing manual errors. It logs all changes for compliance and auditing.

## 2. Secure Jira Ticket Creation via Slack Using Vault

   <div class="docs-screenshot-compact">

   ![Secretid](./assets/secretid-7.png)

   </div>

**Overview:** A Slack command triggers the flow to authenticate with Vault, retrieve a Jira token, and create a Jira issue, ensuring no credentials are stored.

**Benefits:** Increased security by centralized token management by streamlining issue reporting directly from Slack. This use case eliminates the need to store sensitive credentials.

## 3. Monitor HashiCorp Vault Replication Status via Slack

   <div class="docs-screenshot-compact">

   ![Secretid](./assets/secretid-2.png)

   </div>

**Overview:** The flow regularly checks Vault replication statuses, identifies issues, and reports them through Slack. Error handling is included to manage potential failures.

**Benefit:** Immediate notifications in Slack streamline incident response and quick remediation of replication issues.
