# CyberArk Conjur

- Published on Sep 17, 2024
- 1 minute(s) read

This article describes the steps required to integrate CyberArk Conjur with Hyperscience.

## Configure CyberArk Conjur

To configure the CyberArk Conjur integration, follow the steps below:

1. In CyberArk Conjur, create the policies, roles, and credentials for Hyperscience to use. Make sure to grant permissions to all variables that the application will use. To learn more, see CyberArk’s [Policy Management](https://docs.conjur.org/Latest/en/Content/Operations/Policy/policy-overview.htm?tocpath=Fundamentals%7CPolicy%20Management%7C_____0) and [Conjur Default Authenticator](https://docs.conjur.org/Latest/en/Content/Operations/Services/default_authn.htm?tocpath=Fundamentals%7CAuthentication%7C_____2).

2. In v32 to v35.0.6, this is done by the _secrets.yml_ file. See the “ [v32 to v35.0.6 Configure _secrets.yml_](https://help.hyperscience.ai/deployment/docs/cyberark-conjur#v32-to-v3506-configure-secretsyml)” section below for more information.

3. In v35.0.7 and later, a _.secrets_ file can be used instead of _secrets.yml_. This file uses the same structure for variables as the “.env” file. For example, a typical variable in the _.secrets_ file looks like this:

```plaintext
FORMS_DB_PASS=hs/prod/db_password
```

4. In the “.env” file, set the following environment variables to their appropriate values:

```plaintext
CONJUR_APPLIANCE_URL=http://conjur.example.com:18080
CONJUR_CERT_FILE=
CONJUR_ACCOUNT=myConjurAccount
CONJUR_AUTHN_LOGIN=host/examplehost.example.com
CONJUR_AUTHN_API_KEY=
```

To learn more about environment variables, see CyberArk’s [Configuration](https://github.com/cyberark/summon-conjur#configuration) documentation.

5. Confirm that the tool works outside of Hyperscience.

6. In the “.env” file, add the following variable and value:

```plaintext
HS_SECRETS_MANAGER=conjur
```

7. Restart the Hyperscience application with the following commands. Make sure that the commands work as expected.

```plaintext
sudo bash run.sh init
sudo bash run.sh --restart --clean
```

8. Rotate the secrets and restart the application with the above commands again. Make sure that the Hyperscience application starts successfully upon restart. Depending on the version used, the _secrets.yml_ or _.secrets_ file maps any secrets to retrieve the appropriate environment variables.

### v32 to v35.0.6 Configure _secrets.yml_

The _secrets.yml_ file defines a format for mapping an environment variable to a location where a secret is stored. There are no sensitive values in the _secrets.yml_ file itself.

For example, a typical _secrets.yml_ file looks like this:

```powershell
FORMS_DB_PASS: !var hs/prod/db_password
```

To learn more about _secrets.yml_, see Summon’s [_secrets.yml_](https://cyberark.github.io/summon/#secrets.yml) guide. Summon is a command-line tool that reads a file in _secrets.yml_ format and injects secrets as environment variables into any process. You do not need to download Summon, as the tool is part of our CyberArk Conjur integration.
