Skip to content

Add Portal handler D-Bus interface#148

Open
iinuwa wants to merge 22 commits intomainfrom
portal-api
Open

Add Portal handler D-Bus interface#148
iinuwa wants to merge 22 commits intomainfrom
portal-api

Conversation

@iinuwa
Copy link
Copy Markdown
Member

@iinuwa iinuwa commented Apr 21, 2026

This adds the necessary changes for xdg-desktop-portal to initiate the request to credentialsd. Once this is ready, this will become the primary interface for interacting with credentialsd.

Unfortunately, this is a huge PR. Some highlights of changes:

  • Adds the portal interface
  • Uses HTTPS origins for both privileged and unprivileged apps. (access control will be implemented in XDP using entitlements once that lands.)
  • Because of the above, origin is now required to be set.
  • top_origin can now be sent in options.json.
  • Rearranges some fields, most notably, flattening out the request_json fields in the request, which should make construction of the request a bit simpler.
  • Updated the api.md doc to reflect the portal gateway interface, since that is becoming the primary gateway interface.
  • Defines options.activation_token optional parameter, but credentialsd doesn't do anything with it yet.

In order to test this, you need to run iinuwa/xdg-desktop-portal@65f21d3 with the XDG_DESKTOP_PORTAL_ENABLE_EXPERIMENTAL=credential environment variable set, as well as having the impl portal stub defined in ~/.local/share/xdg-desktop-portal/portals/credentialsd.portal

[portal]
DBusName=xyz.iinuwa.credentialsd.Credentials
Interfaces=org.freedesktop.impl.portal.Credential
UseIn=sway # or whatever DE you use

and having ~/.config/xdg-desktop-portal/<desktop-environment>.config populated with

[preferred]
org.freedesktop.impl.portal.Credential=credentialsd

This should allow xdg-desktop-portal to start the Credential portal at org.freedesktop.portal.experimental.Credential. (You can use D-Spy, busctl, or some other introspection to verify whether the interface was started.)

iinuwa added 21 commits April 14, 2026 05:10
This will be shared by both D-Bus interfaces, so we should consolidate
it there.
This isn't clean, but I'll have to see how it works on in the xdp code
to see if this is desirable or not. Maybe we'll wind up splitting into
two parameters.
@iinuwa iinuwa marked this pull request as ready for review April 22, 2026 09:54
@iinuwa iinuwa mentioned this pull request Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant