Root-only-login assertion reads a locked password as a password, refusing any real service #139
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/archetypes#139
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The service archetype refuses a service VM that runs an actual service: its root-only-login assertion reads a locked password as a password, so the first machine to compose a real service module fails to evaluate.
Primary goals:
hashedPassword = "!","!!"or"*"is the canonical way to say password login is disabled, so none of them counts as a credential.Current state and specifics
nix/builders/service.nix'sloginCapableUserstreats any non-nullhashedPasswordas a credential.modules/forgejo/default.nixgives its clone userhashedPassword = "!"withisSystemUser = true, no declared authorized keys — the clone daemon authorizes throughAuthorizedKeysCommandwithAuthorizedKeysFile none— and ashellPathwhose script execsforgejo servfor a well-formed forced command and otherwise prints "git SSH login is forced-command only." and exits 1.So the account cannot authenticate by password and cannot obtain a session, and the assertion counts it anyway. Measured by evaluating the
forgemachine with the three data inputs overridden at their current masters:The archetype's hard guarantee is
services.openssh.settings.AllowUsers = [ "root" ]on the administrative daemon, which holds whatever exists in/etc/passwd. The assertion is the evaluation-time backstop against a profile declaring login credentials, and that is the claim it should make.The shell half of the predicate needs no change: it recognises a nologin
shellPathand otherwise treats a shell as a login shell, which is the fail-closed direction.Scope
In: the password predicate, the assertion's message, the matching check findings and sabotage fixtures in
checks/service-archetype.nix, and the README's Builders paragraph. Out: theAllowUserssetting, which is correct; and theforgemachine itself, which lives in the data repositories.Part of allod/strategy#65
Landed on master in
87b0eae(Stop reading a locked password as a login credential); the forge machine evaluates with its locked git account. Closing as part of allod/strategy#65 housekeeping.