[Feature request]: Use auth_admin_keep for update-related polkit actions in non-local sessions
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c, linux
- Domain
- authentication, security
Research direction
Start by locating the shipped org.freedesktop.Flatpak.rules and the policy defaults for app-update, runtime-update, appstream-update, metadata-update, and modify-repo; the issue does not identify their source files or tests. Check how existing rules distinguish local and remote sessions, then assess the proposed auth_admin_keep behavior and any policy tests. Done means the update actions retain remote admin authentication while allowing it to be reused for a transaction, or the recommended remote-session override is documented.
Written by the indexing model from the issue text.
Description
Checklist
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Suggestion
Environment
- Fedora 44, flatpak-1.18.4-1.fc44, polkit-127
- System-wide installation (Flathub), GNOME Software 50.4
- Session: GNOME Remote Desktop (RDP), user in
wheel
Problem
In a non-local session (RDP, SSH, VNC), updating ~19 Flatpaks required 25+ separate password prompts. The shipped org.freedesktop.Flatpak.rules only grants access for subject.local && subject.active, so remote sessions fall back to the action defaults, which use auth_admin (without _keep) for allow_any:
$ pkaction -v -a org.freedesktop.Flatpak.appstream-update
implicit any: auth_admin
implicit inactive: auth_admin
implicit active: yes
Every action in a single transaction (modify-repo, app-update, runtime-update, runtime-uninstall, appstream-update, metadata-update) therefore prompts again.
This was discussed in #3001 and closed as a policy decision in 2019. Since then, users have reported the same behaviour over SSH, xrdp, VNC and NoMachine on various distributions. As #3001 is now locked, I'm opening this as a focused proposal to reconsider the defaults.
Security perspective
Requiring authentication for remote sessions is reasonable. Requiring it dozens of times per transaction is counterproductive: it trains users to type their admin password into any dialog without reading it, which makes a malicious prompt much easier to slip in. One authentication per transaction is both more usable and more secure.
Proposal
Change allow_any (and allow_inactive) from auth_admin to auth_admin_keep for the update-related actions (app-update, runtime-update, appstream-update, metadata-update, modify-repo). Remote sessions still require admin authentication, but only once per update run.
If the defaults should stay as they are, documenting a recommended override rule for remote sessions would already help a lot. Currently users have to piece it together from closed issue comments.
Related
- #3001 (closed/locked, same problem over SSH)
- #4267 (
metadata-updateprompts over SSH) - https://gitlab.gnome.org/GNOME/gnome-software/-/issues/3032 (redirected here)
- Dominant language
- C
- Stars
- 5.1k
- Forks
- 526
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 23
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from flatpak/flatpak
-
[Feature request]: remove flatpak.fish completion so the shell's own completions are usedPossibly taken @Franklin-Qi claimed this 33 days ago. Openenhancement needs triage
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
[Feature request]: add support for `xdg-state` filesystem prefixPossibly taken @Franklin-Qi claimed this 33 days ago. Openenhancement libflatpak
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
flatpak/flatpak#5958 · 1 comment ·
Maintainers usually reply within 1 day
-
cli enhancement low priority
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Some flatpak repair strings are not translatableMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stratum-mining/sv2-tp#167 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
libsdl-org/SDL_ttf#650 ·
-
HTTP Request Smuggling: non-final chunked Transfer-Encoding not rejected (CWE-444)Possibly taken @code1a2024 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jaredgei/wow-forever-android#97 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
openziti/ziti-sdk-c#1254 ·
Maintainers usually reply within 1 day