Bug 2244876
Summary: | authentication is required to update metadata | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Rixham <martin.rixham> |
Component: | flatpak | Assignee: | David King <amigadave> |
Status: | ASSIGNED --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 38 | CC: | amigadave, debarshir, exnihilo, gnome-sig, jrybar, klember, tgunders, vmihalko |
Target Milestone: | --- | Keywords: | Desktop |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | --- | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Martin Rixham
2023-10-18 17:19:43 UTC
Hello, this is usually PackageKit requesting authentization to get authorization for updating repository metadata. Can you please confirm by running `journalctl -S -2m -u polkit.service` in terminal right after this happens and copying the output lines here? Thank you. thanks, here's the log: [martin@localhost-live ~]$ journalctl -S -2m -u polkit.service Oct 19 22:15:19 fedora polkitd[27417]: Operator of unix-session:19 successfully authenticated as unix-user:martin to > Oct 19 22:15:21 fedora polkitd[27417]: Operator of unix-session:19 successfully authenticated as unix-user:martin to > Oct 19 22:15:26 fedora polkitd[27417]: Unregistered Authentication Agent for unix-session:c19 (system bus name :1.368> Hi, I have hit a similar issue on a new box where I'm segregating accounts. I have one unprivileged account ($UNPRIVUSER) with user flatpaks from the flathub repo and one privileged account ($PRIVUSER) to install system flatpaks from the fedora repo. With Fedora 39, switching between sessions with ctrl + alt + # throws up the authentication request: "authentication is required to update metadata" when switching from privileged account => unprivileged and again when switching back. I've reproduced it onto a clean install in a VM using one --user flatpak (flatseal) and one system flatpak (epiphany). When switching to unprivileged user Operator of unix-session:9 FAILED to authenticate to gain authorization for action org.freedesktop.Flatpak.metadata-update for system-bus-name:: 1.733 [/usr/bin/gnome-software --gapplication-service] (owned by unix-user:$UNPRIVUSER). Or Operator of unix-session:1 successfully authenticated as unix-user:$PRIVUSER to gain ONE-SHOT authorization for action org.freedesktop.Flatpak.metadata-update for system-bus-name::1.87 [/usr/bin/gnome-software --gapplication-service] (owned by unix-user:$UNPRIVUSER) When switching back to privileged user Operator of unix-session:9 FAILED to authenticate to gain authorization for action org.freedesktop.Flatpak.metadata-update for system-bus-name:: 1.189 [/usr/bin/gnome-software --gapplication-service] (owned by unix-user:$PRIVUSER). Or Operator of unix-session:4 successfully authenticated as unix-user:$PRIVUSER to gain ONE-SHOT authorization for action org.freedesktop.Flatpak.metadata-update for system-bus-name::1.194 [/usr/bin/gnome-software --gapplication-service] (owned by unix-user:$PRIVUSER) Prompt does not appaer when switching back if I authenticated during the initial privileged => unprivileged switch. It's probably possible to resolve it with polkit rules. It may need to be reported upstream? Unsure of the "problematic" component between polkit, flatpak, gnome-software or something else altogether. I don't have the time to learn about it so for now I "fixed" it removing gnome-software since I do everything on the command line anyway. I had another issue where all user platpaks refs where temporarily broken and I could not update at all, but I could not reproduce it after a reboot of my main box. Some posts which are likely related: https://discussion.fedoraproject.org/t/authentication-is-required-to-update-metadata/78226 https://discussion.fedoraproject.org/t/authentication-is-required-to-update-metadata/78226 And bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2055956 Hello, here it is in the [report](https://bugzilla.redhat.com/show_bug.cgi?id=2244876#c3) provided by Thomas. Thanks! I suspected packagekitd, but it's generally gnome-software and the repository backend it uses. You know, apps and services define their actions and rulesets to polkit so it can authentize/authorize users (whether automatically or not) to execute those actions accordingly to the rules. These kinds of information are defined in files vendored within that app/service itself, because they're the ones to know best what they want (their users) to do. It is out of hands of polkit. Polkit just takes the information, interprets it and executes it when needed. This issue can be resolved by Flatpak maintainers by extending file /usr/share/polkit-1/rules.d/org.freedesktop.Flatpak.rules with the new action rule (or merge the followin if-block in the existing rules): ``` polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.Flatpak.metadata-update") { return polkit.Result.YES; } return polkit.Result.NOT_HANDLED; }); ``` I don't know the details about Flatpak, but I guess updating metadata should be a safe operation for all users. |