fix: stop inventing an Arcane password and keep the seeded login - #68
Merged
Conversation
The role minted its own admin password, so the credentials on a provisioned box matched neither upstream's documentation nor anything a developer would guess. The login is now exactly what Arcane ships with, and the role sets neither the username nor the password. What it still does is retire the forced first-login prompt, which is the part worth automating. That needs a password submitted, because only a COMPLETED change clears the flag -- an admin-side user update sets the password and leaves it standing. So the change submits the seeded password as both the old and the new value: the flag drops and the credentials do not move. Upstream's default `strong` policy rejects its own seeded password (twelve characters, but no uppercase and no digit), so the policy is relaxed to `basic` first. Eight characters remains the floor regardless -- the request schema rejects anything shorter with a 422 before the policy is read, which is why a short password is not reachable by configuration at all. The admin is now located by its global-admin flag rather than by the name `arcane`, so a host whose admin was renamed is still found. soe_arcane_admin_password is gone. The one knob left is soe_arcane_password_policy, for putting the character-class requirements back. Verified by destroying the container, its volume and the stack directory on three hosts and installing clean. Each came up with username `arcane`, failed=0 and rescued=0, and a real login as arcane/arcane-admin returns 200 with requiresPasswordChange false from /api/auth/me -- the endpoint the UI itself calls, and the flag its root layout gates the change dialog on.
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.
The role minted its own admin password, so the credentials on a provisioned box matched neither upstream's documentation nor anything a developer would guess. The login is now exactly what Arcane ships with, and the role sets neither the username nor the password.
What it still does is retire the forced first-login prompt, which is the part worth automating.
Why a password is still submitted
Only a COMPLETED password change clears the flag -- an admin-side user update sets the password and leaves it standing. So the change submits the seeded password as both the old and the new value: the flag drops and the credentials do not move.
Upstream's default
strongpolicy rejects its own seeded password (arcane-adminis twelve characters, but has no uppercase and no digit), so the policy is relaxed tobasicfirst.Eight characters is the floor regardless of policy. The request schema rejects anything shorter with a
422 expected length >= 8before the policy is consulted, so a short password is not reachable by configuration at all -- verified against a live instance, not inferred.Also
isGlobalAdminflag rather than the literal namearcane, so a host whose admin was renamed is still found.soe_arcane_admin_passwordis gone. The one knob left issoe_arcane_password_policy, for putting the character-class requirements back.PUT /api/users/{id}is dropped -- it set the password to the value it already had.Verified
Destroyed the container, its volume and the stack directory on three hosts, then installed clean. Each came up with:
arcane,failed=0,rescued=0, no deploy warningsarcane/arcane-adminreturning 200A 200 on login does not by itself prove there is no follow-on reset page, so this was chased to the source. The root layout renders the change dialog on exactly one condition:
data.usercomes fromuserService.getCurrentUser(), which isGET /auth/me. Called with a real session cookie after a real login, that endpoint returns"requiresPasswordChange":false-- so the dialog's only gate is false and it never renders.