feat(E21-S3): Daemon enrollment session state and Enroll/EnrollFinish/EnrollCancel D-Bus methods #33

Closed
opened 2026-07-29 12:14:37 +02:00 by elegos · 0 comments
Owner

Part of EPIC-21 (#24). See LLD: docs/lld/enrollment-session.md

What

Core daemon wiring for enrollment sessions:

linux-hello-daemon/src/state.rs

  • Add ActiveEnrollment struct (authenticator, username, owner_bus_name, credential Arc, task_handle)
  • Add active_sessions: HashMap<String, ActiveEnrollment> to AppState

linux-hello-daemon/src/dbus.rs

  • Implement enroll(authenticator, username) → session_id:
    • Authorize with polkit enroll-self or root check
    • Spawn enrollment task calling ProviderEnrollment::enroll_session
    • Return session_id
  • Implement enroll_finish(session_id) → bool:
    • Read credential from session, open enrollment DB, write, flush with TPM
  • Implement enroll_cancel(session_id) → ():
    • Abort task, drop session
  • Add new enrollment D-Bus signals (EnrollStep, EnrollPoseRequired, EnrollFrame, EnrollPoseCaptured, EnrollPoseRetry, EnrollComplete, EnrollError)
  • Handle enrollment DaemonEvent variants in emit_signal

crates/linux-hello-ipc/src/dbus/proxy.rs

  • Expose new signals via proxy

Dependencies

  • S1 / #31, S2 / #32 must be completed first
Part of EPIC-21 (#24). See LLD: docs/lld/enrollment-session.md ## What Core daemon wiring for enrollment sessions: **`linux-hello-daemon/src/state.rs`** - Add `ActiveEnrollment` struct (authenticator, username, owner_bus_name, credential Arc, task_handle) - Add `active_sessions: HashMap<String, ActiveEnrollment>` to `AppState` **`linux-hello-daemon/src/dbus.rs`** - Implement `enroll(authenticator, username) → session_id`: - Authorize with polkit enroll-self or root check - Spawn enrollment task calling `ProviderEnrollment::enroll_session` - Return session_id - Implement `enroll_finish(session_id) → bool`: - Read credential from session, open enrollment DB, write, flush with TPM - Implement `enroll_cancel(session_id) → ()`: - Abort task, drop session - Add new enrollment D-Bus signals (EnrollStep, EnrollPoseRequired, EnrollFrame, EnrollPoseCaptured, EnrollPoseRetry, EnrollComplete, EnrollError) - Handle enrollment DaemonEvent variants in `emit_signal` **`crates/linux-hello-ipc/src/dbus/proxy.rs`** - Expose new signals via proxy ## Dependencies - S1 / #31, S2 / #32 must be completed first
elegos added this to the Foundation project 2026-07-29 12:16:55 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
elegos/linux-hello#33
No description provided.