Repository navigation
commons-config: refuse a non-Base64 basic credential at startup, naming the variable (#8227) - #8310
Merged
delchev merged 1 commit intoOct 29, 2026
Conversation
…ng the variable (eclipse-dirigible#8227) DIRIGIBLE_BASIC_USERNAME/PASSWORD are Base64-decoded, so the plain-text values the docs show aborted boot with a bare `IllegalArgumentException` ("Illegal base64 character" / "Last unit does not have enough valid bits") that named neither the variable nor the expected encoding. getFromBase64Value() now catches the decoder error and rethrows InvalidConfigException naming the key and the Base64 requirement, with a remedy - the same way DIRIGIBLE_SECURITY_HSTS is refused. CLAUDE_FEATURES.md documents the Base64 requirement. Note: a plain value that happens to be valid Base64 is still decoded silently - that is inherent to the encoding and cannot be distinguished from an intended Base64 value. Co-Authored-By: Claude Opus 4.8 <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.
DIRIGIBLE_BASIC_USERNAME/DIRIGIBLE_BASIC_PASSWORDare Base64-decoded, so the plain-text values the docs show aborted boot with a bareIllegalArgumentException("Illegal base64 character 2d" / "Last unit does not have enough valid bits") naming neither the variable nor the expected encoding.Change:
DirigibleConfig.getFromBase64Value()catches the decoderIllegalArgumentExceptionand rethrowsInvalidConfigExceptionnaming the key and the Base64 requirement, with a remedy - the same wayDIRIGIBLE_SECURITY_HSTSis refused.CLAUDE_FEATURES.mddocuments the Base64 requirement.This keeps the existing contract (values are Base64) backward compatible for anyone already encoding them, and turns the confusing abort into a configuration error that points at the variable.
Note: a plain value that happens to be valid Base64 is still decoded silently - that is inherent to the encoding and cannot be distinguished from an intended Base64 value.
The user-facing help portal (separate repo
dirigible-io/dirigible-io.github.io, Setup > Docker and Basic authentication pages) still shows plain-text values and needs the same correction in a follow-up PR there.Verified: new
DirigibleConfigBase64Test(plain value refused with the variable named; valid Base64 decoded) plus the existing commons-config suite green;formatter:validategreen with the cache wiped.Fixes #8227
🤖 Generated with Claude Code