Skip to content

commons-config: refuse a non-Base64 basic credential at startup, naming the variable (#8227) - #8310

Merged
delchev merged 1 commit into
eclipse-dirigible:masterfrom
d-velev:issue-8227-basic-creds-base64
Oct 29, 2026
Merged

delchev merged 1 commit into
eclipse-dirigible:masterfrom
d-velev:issue-8227-basic-creds-base64

Conversation

@d-velev

@d-velev d-velev commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

DIRIGIBLE_BASIC_USERNAME / DIRIGIBLE_BASIC_PASSWORD are Base64-decoded, so the plain-text values the docs show aborted boot with a bare IllegalArgumentException ("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 decoder IllegalArgumentException 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.

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:validate green with the cache wiped.

Fixes #8227

🤖 Generated with Claude Code

…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>
@delchev
delchev merged commit 25a863f into eclipse-dirigible:master Oct 29, 2026
16 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

2 participants