Skip to content

fix(idproxy): initialize signer algorithm in dex server#1870

Merged
abhijith-darshan merged 1 commit intomainfrom
fix/idproxy-signer
Mar 26, 2026
Merged

fix(idproxy): initialize signer algorithm in dex server#1870
abhijith-darshan merged 1 commit intomainfrom
fix/idproxy-signer

Conversation

@abhijith-darshan
Copy link
Copy Markdown
Contributor

@abhijith-darshan abhijith-darshan commented Mar 26, 2026

Description

Fixes a panic in idproxy introduced when the binary was built against dex v2.45.1 (#1857).

  • In dex v2.44.0, constructDiscovery()
    determined the signing algorithm solely from the hardcoded jose.RS256 value.
  • In v2.45.1, constructDiscovery(ctx)
    still sets jose.RS256 as an initial default but then immediately overwrites it by calling
    s.signer.Algorithm(ctx).
  • This requires server.Config.Signer to be explicitly provided. Since in idxproxy main.go never set this field, s.signer was nil at startup, causing an immediate nil pointer dereference panic before the server could serve any requests.
  • The fix initializes a signer.LocalConfig backed by the existing dex storage, so signing keys are
    read from and rotated in the same postgres keys table as before — no data migration required.

Root Cause

cmd/idproxy/main.go was not updated alongside the dex v2.45.1 bump in #1857 to satisfy the Signer requirement in server.Config.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Added to documentation?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com>
@abhijith-darshan abhijith-darshan requested a review from a team as a code owner March 26, 2026 18:20
@abhijith-darshan abhijith-darshan merged commit 2fc99ab into main Mar 26, 2026
22 checks passed
@abhijith-darshan abhijith-darshan deleted the fix/idproxy-signer branch March 26, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants