From 6cad94847a14918543e06764f82a2e127dfb8805 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 30 Nov 2026 10:23:16 +0000 Subject: [PATCH 1/2] [Automated] Draft docs (kagent): controller/push: preserve signing key handoffs across restarts Signed-off-by: GitHub Action --- .../operations/operational-considerations.md | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/docs-site/content/kagent/main/operations/operational-considerations.md b/docs-site/content/kagent/main/operations/operational-considerations.md index 066080f3..866d8c71 100644 --- a/docs-site/content/kagent/main/operations/operational-considerations.md +++ b/docs-site/content/kagent/main/operations/operational-considerations.md @@ -275,8 +275,10 @@ To sign callbacks, generate one unencrypted PKCS#8 Ed25519 key and store it in a | Setting | Description | | ------- | ----------- | - | `controller.push.signing.secretName` | The Secret that holds `private-key.pem`. Leave it empty to send push notifications without JSON Web Token (JWT) authentication. Helm references a Secret that you create, and neither generates nor rotates signing keys. If you set this field, the chart mounts the key and sets `config.push.signingPrivateKeyFile` to `/etc/kagent/secrets/push-private-key.pem`. | - | `config.push.issuer` | The stable URL that webhook receivers trust as the JWT issuer. If you omit the key, the chart derives the issuer from `ui.externalUrl`, and then from the in-cluster A2A gateway URL. An empty string is rejected, because the controller requires an absolute `http://` or `https://` URL. | + | `controller.push.signing.secretName` | The Secret that holds `private-key.pem`. Leave it empty to send push notifications without JSON Web Token (JWT) authentication. Helm references a Secret that you create, and neither generates nor rotates signing keys. If you set this field, the chart mounts the key and sets `config.push.signingPrivateKeyFile` to `/etc/kagent/secrets/push-private-key.pem`. |{{< version exclude-if="1.0.x,0.x" >}} + | `controller.push.signing.previousSecretName` | Optional. The Secret that holds the previous `private-key.pem` during a signing-key handoff. If you set this field, the chart mounts the key and sets `config.push.previousSigningPrivateKeyFile` to `/etc/kagent/secrets/push-previous-private-key.pem`. The chart fails rendering when you set this field without `controller.push.signing.secretName` or `config.push.signingPrivateKeyFile`. |{{< /version >}} + | `config.push.issuer` | The stable URL that webhook receivers trust as the JWT issuer. If you omit the key, the chart derives the issuer from `ui.externalUrl`, and then from the in-cluster A2A gateway URL. An empty string is rejected, because the controller requires an absolute `http://` or `https://` URL. |{{< version exclude-if="1.0.x,0.x" >}} + | `config.push.signingKeyActivationDelay` | How long a replacement public key is published before the controller signs callbacks with it. The default is `300s`, and the maximum is `86400s`. Set the delay to cover the longest receiver JWKS refresh interval. |{{< /version >}} ```bash helm upgrade kagent \ @@ -291,6 +293,55 @@ When a signing key is configured, each callback attempt carries a newly issued f Every controller replica must load the same key. After you rotate the key, restart all controller pods together, because replicas that run on different keys publish different JSON Web Key Sets. +{{< version exclude-if="1.0.x,0.x" >}} +### Rotate the push signing key {#rotate-the-push-signing-key} + +To rotate the signing key, mount the new key as the current key and the old key as the previous key. This handoff keeps the activation delay across controller restarts. The controller reads the previous key only at startup and polls the current key for changes every 12-18 seconds. + +1. Generate a new signing key. + ```bash + openssl genpkey -algorithm ED25519 -out next-private-key.pem + ``` + +2. Store the key in a new Secret. The Secret must hold the key under the `private-key.pem` key. + ```bash + kubectl create secret generic kagent-push-signing-next -n kagent \ + --from-file=private-key.pem=next-private-key.pem + ``` + +3. Update your Helm values to name both Secrets. Set `controller.push.signing.secretName` to the new Secret and `controller.push.signing.previousSecretName` to the Secret that currently signs callbacks. + ```yaml + controller: + push: + signing: + secretName: kagent-push-signing-next + previousSecretName: kagent-push-signing + config: + push: + signingKeyActivationDelay: 300s + ``` + + | Setting | Description | + | ------- | ----------- | + | `controller.push.signing.secretName` | The Secret that contains the new key. | + | `controller.push.signing.previousSecretName` | The Secret that contains the key that is active before the rotation starts. | + | `config.push.signingKeyActivationDelay` | How long the new public key stays in JWKS before the controller uses the new private key for signatures. The controller adds a fixed 30-second buffer after this delay. | + +4. Apply the values to the kagent release. + ```bash + helm upgrade kagent \ + {{< reuse "kagent-docs/snippets/helm-path.md" >}}/{{< reuse "kagent-docs/snippets/helm-kagent.md" >}} \ + --version {{< reuse "kagent-docs/versions/kagent.md" >}} \ + --namespace kagent \ + --reuse-values \ + --values kagent.yaml + ``` + +During the handoff, each controller replica keeps signing with the previous key until its own activation delay finishes. The JWKS endpoint continues to publish keys that any replica still needs to verify outstanding callbacks. After the current key is recorded as active, a restarted controller can start with the current key even if the previous key file is no longer mounted. + +For Container Storage Interface (CSI) or custom mounts that do not use Helm-managed Secrets, set `config.push.previousSigningPrivateKeyFile` to the old key path before you replace the current file. This field requires `config.push.signingPrivateKeyFile`, and a relative path resolves from the controller configuration file directory. If the previous file is missing before the current key is active, the controller fails startup. +{{< /version >}} + ## Tune push notification delivery Each controller replica delivers A2A push notification callbacks concurrently, so one slow receiver does not delay the callbacks to other receivers. When many receivers respond slowly, raise the concurrency limit or shorten the timeout in your {{< reuse "kagent-docs/snippets/name-product.md" >}} Helm values. From 125b1853ea2e3f2a2c15dd259e88ac3f477d2b49 Mon Sep 17 00:00:00 2001 From: Rachael Graham Date: Mon, 30 Nov 2026 13:12:02 -0600 Subject: [PATCH 2/2] Update operational-considerations.md Signed-off-by: Rachael Graham --- .../kagent/main/operations/operational-considerations.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs-site/content/kagent/main/operations/operational-considerations.md b/docs-site/content/kagent/main/operations/operational-considerations.md index 41dd6f82..6a3222e8 100644 --- a/docs-site/content/kagent/main/operations/operational-considerations.md +++ b/docs-site/content/kagent/main/operations/operational-considerations.md @@ -277,7 +277,7 @@ To sign callbacks, generate one unencrypted PKCS#8 Ed25519 key and store it in a | Setting | Description | | ------- | ----------- | | `controller.push.signing.secretName` | The Secret that holds `private-key.pem`. Leave it empty to send push notifications without JSON Web Token (JWT) authentication. Helm references a Secret that you create, and neither generates nor rotates signing keys. If you set this field, the chart mounts the key and sets `config.push.signingPrivateKeyFile` to `/etc/kagent/secrets/push-private-key.pem`. | - | `controller.push.signing.previousSecretName` | Optional. The Secret that holds the previous `private-key.pem` during a signing-key handoff. If you set this field, the chart mounts the key and sets `config.push.previousSigningPrivateKeyFile` to `/etc/kagent/secrets/push-previous-private-key.pem`. The chart fails rendering when you set this field without `controller.push.signing.secretName` or `config.push.signingPrivateKeyFile`. | + | `controller.push.signing.previousSecretName` | Optional. The Secret that holds the previous `private-key.pem` during a signing-key handoff. If you set this field, the chart mounts the key and sets `config.push.previousSigningPrivateKeyFile` to `/etc/kagent/secrets/push-previous-private-key.pem`. The chart fails to render when this field is set without `controller.push.signing.secretName` or `config.push.signingPrivateKeyFile`. | | `config.push.issuer` | The stable URL that webhook receivers trust as the JWT issuer. If you omit the key, the chart derives the issuer from `ui.externalUrl`, and then from the in-cluster A2A gateway URL. An empty string is rejected, because the controller requires an absolute `http://` or `https://` URL. | | `config.push.signingKeyActivationDelay` | How long the controller publishes a replacement public key before it signs callbacks with the replacement key. The default is `300s`, and the maximum is `86400s`. Add enough time for receivers to refresh their JWKS cache. The controller also adds a fixed 30-second buffer before signing with the replacement key. | @@ -311,7 +311,7 @@ To rotate the signing key, mount the new key as the current key and the old key --from-file=private-key.pem=next-private-key.pem ``` -3. Update your Helm values to name both Secrets. Set `controller.push.signing.secretName` to the new Secret and `controller.push.signing.previousSecretName` to the Secret that currently signs callbacks. +3. In `kagent.yaml`, name both Secrets. ```yaml controller: push: @@ -327,7 +327,7 @@ To rotate the signing key, mount the new key as the current key and the old key | ------- | ----------- | | `controller.push.signing.secretName` | The Secret that contains the new key. | | `controller.push.signing.previousSecretName` | The Secret that contains the key that is active before the rotation starts. | - | `config.push.signingKeyActivationDelay` | How long the new public key stays in JWKS before the controller uses the new private key for signatures. The controller adds a fixed 30-second buffer after this delay. | + | `config.push.signingKeyActivationDelay` | How long the new public key stays in the JWKS before the controller signs callbacks with the new private key. | 4. Apply the values to the kagent release. ```bash @@ -341,7 +341,7 @@ To rotate the signing key, mount the new key as the current key and the old key During the handoff, each controller replica keeps signing with the previous key until its own activation delay finishes. The JWKS endpoint continues to publish keys that any replica still needs to verify outstanding callbacks. After the current key is recorded as active, a restarted controller can start with the current key even if the previous key file is no longer mounted. -For CSI or custom mounts that do not use Helm-managed Secrets, set `config.push.previousSigningPrivateKeyFile` to the old key path before you replace the current file. This field requires `config.push.signingPrivateKeyFile`, and a relative path resolves from the controller configuration file directory. If the previous file is missing before the current key is active, the controller fails startup. +For CSI or custom mounts that do not use Helm-managed Secrets, set `config.push.previousSigningPrivateKeyFile` to the old key path before you replace the current file. This field requires `config.push.signingPrivateKeyFile`, and a relative path resolves from the controller configuration file directory. If the previous file is missing before the current key is active, the controller fails to start. ## Tune push notification delivery