> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/signing-keys.md).

# Signing Keys

Manage signing keys for Debian, Alpine, and Wolfi repositories in Harness Artifacts, including key status, expiration, and deletion rules.

Harness Artifacts provides signing key management for the following repository types:

* Alpine
* Debian
* Wolfi

Signing keys enable cryptographic verification of repository metadata, allowing package managers to verify the integrity and authenticity of repository contents before installing packages.

Modern package managers require signed repository metadata by default. Without signing keys, clients encounter verification errors and cannot install packages securely.

***

## Supported registry types

The following table lists the registry types that support signing keys:

| Registry Type | Key Type | Package Manager |
| ------------- | -------- | --------------- |
| **Alpine**    | RSA      | apk             |
| **Debian**    | GPG      | apt             |
| **Wolfi**     | RSA      | apk             |

***

## How signing works

Harness signs repository metadata with the private key and provides the public key so clients can verify the signed metadata.

{% hint style="info" %}
**Metadata signing only**

Harness signs repository metadata. Publishers handle individual package signing separately.
{% endhint %}

***

## Key status lifecycle

Each signing key has a status that controls its behavior. The following table lists each status and its impact:

| Status       | Behavior                        | Can Change To                    | Impact                        |
| ------------ | ------------------------------- | -------------------------------- | ----------------------------- |
| **Active**   | Key signs metadata normally     | Inactive, Revoked                | Normal operations             |
| **Inactive** | Key disabled, metadata unsigned | Active (if not expired), Revoked | Uploads continue but unsigned |
| **Revoked**  | Permanently disabled            | Cannot change                    | Use when compromised          |

{% hint style="info" %}
**Delete a Signing Key**

You cannot delete a key by changing its status. Detach the key from every registry until **Referenced By** is 0, then click **Show more actions** (**⋮**), select **Delete**, and then confirm the key name. To delete a key, go to [Delete a key](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/signing-keys/manage-signing-keys.md#delete-a-key).
{% endhint %}

{% hint style="warning" %}
**Differences between Inactive and Revoked**

**Inactive**: Temporary disable. Uploads work but metadata is unsigned. Clients see warnings. Use for temporary suspension.

**Revoked**: Permanent disable. Cannot reactivate. Use only when a key is compromised.
{% endhint %}

***

## Before you begin

* **Signing key permissions**: **Signing Key Create / Edit** to import, generate, modify, or delete keys. **Signing Key View** to view keys. To assign these permissions, go to [RBAC in Harness](https://developer.harness.io/harness-platform/use-harness-platform/platform-access-control) and the [Artifact Management permissions](https://developer.harness.io/harness-platform/use-harness-platform/platform-access-control/permissions-reference#artifact-management).
* **Virtual registry**: Create at least one virtual registry (Debian, Alpine, or Wolfi). Attach signing keys only to virtual registries.

{% hint style="info" %}
**Key storage**

Harness stores private keys securely in the Harness secret manager.
{% endhint %}

***

## Configure signing key

To configure a working signed key:

1. **Create a signing key** (generate a new key or import an existing key).
2. **Attach the key to registries**.
3. **Configure clients** to trust the public key.

To follow the complete workflow, go to [Set up signing keys](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/signing-keys/setup-signing.md).

***

## Manage signing keys

To manage existing keys, use the following operations:

* View and filter all keys.
* Change key status (Active, Inactive, or Revoked).
* Configure expiration notifications.
* Detach or delete keys.

To manage keys, go to [Manage signing keys](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/signing-keys/manage-signing-keys.md).

***

## Reference

### Key management location

To manage signing keys, go to **Registries Settings** > **Signing Keys**.

### Key attachment location

To attach a signing key, go to **Registries** > select your registry > **Configuration** tab > **Signing keys** section.

### Public key URL format

Debian, Alpine, and Wolfi registries use the same public key URL from **Setup Client**:

```
https://app.harness.io/har/api/v3/signing-keys/<KEY_ID>/public-key?account_identifier=<ACCOUNT_ID>&routingId=<ACCOUNT_ID>
```

Replace the following placeholders:

* `<KEY_ID>`: Signing key identifier
* `<ACCOUNT_ID>`: Your Harness account ID

Public keys require no authentication. Clients fetch them without Harness credentials. To review the full client commands, go to [Configure clients](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/signing-keys/setup-signing.md#step-3-configure-clients).

***

## Expiration notifications

Harness sends notifications when keys approach expiration:

* 1 month before expiration
* 1 week before expiration
* Day of expiration

When a key expires, Harness automatically sets its status to Inactive. If that key is attached to a registry, signing is disabled and new metadata is unsigned.

To configure a notification rule for signing key expiration:

1. Go to **Account Settings**, then under **Notifications and alerts**, select **Notification Rules**.
2. Select **+ New Notification** to open the **New Notification Setup** wizard.
3. Enter a **Notification Name**, then click **Continue**.
4. From **Select Resource Type**, select **Artifact Registry**.
5. Select your scope: **All Organizations** or **Specified Organizations**, then click **Continue**.
6. Select **+ Add Condition**.
7. Enter a **Condition Name**.
8. From **Select Artifact Registry Events**, select **Signing key expiring soon**.
9. Select **Apply**, then click **Continue**.
10. Select an existing channel, or select **New Channel** to create one.
11. Leave **Enable on Save** selected to activate the rule immediately, then click **Submit**.

To complete the Artifact Registry notification wizard and channel setup, go to [Centralised notification](https://developer.harness.io/harness-platform/use-harness-platform/notifications-alerts-and-banners/notifications/centralised-notification#artifact-registry-notifications).

***

## Next steps

* [Set up signing keys](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/signing-keys/setup-signing.md): Create a key, attach it to a registry, and configure clients.
* [Manage signing keys](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/signing-keys/manage-signing-keys.md): View, detach, and delete keys.
