You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6f9ac38
Browse filesBrowse the repository at this point in the historyBrowse files
authored
[Automated] Draft docs (kagent): controller/push: hot reload signing keys with staged activation (#750)
* [Automated] Draft docs (kagent): controller/push: hot reload signing keys with staged activation
Signed-off-by: GitHub Action <action@github.com>
* conventions
Signed-off-by: Rachael Graham <rachael.graham@solo.io>
---------
Signed-off-by: GitHub Action <action@github.com>
Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Rachael Graham <rachael.graham@solo.io>
Copy file name to clipboardExpand all lines: docs-site/content/kagent/main/examples/a2a-agents.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -348,7 +348,7 @@ Build the receiver around these rules:
348
348
349
349
* Any `2xx` response acknowledges a delivery. Every other response counts as a failed attempt, and a redirect is one of them, so register the final callback URL.
350
350
* A delivery can arrive more than once, or out of order. Treat `GetTask` as the source of truth for the task's current state.
351
-
*kagent makes up to ten attempts for each state that a task publishes, and the count carries across controller restarts. After the last attempt, kagent drops that delivery but keeps the callback registered, so the next state still reaches the receiver.
351
+
*The controller makes up to 20 attempts for each state that a task publishes, and the count carries across controller restarts. Retry waits start at 5 seconds and double to a maximum of 60 seconds. After the last attempt, the controller drops that delivery but keeps the callback registered, so the next state still reaches the receiver.
352
352
* kagent does not expose delivery status, so nothing reports whether a delivery failed.
353
353
354
354
To tune delivery, configure the following Helm values under `config.push`.
@@ -358,6 +358,7 @@ To tune delivery, configure the following Helm values under `config.push`.
358
358
|`maxConcurrency`|`10`| The number of deliveries that each controller replica sends at once. Setting `1` sends them one at a time. |
359
359
|`sendTimeout`|`5s`| How long one HTTP attempt can take before it counts as failed. |
360
360
|`recoveryInterval`|`60s`| How often an idle controller scans for deliveries that a missed wake-up left pending. |
361
+
|`signingKeyActivationDelay`|`300s`| How long the controller publishes a replacement signing key before it signs callbacks with the replacement key. Use a value that covers the interval at which the receiver refreshes its cached JSON Web Key Set (JWKS). The maximum is `86400s`. |
361
362
362
363
### Secure callback deliveries
363
364
@@ -390,7 +391,9 @@ kagent does not generate its own signing key, so you are responsible for creatin
390
391
--set config.push.issuer=https://kagent.example
391
392
```
392
393
393
-
The issuer that a receiver trusts must match the host that it fetches the JSON Web Key Set (JWKS) from. When you omit `config.push.issuer`, Helm derives it from `ui.externalUrl` and then from the in-cluster A2A gateway URL. Either fallback can point to a host that does not serve the JWKS.
394
+
The issuer that a receiver trusts must match the host that it fetches the JWKS from. When you omit `config.push.issuer`, Helm derives it from `ui.externalUrl` and then from the in-cluster A2A gateway URL. Either fallback can point to a host that does not serve the JWKS.
395
+
396
+
To rotate a key without interrupting signed deliveries, update the Secret, and set `config.push.signingKeyActivationDelay` to a value that covers the JWKS cache refresh of your receivers. The controller reloads the mounted key file every 15 seconds, publishes the replacement public key before it signs callbacks with the key, and adds a fixed 30-second buffer to the configured delay.
394
397
395
398
4. Confirm that the controller publishes a verification key. Before you set the Secret, this path returns `404`.
Copy file name to clipboardExpand all lines: docs-site/content/kagent/main/operations/operational-considerations.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,6 +269,7 @@ To sign callbacks, generate one unencrypted PKCS#8 Ed25519 key and store it in a
269
269
config:
270
270
push:
271
271
issuer: https://kagent.example.com
272
+
signingKeyActivationDelay: 300s
272
273
```
273
274
274
275
`controller.push.signing`configures the Kubernetes packaging of the key, and `config.push` configures the controller.
@@ -277,6 +278,7 @@ To sign callbacks, generate one unencrypted PKCS#8 Ed25519 key and store it in a
277
278
| ------- | ----------- |
278
279
| `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`. |
279
280
| `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. |
281
+
| `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. |
280
282
281
283
```bash
282
284
helm upgrade kagent \
@@ -289,7 +291,9 @@ To sign callbacks, generate one unencrypted PKCS#8 Ed25519 key and store it in a
289
291
290
292
When a signing key is configured, each callback attempt carries a newly issued five-minute Ed25519 JWT in an `Authorization: Bearer` header, and the `/.well-known/jwks.json` endpoint publishes the matching public key.
291
293
292
-
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.
294
+
Every controller replica must load the same key. The controller reopens the mounted key file every 15 seconds, so a Secret or Container Storage Interface (CSI) rotation does not need a controller restart. The JWKS endpoint publishes the replacement public key as soon as a replica reloads the key, but the replica keeps signing with the previous key until `config.push.signingKeyActivationDelay` plus the 30-second buffer passes. After activation, the previous public key stays in the JWKS until the five-minute tokens that it signed expire, plus 30 seconds of clock skew.
295
+
296
+
Restarting the controller loses key history. After a restart, the controller immediately signs with the key that is mounted in the pod and publishes only that key.
0 commit comments