Skip to content

Unlock() only targets the collection, not the item, breaking per-entry confirmation #340

Description

@Snowy-Fluffy

When the Secret Service backend requires confirmation for an individual item (not just for the collection as a whole), sbx login fails with:

ERROR: sign-in failed: auth login failed: saving credentials: failed to set item secret: org.freedesktop.Secret.Error.IsLocked

Cause: per the Secret Service D-Bus spec, Service.Unlock() takes a list of object paths, and those paths can be collections or individual items. If an item is locked independently of its collection, unlocking it means calling Unlock() with that item's own object path, not the collection's path. sbx only ever calls Unlock() on the collection:

Service.Unlock(["/org/freedesktop/secrets/collection/Passwords"])

The backend correctly reports the collection as already unlocked and skips the prompt for it — but the individual item is a separate object with its own lock state, and sbx never requests unlocking it specifically. The subsequent SetSecret call then fails with IsLocked, because the item itself was never granted access.

sbx version: v0.35.0 01e01520456e4126a9653471e7072e4d9b280321

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions