Skip to content

feat(plugin-br-bank-transfer): render the IDP_* permission declaration from lerian-common - #2545

Draft
qnen wants to merge 1 commit into
mainfrom
feat/plugin-br-bank-transfer-idp
Draft

qnen wants to merge 1 commit into
mainfrom
feat/plugin-br-bank-transfer-idp

Conversation

@qnen

@qnen qnen commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Pull Request Type

  • Plugin BR Bank Transfer

Draft: depende do release do lerian-common (#2543, que adiciona lerian-common.idp.*). A dependência lerian-common-helm continua em 2.3.0, que ainda não tem os helpers, então o render deste branch falha até a troca. Quando o lerian-common-helm 2.4.0 for publicado: trocar version: "2.3.0" por "2.4.0" no Chart.yaml, rodar helm dependency update (atualiza o Chart.lock) e tirar do draft.

O que muda

  • templates/configmap.yaml: inclui lerian-common.idp.env logo depois do bloco de auth (inbound). IDP_DECLARATION_ENABLED sempre sai (default "false"); IDP_HOST só quando setado. Precedência: bankTransfer.configmap > bankTransfer.extraEnvVars (legado) > global.idp.{declarationEnabled,host}.
  • templates/configmap.yaml (passthrough de extraEnvVars): pula IDP_DECLARATION_ENABLED/IDP_HOST, que agora alimentam o helper. Quem passa essas chaves por extraEnvVars (o lerian-internal-gitops#3454) mantém exatamente os mesmos valores, sem chave duplicada.
  • templates/secrets.yaml: o bloco manual IDP_M2M_CLIENT_ID/_SECRET vira lerian-common.idp.secret (mesma saída: stringData, cada chave só quando setada).
  • README e values.yaml: corrige o "configmap or extraEnvVars" (o caminho por configmap não renderizava antes), documenta as duas chaves do ConfigMap e global.idp.

Compatibilidade

Aditivo. Única diferença num render sem valores novos: IDP_DECLARATION_ENABLED: "false" passa a aparecer no ConfigMap (o mesmo valor que o app assume quando a chave falta). Release esperado: minor.

Teste local

helm v3.16.4, cópia do chart com lerian-common-helm apontando para o lerian-common do #2543 via file:// (só para teste, não commitado), comparado com o chart da main (OCI 2.3.0):

Caso Resultado
fixture de CI (helm-render-values/plugin-br-bank-transfer.yaml), sem IDP diff: só IDP_DECLARATION_ENABLED: "false" no ConfigMap (e as senhas aleatórias dos subcharts/checksum)
values do benedita dev-st do #3454 (IDP_* em extraEnvVars) as duas chaves saem do fim do ConfigMap e aparecem no bloco do helper com os mesmos valores; Secret idêntico
configmap.IDP_DECLARATION_ENABLED=true + IDP_HOST + par em secrets "true" e host no ConfigMap (antes não renderizavam); par no Secret idêntico ao de antes
global.idp.host + extraEnvVars.IDP_DECLARATION_ENABLED=true "true" e o host global, sem duplicar a chave
useExistingSecret=true rc=0

helm lint (com a fixture de CI): 0 falhas. validate-helm-charts --strict: 0 violações.

🤖 Generated with Claude Code

…n from lerian-common

The ConfigMap is an allowlist and never rendered IDP_DECLARATION_ENABLED
or IDP_HOST from bankTransfer.configmap, although the README and
values.yaml said it did; they only reached the pod through extraEnvVars.

- ConfigMap: include lerian-common.idp.env next to the inbound auth
  block. IDP_DECLARATION_ENABLED is always rendered (default "false")
  and IDP_HOST only when set, resolved as bankTransfer.configmap >
  bankTransfer.extraEnvVars (legacy) > global.idp.{declarationEnabled,host}.
  The extraEnvVars passthrough skips both keys, so environments that set
  them there keep the same values with no duplicate key.
- Secret: replace the hand-written IDP_M2M_CLIENT_ID/_SECRET block with
  lerian-common.idp.secret (same output: stringData, each key only when
  set).
- Document global.idp and the two ConfigMap keys; fix the README and
  values.yaml that said "configmap or extraEnvVars".

Requires the lerian-common release that ships lerian-common.idp.*; the
lerian-common-helm dependency must move from 2.3.0 to it before merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@lerian-studio-midaz-push-bot

Copy link
Copy Markdown
Contributor

Chart image references

1 of 1 chart(s) did not pass. A chart published while it points at an image that does not exist installs into ImagePullBackOff.

chart verified verdict
plugin-br-bank-transfer 0 could not verify — see the run log
Every reference checked

plugin-br-bank-transfer

no image references


🖼️ View full logs

This branch has not been deployed

No deployments
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