Skip to content

Commit e794ca2

Browse files
nshalmanclaude
andcommitted
triton-api-server: document 2FA recovery runbook on the impl
The lost-authenticator recovery story belongs near the verify handler -- that's where someone debugging the path will look. Plain `//` rather than `///` keeps it off the OpenAPI spec and out of the generated client docs, since "ssh into a headnode and run sdc-ufds" is an ops concern, not part of the API contract clients consume. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 31ee186 commit e794ca2

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

  • services/triton-api-server/src

services/triton-api-server/src/main.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,23 @@ impl TritonApi for TritonApiImpl {
207207
issue_login_outcome(jwt, &auth_info, ctx.cookie_secure).await
208208
}
209209

210+
// Operator runbook: lost authenticator
211+
// ------------------------------------
212+
// tritonapi only verifies in v1 -- enrollment and disable still
213+
// live in piranha. To unenroll a user who lost access to their
214+
// authenticator, clear the TOTP secret stored under
215+
// `metadata=portal, uuid=<USER_UUID>, ou=users, o=smartdc` --
216+
// either via the piranha "Disable two-factor" UI, or directly
217+
// from the headnode:
218+
//
219+
// sdc-ufds search -s base \
220+
// -b 'metadata=portal, uuid=<USER_UUID>, ou=users, o=smartdc' \
221+
// '(objectclass=capimetadata)'
222+
//
223+
// Then either remove the `usemoresecurity` attribute or set its
224+
// `secretkey` field to an empty string. `read_totp_secret` treats
225+
// both as "not enrolled" and the user's next login skips the
226+
// challenge entirely.
210227
async fn auth_login_verify(
211228
rqctx: RequestContext<Self::Context>,
212229
body: TypedBody<LoginVerifyRequest>,

0 commit comments

Comments
 (0)