Skip to content

fix(bank-transfer): correct encryption key env var names#1168

Merged
ferr3ira-gabriel merged 1 commit intodevelopfrom
fix/bank-transfer-encryption-key-env-names
Apr 2, 2026
Merged

fix(bank-transfer): correct encryption key env var names#1168
ferr3ira-gabriel merged 1 commit intodevelopfrom
fix/bank-transfer-encryption-key-env-names

Conversation

@ferr3ira-gabriel
Copy link
Copy Markdown
Member

@ferr3ira-gabriel ferr3ira-gabriel commented Apr 2, 2026

Summary

The source code expects JD_INCOMING_RAW_XML_ENCRYPTION_KEY and RECIPIENT_DETAILS_ENCRYPTION_KEY (hex-encoded), but the helm chart was creating env vars with _BASE64 suffix which the app doesn't read.

This caused the pod to crash with:

JD_INCOMING_RAW_XML_ENCRYPTION_KEY is required

Root Cause

  • Source code (config.go): Expects env var JD_INCOMING_RAW_XML_ENCRYPTION_KEY with hex-encoded 32-byte key (64 hex chars)
  • Helm chart (secrets.yaml): Was creating JD_INCOMING_RAW_XML_ENCRYPTION_KEY_BASE64
  • The env var name mismatch meant the app never saw the key

Changes

  • Rename env vars from *_BASE64 to match source code expectations
  • Update comments to clarify hex-encoding format (64 hex chars)
  • Update values.yaml, values-template.yaml, and README.md accordingly

Testing

Deploy plugin-br-bank-transfer with the corrected helm chart and verify the pod starts successfully without encryption key errors.

@ferr3ira-gabriel ferr3ira-gabriel requested a review from a team as a code owner April 2, 2026 18:23
The source code expects JD_INCOMING_RAW_XML_ENCRYPTION_KEY and
RECIPIENT_DETAILS_ENCRYPTION_KEY (hex-encoded), but the helm chart
was creating env vars with _BASE64 suffix which the app doesn't read.

This caused the pod to crash with 'JD_INCOMING_RAW_XML_ENCRYPTION_KEY
is required' error because the env var name didn't match.

Changes:
- Rename env vars from *_BASE64 to match source code expectations
- Update comments to clarify hex-encoding format (64 hex chars)
- Update values.yaml, values-template.yaml, and README.md accordingly

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@ferr3ira-gabriel ferr3ira-gabriel force-pushed the fix/bank-transfer-encryption-key-env-names branch from 801347c to fb79deb Compare April 2, 2026 18:27
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Walkthrough

Updates the Brazilian bank transfer plugin's Helm chart to change encryption key configuration from base64-encoded to hex-encoded format. Changes include updated secret key names and documentation across README, Kubernetes Secret template, and Helm values files.

Changes

Cohort / File(s) Summary
Encryption Key Configuration Updates
charts/plugin-br-bank-transfer/README.md, charts/plugin-br-bank-transfer/templates/secrets.yaml, charts/plugin-br-bank-transfer/values-template.yaml, charts/plugin-br-bank-transfer/values.yaml
Renamed encryption key configuration from base64-encoded variants (JD_INCOMING_RAW_XML_ENCRYPTION_KEY_BASE64, RECIPIENT_DETAILS_ENCRYPTION_KEY_BASE64) to hex-encoded variants (JD_INCOMING_RAW_XML_ENCRYPTION_KEY, RECIPIENT_DETAILS_ENCRYPTION_KEY). Updated documentation and comments to reflect 64 hex character format for 32-byte AES-256 keys instead of base64 encoding.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@charts/plugin-br-bank-transfer/README.md`:
- Around line 191-193: Add a new "Upgrading" or "Migration Notes" section to the
README that documents the breaking change: list the environment variable renames
(e.g., JD_WEBHOOK_NOTIFICATION_RAW_XML_DECRYPTION_KEY_BASE64 →
JD_WEBHOOK_NOTIFICATION_RAW_XML_DECRYPTION_KEY, RECIPIENT_DETAILS_ENCRYPTION_KEY
and JD_INCOMING_RAW_XML_ENCRYPTION_KEY name changes if applicable), and clearly
state the encoding change from base64 to hex (32-byte AES-256 key must now be
hex-encoded as 64 hex characters). Provide a short migration recipe: how to
convert an existing base64 key to a hex string (one-line guidance) and instruct
users to rename the variables in their values/Secrets; reference the exact
variable names shown in the diff (JD_INCOMING_RAW_XML_ENCRYPTION_KEY,
RECIPIENT_DETAILS_ENCRYPTION_KEY,
JD_WEBHOOK_NOTIFICATION_RAW_XML_DECRYPTION_KEY_BASE64) so users can find and
update them.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1a4bfdab-53b9-4184-906d-c1ca219ddc72

📥 Commits

Reviewing files that changed from the base of the PR and between f045ca2 and fb79deb.

📒 Files selected for processing (4)
  • charts/plugin-br-bank-transfer/README.md
  • charts/plugin-br-bank-transfer/templates/secrets.yaml
  • charts/plugin-br-bank-transfer/values-template.yaml
  • charts/plugin-br-bank-transfer/values.yaml

Comment on lines +191 to 193
| `JD_INCOMING_RAW_XML_ENCRYPTION_KEY` | Encryption key (hex-encoded 32-byte AES-256, 64 hex chars) |
| `RECIPIENT_DETAILS_ENCRYPTION_KEY` | Encryption key (hex-encoded 32-byte AES-256, 64 hex chars) |
| `JD_WEBHOOK_NOTIFICATION_RAW_XML_DECRYPTION_KEY_BASE64` | Decryption key (32-byte base64) |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider adding upgrade/migration notes for this breaking change.

The documentation correctly reflects the renamed variables and hex-encoding format. However, since the PR summary indicates this is a breaking change requiring users to rename their values and convert from base64 to hex encoding, consider adding a brief "Upgrading" or "Migration Notes" section documenting:

  • The renamed values (*_BASE64 → non-suffixed)
  • The encoding change (base64 → hex-encoded 64-character string)

This would help users upgrading from previous chart versions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@charts/plugin-br-bank-transfer/README.md` around lines 191 - 193, Add a new
"Upgrading" or "Migration Notes" section to the README that documents the
breaking change: list the environment variable renames (e.g.,
JD_WEBHOOK_NOTIFICATION_RAW_XML_DECRYPTION_KEY_BASE64 →
JD_WEBHOOK_NOTIFICATION_RAW_XML_DECRYPTION_KEY, RECIPIENT_DETAILS_ENCRYPTION_KEY
and JD_INCOMING_RAW_XML_ENCRYPTION_KEY name changes if applicable), and clearly
state the encoding change from base64 to hex (32-byte AES-256 key must now be
hex-encoded as 64 hex characters). Provide a short migration recipe: how to
convert an existing base64 key to a hex string (one-line guidance) and instruct
users to rename the variables in their values/Secrets; reference the exact
variable names shown in the diff (JD_INCOMING_RAW_XML_ENCRYPTION_KEY,
RECIPIENT_DETAILS_ENCRYPTION_KEY,
JD_WEBHOOK_NOTIFICATION_RAW_XML_DECRYPTION_KEY_BASE64) so users can find and
update them.

@ferr3ira-gabriel ferr3ira-gabriel merged commit 95f9cc2 into develop Apr 2, 2026
2 of 4 checks passed
@ferr3ira-gabriel ferr3ira-gabriel deleted the fix/bank-transfer-encryption-key-env-names branch April 2, 2026 18:44
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