Skip to content

Add Base64 encoding support for SecretEncryptionConfiguration#2125

Open
MariusVolkhart wants to merge 1 commit intomicronaut-projects:4.16.xfrom
MariusVolkhart:mv/base64Secret
Open

Add Base64 encoding support for SecretEncryptionConfiguration#2125
MariusVolkhart wants to merge 1 commit intomicronaut-projects:4.16.xfrom
MariusVolkhart:mv/base64Secret

Conversation

@MariusVolkhart
Copy link

Mirrors the base64 encoding functionality that exists in SecretSignatureConfiguration to SecretEncryptionConfiguration, allowing JWT encryption secrets to be supplied as Base64-encoded strings.

Changes:

  • Add base64 field with getter/setter to SecretEncryptionConfiguration
  • Modify SecretEncryption constructor to decode Base64 secrets when the base64 flag is set (default: false)
  • Add comprehensive integration tests (JwtEncryptionBase64Spec) covering Base64 encoding, decryption, and backward compatibility
  • Add documentation (jwtEncryptionSecret.adoc) with examples of both plain text and Base64-encoded secret configuration
  • Update SecretEncryptionSpec with YAML configuration example

All examples use A256GCM encryption method with dir (direct) algorithm for modern AEAD-based encryption.

Backward compatibility is fully maintained with base64 defaulting to false.

Mirrors the base64 encoding functionality that exists in
SecretSignatureConfiguration to SecretEncryptionConfiguration,
allowing JWT encryption secrets to be supplied as Base64-encoded
strings.

Changes:
- Add base64 field with getter/setter to SecretEncryptionConfiguration
- Modify SecretEncryption constructor to decode Base64 secrets when
  the base64 flag is set (default: false)
- Add comprehensive integration tests (JwtEncryptionBase64Spec)
  covering Base64 encoding, decryption, and backward compatibility
- Add documentation (jwtEncryptionSecret.adoc) with examples of both
  plain text and Base64-encoded secret configuration
- Update SecretEncryptionSpec with YAML configuration example

All examples use A256GCM encryption method with dir (direct)
algorithm for modern AEAD-based encryption.

Backward compatibility is fully maintained with base64 defaulting
to false.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant