Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose support for ClickHouse does not allow an empty password when ALLOW_EMPTY_PASSWORD=yes #43790

Closed

Conversation

hezean
Copy link
Contributor

@hezean hezean commented Jan 13, 2025

Adds yes as a positive value for ALLOW_EMPTY_PASSWORD in bitnami/clickhouse.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 13, 2025
@hezean
Copy link
Contributor Author

hezean commented Jan 13, 2025

Actually I'm wondering if simply using continsKey would make the code more consistent with others like bitnami/mysql and bitnami/mariadb.

I'd prefer that we just consistently look for ALLOW_EMPTY_PASSWORD being set to any value and allow Bitnami to do the actual checking. That isolates Boot from any changes to what Bitnami supports and/or documents in the future. This isolation is important as Boot doesn't control the version of any Bitnami container that's used so we don't control when a user may try to use a container with different rules for the value of ALLOW_EMPTY_PASSWORD.

Originally posted by @wilkinsona in #43771 (comment)

But for the below existing test, we can either: delete it, or add a check to prevent breaking changes, like

boolean allowEmpty = env.containsKey("ALLOW_EMPTY_PASSWORD") && !"false".equalsIgnoreCase(env.get("ALLOW_EMPTY_PASSWORD"))

@Test
void getPasswordWhenHasNoPasswordAndAllowEmptyPasswordIsFalse() {
assertThatIllegalStateException()
.isThrownBy(() -> new ClickHouseEnvironment(Map.of("ALLOW_EMPTY_PASSWORD", "false")))
.withMessage("No ClickHouse password found");
}

@wilkinsona
Copy link
Member

Actually I'm wondering if simply using continsKey would make the code more consistent with others like bitnami/mysql and bitnami/mariadb.

Yes, please. I think that's what we should do.

But for the below existing test, we can either: delete it, or add a check to prevent breaking changes

I think we should just delete it for consistency with the other tests.

… other Bitnami images

Signed-off-by: He Zean <realhezean@gmail.com>
@hezean hezean force-pushed the bitnami-clickhouse-empty-password branch from 2015fae to 4194685 Compare January 14, 2025 05:39
@hezean hezean changed the title Add "yes" as a positive value for ALLOW_EMPTY_PASSWORD in bitnami/clickhouse Unify the logic of allowing empty password in Bitnami ClickHouse with other Bitnami images Jan 14, 2025
@wilkinsona wilkinsona changed the title Unify the logic of allowing empty password in Bitnami ClickHouse with other Bitnami images Docker Compose support for ClickHouse does not allow an empty password when ALLOW_EMPTY_PASSWORD=yes Jan 14, 2025
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 14, 2025
@wilkinsona wilkinsona added this to the 3.4.x milestone Jan 14, 2025
@wilkinsona wilkinsona self-assigned this Jan 15, 2025
@wilkinsona wilkinsona modified the milestones: 3.4.x, 3.4.2 Jan 15, 2025
wilkinsona pushed a commit that referenced this pull request Jan 15, 2025
See gh-43790

Signed-off-by: He Zean <realhezean@gmail.com>
@wilkinsona
Copy link
Member

Thanks very much, @hezean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants