fix(config): read HTTP Basic credentials from Rails credentials - #11
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ActiveSupport::OrderedOptions(EncryptedConfiguration#deep_transform). Itsmethod_missinganswersrespond_to?(:call)withtruefor any name and returnsnilforcall, soConfiguration#normalizeinvoked it and threw the credentials away.normalizenow only invokes genuine callables (Proc/Method). The documented lambda support for rotating secrets is unchanged; the same bug also affected an explicitconfig.http_basicassigned anOrderedOptions.http_basic), plus a[Unreleased] / Fixedchangelog 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