Repository navigation
feat(#45): pass the HA fallback root password as an env var, not -D - #55
Merged
Merged
Conversation
On a pre-26.11.1 image in HA mode without an explicit cluster token the chart cannot use rootPasswordPath, and it put the password on the command line as -Darcadedb.server.rootPassword=$(rootPassword). Export it instead as an env var named after the setting key, which GlobalConfiguration reads when no system property of that name is set; ClusterTokenProvider derives the token from the setting value, whatever its source. The config-key drift guard now also checks arcadedb.* env var names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 22, 2026
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.
Closes #45
In HA mode on an image older than 26.11.1 with no explicit
arcadedb.credentials.clusterToken(i.e. a user-supplied root password Secret), the chart still rendered-Darcadedb.server.rootPassword=$(rootPassword), which Kubernetes expands into the argument, so the password was readable through/proc/<pid>/cmdline. This PR drops that flag and exports the setting as an environment variable named after its key,arcadedb.server.rootPassword(asecretKeyRefto the root password Secret), the same way #41 does for the TLS store passwords. The env var is rendered only on that fallback branch; every other configuration keeps using-Darcadedb.server.rootPasswordPathand gets no new env var. The config-key drift guard (ci/check-config-keys.sh) now also checksarcadedb.*env var names, so the fallback render keeps coveringarcadedb.server.rootPassword, and the #41 TLS env names are now covered as well.Proof the issue asked for (pre-26.11.1 derives the token from the setting value, not
System.getProperty)Source, ArcadeDB tag
26.10.2(the chart's appVersion):GlobalConfiguration.readConfiguration():prop = System.getProperty(config.key); if (prop == null) prop = System.getenv(config.key);. The same fallback exists at tags 24.11.1, 25.6.1, 26.1.1, 26.7.1 and 26.10.2 (git show <tag>:engine/.../GlobalConfiguration.java | grep -c "System.getenv(config.key)"returns 1 for each).ha-raft/.../ClusterTokenProvider.initClusterToken()(26.5.1, 26.7.1, 26.10.2):configuration.getValueAsString(GlobalConfiguration.SERVER_ROOT_PASSWORD), then falls back toGlobalConfiguration.SERVER_ROOT_PASSWORD.getValueAsString().git grep 'getProperty("arcadedb.server.rootPassword'over26.7.1and26.10.2main sources returns nothing.Live kind run (local, kind single node,
image.tag=26.10.2,replicaCount=3, user-supplied Secretmy-root/pw, no cluster token):/proc/1/cmdlineon pod-0 has norootPasswordflag and does not contain the password.arcadedb.server.rootPassword; the startup dump listsarcadedb.server.rootPassword = <hidden>.Using auto-derived cluster token(no explicit token, derived from the env-sourced setting).create database,create document typeand aninsertsent to a follower return 200, and the row is read back from the third pod.Test plan
helm unittest charts/arcadedb: 347/347 pass. Against the old template, 6 fail (the 4 new fallback tests and the 2 updated ones).helm lint charts/arcadedbbash ci/check-config-keys.shagainstarcadedata/arcadedb:26.10.2: OK, 42 keys (now includingarcadedb.server.rootPassword,arcadedb.ssl.keyStorePassword,arcadedb.ssl.trustStorePasswordas env names)CI - Lint, Unit Tests, Integration Testson 0b14dc0: success (the integration job exercises the file branch only; see Known gaps)Existing tests changed: two existing tests asserted
contains -Darcadedb.server.rootPassword=$(rootPassword), which is the behaviour this issue removes: "HA with a user-supplied root password Secret and no token ..." and "a non-version tag falls back to ...". Their assertions were flipped tonotContainsplus a check for the env var, and their titles reworded. Each has an# issue #45: was ...comment. No other existing test was touched.Coverage
Invariant: no rendered container argument carries the root password; on the pre-26.11.1 HA fallback the server still receives
arcadedb.server.rootPassword.Sweep commands (run in the worktree after the change):
rootPasswordFromFilefalse)replicaCount>1, user Secret, pre-26.11.1 tag#45 the HA fallback renders no -D flag ...+ updated existing testreplicaCount>1, user Secret, non-version tag (latest)a non-version tag falls back ...autoscaling.enabled, user Secret, pre-26.11.1#45 ... under autoscaling ...-nativepre-26.11.1 tag#45 ... on a native image ...helm upgrade --reuse-values(nullclusterToken/mountPath)#45 ... after an upgrade with --reuse-values ...#45 the root password setting env var is not set ...testsarcadedb.extraCommandsreferencing$(rootPassword)rootPasswordenv var for them, as documented in the READMEKnown gaps
Residual risk: a future ArcadeDB release that drops the env var fallback in
readConfiguration()would break the fallback branch. The drift guard does not catch that, because it checks only that the key exists. That release would also be ≥26.11.1, though, where the chart uses the file branch, so the risk is limited to pinned pre-26.11.1 images, and those do have the fallback.Adversarial pass
Not run: this session had no subagent-spawning tool, so the independent Phase 1.5 reviewer could not be launched. The coverage sweep above and the bot review loop are the only checks.
Review cycles
0b14dc0, the initial change. Noclaudereview arrived within 15 minutes on any surface (reviews, inline comments, PR comments). This repo has no Claude review workflow in.github/workflows(lint, integration-reusable, latest-image, release), and feat(#41): pass the TLS store passwords as env vars, not on the command line #46/fix(#42): writable backup directory, HA readiness by default, config-key drift guard #48/fix(#39): seed server-groups.json and gremlin-server.* into the config volume #50 got no bot review either, so none is expected. The loop stopped there.Deferred items
None. No review feedback was received.
Final state: timeout (no bot reviewer on this repository). The PR needs a human review. Merging is the developer's call.
🤖 Generated with Claude Code