---
updatedAt: 2026-10-27T04:42:58.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/installation/llms.txt
---

# Manage Keys

Generate and bootstrap master keys and join keys using openssl to secure inter-service communication.

This page covers best practices for creating and managing keys.

You can also use [pairing tokens](pairing-tokens) to establish communication between services.

<Callout icon="❗️" theme="error">
  **Important**

  Keep the join key, master key, and other trusted keys safe. Do **not** share them with external parties.
</Callout>

### Master Key

The master key is an AES secret key (128 or 256 bit) that is used by Artifactory to securely synchronize files between cluster nodes. It is used to encrypt and decrypt shared data in the database. The master key is **not** used for communication between the different JFrog services (unlike the join key).

Each JFrog Platform component has its own master key. In HA environments, all instances of a component must have the same master key value, on all HA nodes.

<Callout icon="❗️" theme="error">
  **The Master Key Cannot Currently Be Rotated**

  Unlike the join key, there is no supported procedure for changing an existing master key. The master key encrypts data already stored in the database, including other stored secrets. If you replace it without re-encrypting that data, decryption breaks and you can lose data.
</Callout>

If the concern is a security incident rather than key exposure, for example compromised admin or access tokens during CVE remediation, the master key does not need to change. It only encrypts data at rest and plays no role in token validation. Instead, revoke or rotate the specific compromised tokens, rotate the [join key](#rotate-the-join-key) if service-to-service trust is also suspected, or invalidate every outstanding token at once by rotating the signing certificate pair described in [Custom Token Certificates](custom-token-certificates).

### Join Key

The JFrog join key establishes trust between JFrog services using a shared secret for HMAC-SHA256 (JWS HS256) token signing. The join.key is used between microservices of the same service, for example between Artifactory and Access.

Trust is established as follows:

1. To establish trust, the join key is shared between all JFrog services,
2. Services use token-based authentication for communication: each service creates tokens and signs them with the join.key.

   If the join.key is not identical on the trusted services, communication between services fails.

<Callout icon="📘" theme="info">
  **Automation Recommendation**

  For automation purposes, we recommend generating your own Join Key and sharing it with every new instance. Access will then use the provided join key instead of the auto-generated one, save it to its database, and share it with Artifactory.
</Callout>

#### View the Join Key

To view the join key in the JFrog Platform:

1. Go to **Administration**  > **Security** > **General** > **Connection Details**.
2. In the **Current Password** field, enter your login password, and click **Unlock**.

   You can view and copy the key from the **Join Key** field.

The encrypted key is stored in the file `$JFROG_HOME/artifactory/var/etc/security/join.key`.

#### Retrieve the Master Key from a Kubernetes Pod

In Helm/Kubernetes installations, retrieve an existing master key directly from a running Artifactory pod:

```bash
POD=$(kubectl get pods -n <namespace> -l app=artifactory -o jsonpath='{.items[0].metadata.name}')
kubectl exec -it ${POD} -n <namespace> -c artifactory -- cat /opt/jfrog/artifactory/var/etc/security/master.key
```

Use this when [upgrading a Helm installation](upgrade-helm-charts) that now requires the master key to be passed explicitly. See [Service Pod Architecture Changes](service-pod-architecture-changes#mandatory-join-key-and-master-key) for the full requirement.

#### Rotate the Join Key

Unlike the master key, the join key can be safely rotated. To rotate it (for example, after suspected exposure):

1. Generate a new key: `openssl rand -hex 32`.
2. Apply it to every component that currently shares the old join key, using whichever provisioning method your installation uses:
   * **Helm**: update the Secret referenced by `global.joinKeySecretName` (recommended, see [Set Keys via Kubernetes Secrets](#set-keys-via-kubernetes-secrets-recommended-for-production) below), or pass the new value directly via `global.joinKey`, then run `helm upgrade` for every release that shares it.
   * **Ansible**: set the new value as `join_key` in `group_vars/all/vars.yml` (or pass it via `--extra-vars`). Also set `artifactory_systemyaml_override: true` (and the equivalent `xray_systemyaml_override` / `distribution_systemyaml_override` for other products) for the run. By default the playbook skips rewriting `system.yaml` if it already exists, so without this the new key is never applied. Then re-run the playbook against every host (see the [Ansible Quick Start](install-jfrog-platform-via-ansible-quick-start)).
   * **Standalone**: use [Bootstrap the join key using file system](#bootstrap-the-join-key-using-file-system) below, on every node.
3. Apply the change to all trusting services within the same maintenance window. Services with mismatched join keys cannot communicate with each other until every instance is updated.
4. Confirm trust is restored by checking service logs for authentication errors between components.

#### View the Master Key via CLI

Run the following kubectl command in your terminal:

```shell
POD=$(kubectl get pods -n <NAMESPACE> -l app=artifactory -o jsonpath='{.items[0].metadata.name}')
export MASTER_KEY=$(kubectl exec -it ${POD} -n <NAMESPACE> -c artifactory -- cat /opt/jfrog/artifactory/var/etc/security/master.key)
```

### Create keys

By default the *join.key* and *master.key* files are automatically generated by Artifactory during the initial start up of the service.

A different key (hexadecimal encoded) can be created using the following command.

```bash
openssl rand -hex 32
```

### Bootstrap with your own keys using the system.yaml file

This method only applies if you have installed but not started your service yet.

1. Save the `security` section under `shared` in the system.yaml file (`shared.security.masterKey` / `shared.security.joinKey`) with the generated string for each key, using the *masterKey* parameter for the master key and the *joinKey* parameter for the join key.
2. Start the service.

<Callout icon="📘" theme="info">
  **Helm Installations: keysPassedViaSystemyaml**

  If your keys are already defined this way via `artifactory.extraSystemYaml`, `artifactory.systemYaml`, or `systemYamlOverride`, set `--set keysPassedViaSystemyaml=true` on `helm install`/`helm upgrade` to skip the chart's mandatory Join Key/Master Key validation. See [Service Pod Architecture Changes](service-pod-architecture-changes#mandatory-join-key-and-master-key).
</Callout>

### Bootstrap the join key using file system

This method can be used even if you already have a join key.

1. Save the generated string file as *join.key.*
2. Delete the existing *join.key* from `$JFROG_HOME/artifactory/var/etc/security/`.
3. Place each file in the `$JFROG_HOME/artifactory/var/bootstrap/access/etc/security` directory.
4. Add the Artifactory permissions to the directories and the join.key file. For example,

   ```bash
   chown -R artifactory:artifactory access/etc/security/join.key
   ```
5. Start the service.

### Configure Keys in Helm Charts

The same fields apply when you install with the `artifactory` chart:

* `global.masterKey` and `global.joinKey`, or `global.masterKeySecretName` and `global.joinKeySecretName`.
* Set at the `global` level, they pass the same keys to every subchart (Artifactory, Xray, Distribution, Catalog).
* Starting with `jfrog-platform` chart version 11.7.0, the chart has no default value for either key.

See the [Helm Quick Start](install-jfrog-platform-via-helm-quick-start) for the full install flow.

<Callout icon="⚠️" theme="warning">
  **Keys Are Now Required**

  Omitting master and join keys from a `helm install` or `helm upgrade` command causes Helm to regenerate them, which breaks the existing installation. Always pass the same keys on every call.
</Callout>

#### Set Keys via --set Flags

```bash
export MASTER_KEY=$(openssl rand -hex 32)
export JOIN_KEY=$(openssl rand -hex 32)

helm upgrade --install jfrog-platform jfrog/jfrog-platform \
  --set global.masterKey=${MASTER_KEY} \
  --set global.joinKey=${JOIN_KEY} \
  --namespace jfrog-platfrom --create-namespace
```

#### Set Keys via Kubernetes Secrets (Recommended for Production)

1. Create a Kubernetes secret for each key.

   ```bash
   kubectl create secret generic my-masterkey-secret \
     --from-literal=master-key=${MASTER_KEY} \
     --namespace artifactory

   kubectl create secret generic my-joinkey-secret \
     --from-literal=join-key=${JOIN_KEY} \
     --namespace artifactory
   ```

2. Reference the secrets in `values.yaml`.

   ```yaml
   global:
     masterKeySecretName: my-masterkey-secret
     joinKeySecretName: my-joinkey-secret
   ```

   Or pass directly via `--set`:

   ```bash
   helm upgrade --install jfrog-platform jfrog/jfrog-platform \
     --set global.masterKeySecretName=my-masterkey-secret \
     --set global.joinKeySecretName=my-joinkey-secret \
     --namespace jfrog-platform --create-namespace
   ```

#### Upgrade Note Artifactory Chart

If you are upgrading from a release prior to 7.161.x, move `artifactory.masterKey` and `artifactory.joinKey` to `global.masterKey` and `global.joinKey` in your `helm upgrade` commands and `values.yaml` files. The `artifactory.*` values still work as a lower-precedence fallback, but `global.*` is the current mechanism and is what other chart-managed services (Frontend, JFBus, JFmelt) read for their own mandatory key validation.

### Configure Keys in Ansible Installations

Starting with `jfrog.platform` collection version 11.7.x, `master_key` and `join_key` are mandatory for every installation and upgrade. The collection no longer ships a usable default for either key. See the [Ansible Quick Start](install-jfrog-platform-via-ansible-quick-start) for the full install flow. See [Install the JFrog Platform Using Ansible](install-the-jfrog-platform-using-ansible) for upgrade requirements.

#### Set Keys via --extra-vars

```bash
MASTER_KEY_VALUE=$(openssl rand -hex 32)
JOIN_KEY_VALUE=$(openssl rand -hex 32)

ansible-playbook -vv platform.yml -i hosts.ini \
  --extra-vars "master_key=$MASTER_KEY_VALUE join_key=$JOIN_KEY_VALUE"
```

#### Set Keys via group\_vars

Add the values directly to `group_vars/all/vars.yml`:

```yaml
master_key: "<generated master key>"
join_key: "<generated join key>"
```

<Cards>
  <Card title="Pairing Tokens" href="pairing-tokens" icon="fa-solid fa-link">
    A pairing token establishes trust between different JFrog microservices. Available from Artifactory version 7.29.7.
  </Card>

  <Card title="Create an Automatic Admin Token" href="create-an-automatic-admin-token" icon="fa-solid fa-user-shield">
    Create your own admin-scoped access token without using the JFrog Platform UI or via another token. Available from Artifactory release 7.38.4.
  </Card>
</Cards>