Skip to content

Correct the state encryption, renew-certificate and JWT signing algorithm docs - #5529

Open
JoshVanL wants to merge 1 commit into
dapr:v1.19from
JoshVanL:pq/pr/03-docs-fixes
Open

JoshVanL wants to merge 1 commit into
dapr:v1.19from
JoshVanL:pq/pr/03-docs-fixes

Conversation

@JoshVanL

@JoshVanL JoshVanL commented Dec 4, 2026

Copy link
Copy Markdown
Member

Thank you for helping make the Dapr documentation better!

Please follow this checklist before submitting:

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Read the contribution guide (author to confirm)
  • Commands include options for Linux, MacOS, and Windows within tabpane (not applicable: one existing command changes its argument)
  • New file and folder names are globally unique (not applicable: no new files)
  • Page references use shortcodes instead of markdown or URL links
  • Images use HTML style and have alternative text (not applicable: no images)
  • Places where multiple code/command options are given have tabpane (not applicable)

In addition, please fill out the following to help reviewers understand this pull request:

Description

This PR corrects three statements in the security docs. The text names no Dapr version, so it is true for 1.17, 1.18 and 1.19 and can be backported unchanged.

State encryption. The docs said encryption is "based on AES256" and recommended 128-bit keys. Dapr uses AES-GCM, and the key length (16, 24 or 32 bytes) selects AES-128, 192 or 256 (pkg/encryption/encryption.go). The pages now say AES-GCM, recommend 256-bit keys, and the example generates a 32-byte key. A typo ("errors and exists") is fixed on the same line.

dapr mtls renew-certificate. The key algorithm table describes the CA that Sentry generates itself, which is Ed25519 from 1.18. The CLI is different: it generates its root key as ECDSA P-256 on every cli release from v1.17.0 to v1.19.1. The security concept page, the mTLS page and the command reference now say so. They also say that --private-key must be an ECDSA key in SEC 1 PEM (-----BEGIN EC PRIVATE KEY-----), because the CLI reads it with x509.ParseECPrivateKey.

EdDSA for JWT signing. The "JWT signing" paragraph now lists the values that --jwt-signing-algorithm and dapr_sentry.jwt.signingAlgorithm accept, and says EdDSA is not supported. Sentry either exits at startup with unsupported signature algorithm: EdDSA (with [PR link: dapr fixes]) or starts and leaves every sidecar without an identity. Both outcomes are described, so the text holds before and after that fix.

Design choices for reviewers

  • The v1.17 docs get the change too. For 1.17 alone there was no contradiction (Sentry and the CLI both used P-256), but the added text is still true there.
  • The EdDSA wording covers both outcomes so it stays true for patch releases without the startup check. Once every supported line has the fix, it can say "exits at startup" plainly.
  • The SEC 1 restriction on --private-key is new information. A PKCS Improve Actors conceptual docs and add dotnet sdk usage. #8 PRIVATE KEY file fails today.
  • The sample key in the state encryption example is a made-up 64-character hex string, not real command output.
  • The workflow history signing pages still recommend --private-key <existing-root-key> without saying it must be an EC key. Left alone.

Testing

  • Hugo build of this branch on 03/12/2026: exit 0, 1149 English pages, only Hugo deprecation warnings. Hugo was 0.168.0 with the lang: lines removed from hugo.yaml, not the pinned 0.147.8.
  • The new link target #root-and-issuer-certificate-upgrade-using-cli-recommended exists in the built mTLS page.
  • The facts were checked by reading code: cli pkg/kubernetes/renew_certificate.go at every cli tag from v1.17.0 to v1.19.1, and dapr bundle.GenerateX509 and Sentry validate.go on release-1.17, 1.18 and 1.19. dapr mtls renew-certificate was not run against a cluster.

Issue reference

None.

…ithm docs

- docs: state encryption is AES-GCM, recommend 256-bit keys
- docs: say that dapr mtls renew-certificate generates an ECDSA P-256 root
- docs: EdDSA is not supported for Sentry JWT signing

Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL
JoshVanL requested review from a team as code owners December 4, 2026 20:22
Copilot AI balanced review requested due to automatic review settings December 4, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The security documentation updates have no active review issues.

No open issues 🎉

What changed in this PR

This PR corrects Dapr security documentation for state encryption, certificate renewal, and JWT signing.

Changes:

  • Documents AES-GCM support and recommends 256-bit keys, updating the key-generation example.
  • Clarifies CLI-generated root keys and the SEC 1 PEM requirement for supplied ECDSA keys.
  • Lists supported JWT signing algorithms and explains EdDSA failure behavior.
File Description
daprdocs/​content/​en/​reference/​cli/​dapr-mtls/​dapr-mtls-renew-certificate.md Clarifies root-key generation and private-key format requirements.
daprdocs/​content/​en/​operations/​security/​mtls.md Explains CLI certificate-renewal key algorithms and accepted key format.
daprdocs/​content/​en/​developing-applications/​building-blocks/​state-management/​howto-encrypt-state.md Recommends 256-bit keys, updates the example, and fixes a typo.
daprdocs/​content/​en/​concepts/​security-concept.md Corrects encryption details and clarifies certificate and JWT signing algorithms.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants