Skip to content

fix(infra): use helm-computed redirect URL for k8s Enable Banking flow - #110

Merged
wardstoneX merged 2 commits into
mainfrom
fix/k8s-eb-redirect-url
Jul 8, 2026
Merged

fix(infra): use helm-computed redirect URL for k8s Enable Banking flow#110
wardstoneX merged 2 commits into
mainfrom
fix/k8s-eb-redirect-url

Conversation

@azzabaatout

@azzabaatout azzabaatout commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

Connecting a bank (PayPal) through Enable Banking on the Rancher deployment (https://ge42cer-devops-ss26.stud.k8s.aet.cit.tum.de/) always failed after authorization with:

POST https://team-team-dev-7d5c6b.polandcentral.cloudapp.azure.com/api/banking/callback 403 (Forbidden)
image

Root cause

cd.yml overrode bankingService.enableBanking.redirectUrl with the shared EB_REDIRECT_URL secret, which holds the Azure VM callback URL (it's also used by infra-deploy.yml for the compose stack). So the k8s banking-service registered the Azure /callback with Enable Banking, and users finishing bank auth on the Rancher app were redirected to the Azure frontend, whose backend rejected the callback with a CORS 403 — and could never have completed it anyway, since the auth session state lives in the Rancher Postgres.

Fix

Drop the override. The helm chart already computes the correct per-environment default when the value is empty (bankingService-deployment.yaml):

https://{tumid}-devops-ss26.stud.k8s.aet.cit.tum.de/callback

The Azure deploy pipeline keeps using EB_REDIRECT_URL and is untouched.

Verified

  • POST /api/banking/callback on the Rancher backend with the Rancher origin passes CORS and reaches the banking-service; the client is built with relative API URLs and handles /callback?code=…&state=….
  • Before merging: add https://ge42cer-devops-ss26.stud.k8s.aet.cit.tum.de/callback as a redirect URL in the Enable Banking Control Panel, otherwise POST /api/banking/connect will fail validation.

Closes #111

Summary by CodeRabbit

  • Chores
    • Updated the deployment process for the Kubernetes release workflow by removing one application setting from the Helm upgrade step.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 058d79ee-8364-402d-bb20-c3e01b11b8d7

📥 Commits

Reviewing files that changed from the base of the PR and between 575c5c1 and fa3a8a2.

📒 Files selected for processing (1)
  • .github/workflows/cd.yml

📝 Walkthrough

Walkthrough

The CD workflow's Helm deploy step removes the --set-string bankingService.enableBanking.redirectUrl override, allowing the Helm chart's computed per-environment default redirect URL to be used instead of the shared Azure secret value.

Changes

CD Workflow Helm Value Change

Layer / File(s) Summary
Helm redirectUrl override removal
.github/workflows/cd.yml
The helm upgrade --install command no longer sets bankingService.enableBanking.redirectUrl, letting the chart's default per-environment value apply instead of the shared EB_REDIRECT_URL secret.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/k8s-eb-redirect-url

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

The EB_REDIRECT_URL secret holds the Azure VM callback URL and is shared
with the Azure compose deploy. Overriding the helm value with it made the
Rancher banking-service register the Azure /callback as the Enable Banking
redirect target, so users finishing bank auth on the k8s app landed on the
Azure frontend, whose backend 403'd the callback (and could never complete
a session stored in the Rancher database anyway).

With the override removed, the chart falls back to its computed default:
https://{tumid}-devops-ss26.stud.k8s.aet.cit.tum.de/callback
@azzabaatout
azzabaatout force-pushed the fix/k8s-eb-redirect-url branch from 2d4f9e2 to 1a97dea Compare July 7, 2026 20:45
@azzabaatout azzabaatout self-assigned this Jul 7, 2026
@azzabaatout
azzabaatout requested a review from yaylymov July 7, 2026 20:47
@azzabaatout azzabaatout added the bug Something isn't working label Jul 7, 2026

@wardstoneX wardstoneX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good

@wardstoneX
wardstoneX merged commit 24dace7 into main Jul 8, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Banking callback fails with 403 on the Rancher deployment

2 participants