Skip to content

KWallet: Item#GetSecret and Service#GetSecrets violate the Secret Service API #34

Closed

Description

@purejava

Please agree to the following

Summary

Item#GetSecret and Service#GetSecrets return secrets for locked items, so violate the Secret Service API

What software is involved?

  • Operating System / Version: Arch linux rolling release
  • Desktop environment: KDE
  • kwallet: 6.29.0

Steps to Reproduce

  1. Create a collection with an item in it
  2. Lock the item
  3. Call Item#GetSecret and Service#GetSecrets on KWallet

Expected Behavior

KWallet should return null for Item#GetSecret and an empty map for Service#GetSecrets.

Actual Behavior

KWallet returns a Secret for Item#GetSecret, although the according item is locked.
KWallet returns a map of Secrets for Service#GetSecrets, although the items ore one of the items is locked.

The Secret Service API states: "The secrets of locked items cannot be accessed."

Reproducibility

Always

Relevant Log Output

dbus-monitor shows:
method call time=1787476644.298623 sender=:1.205 -> destination=org.freedesktop.secrets serial=40 path=/org/freedesktop/secrets/collection/kdewallet/16; interface=org.freedesktop.Secret.Item; member=GetSecret
  object path "/org/freedesktop/secrets/session/20"
method return time=1787476644.322690 sender=:1.54 -> destination=:1.205 serial=744 reply_serial=40
  struct {
     object path "/org/freedesktop/secrets/session/20"
     array of bytes [
        0a 9c 7f e6 be c5 51 5f 19 d7 e6 99 0c 2c be e5
     ]
     array of bytes [
        b4 f5 16 64 58 77 57 91 47 f6 04 e3 4f 1e 5c b9
     ]
     string "text/plain; charset=utf-8"
  }

method call time=1787496001.673724 sender=:1.111 -> destination=org.freedesktop.secrets serial=8 path=/org/freedesktop/secrets; interface=org.freedesktop.Secret.Ser
vice; member=GetSecrets 
  array [ 
     object path "/org/freedesktop/secrets/collection/TESTER/0" 
  ] 
  object path "/org/freedesktop/secrets/session/9" 
method return time=1787496001.674094 sender=:1.54 -> destination=:1.111 serial=110 reply_serial=8 
  array [ 
     dict entry( 
        object path "/org/freedesktop/secrets/collection/TESTER/0" 
        struct { 
           object path "/org/freedesktop/secrets/session/9" 
           array of bytes [ 
              4b 8d 2c d8 e6 76 97 50 62 f9 4f c1 85 e6 e4 b6 
           ] 
           array of bytes [ 
              eb c9 b7 10 78 5c 3f 73 09 b0 03 55 84 a6 90 1a 
           ] 
           string "text/plain; charset=utf-8" 
        } 
     ) 
  ]

Anything else?

I consider this to be an upstream bug and opened a bug ticket for KWallet: https://bugs.kde.org/show_bug.cgi?id=524650

Activity

  1. added
    bug
    upstream
    on Aug 23, 2026
  2. changed the title [-]Item#GetSecret and Service#GetSecrets violate the Secret Service API[/-] [+]KWallet: Item#GetSecret and Service#GetSecrets violate the Secret Service API[/+] on Aug 23, 2026
  3. purejava commented on Aug 23, 2026

    @purejava
    OwnerAuthor

    This does not happen with gnome-keyring, which returns null and an empty map accordingly.

  4. purejava commented on Aug 23, 2026

    @purejava
    OwnerAuthor

    Fixed with d5c000a.

  5. purejava commented on Aug 25, 2026

    @purejava
    OwnerAuthor

    I reopen this issue.

    There is a better expected behavior for locked items:
    KWallet should return a org.freedesktop.Secret.Error.IsLocked for Item#GetSecret and return the secrets for all unlocked items for Service#GetSecrets.

    Probably the workaround needs to be redone.

  6. purejava commented on Aug 27, 2026

    @purejava
    OwnerAuthor

    Done with release 1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugupstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions