Skip to content

fix(config): read HTTP Basic credentials from Rails credentials - #11

Merged
cmer merged 1 commit into
mainfrom
chore/solid-queue-flightdeck-verification
Sep 4, 2026
Merged

fix(config): read HTTP Basic credentials from Rails credentials#11
cmer merged 1 commit into
mainfrom
chore/solid-queue-flightdeck-verification

Conversation

@cmer

@cmer cmer commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fixes Configuration authentication through credentials not working #7: HTTP Basic credentials configured in Rails credentials were silently ignored, leaving Flightdeck serving its "unconfigured" 401.
  • Rails hands back a nested credentials key as an ActiveSupport::OrderedOptions (EncryptedConfiguration#deep_transform). Its method_missing answers respond_to?(:call) with true for any name and returns nil for call, so Configuration#normalize invoked it and threw the credentials away.
  • normalize now only invokes genuine callables (Proc/Method). The documented lambda support for rotating secrets is unchanged; the same bug also affected an explicit config.http_basic assigned an OrderedOptions.
  • Adds regression tests for both paths (credentials source and explicit http_basic), plus a [Unreleased] / Fixed changelog entry. No version bump, no asset changes.

Testing

  • bin/test — 279 runs, 0 failures in both host modes (default and API-only)
  • bundle exec rubocop --force-exclusion lib/flightdeck/configuration.rb test/configuration_test.rb — no offenses

🤖 Generated with Claude Code

Rails returns a nested credentials key as an ActiveSupport::OrderedOptions,
whose method_missing answers respond_to?(:call) with true and returns nil for
`call`. normalize invoked it and resolved the whole source to nil, so auth
configured via credentials left the dashboard reporting itself unconfigured.

Only invoke genuine callables (Proc/Method), which keeps the documented
lambda support for rotating secrets working.

Fixes #7

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cmer
cmer merged commit 2c3908e into main Sep 4, 2026
9 checks passed
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.

Configuration authentication through credentials not working

1 participant