Bug 956005

Summary: polkit: support for package-supplied authorization rules
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: polkitAssignee: Jan Rybar <jrybar>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jmoran, mitr
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-26 15:47:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Florian Weimer 2013-04-24 07:32:47 UTC
The polkit manual states this:

"Authorization rules are intended for two specific audiences

    System Administrators

    Special-purpose Operating Systems / Environments

and those audiences only. In particular, applications, mechanisms and general-purpose operating systems must never include any authorization rules."

However, replacing consolehelper with polkit (bug 502765) needs a mechanism by which packages can specify authorization rules.  For analysis purposes, it would be best if this was done in a declarative fashion (like .pkla files, see bug 908808).

Comment 1 Miloslav Trmač 2013-04-26 15:47:46 UTC
Thanks for your report.

If an application needs a different authorization rule "for itself" because the policy defaults mechanism in .action, it should just ship a .pkla (or .rules) file in /var or /usr.  I can't see any benefit to adding a separate mechanism.

An application A overriding the policy of application B is more problematic (primarily in terms of coordination or expectations), however the technical answer will probably be the same - just use a .pkla or .rules file.

Comment 2 Florian Weimer 2013-04-26 15:50:53 UTC
(In reply to comment #1)
> If an application needs a different authorization rule "for itself" because
> the policy defaults mechanism in .action, it should just ship a .pkla (or
> .rules) file in /var or /usr.  I can't see any benefit to adding a separate
> mechanism.

I agree that a code change is not necessarily required, but please update the manual page that this is a supported scenario.

Comment 3 Miloslav Trmač 2013-04-26 15:51:06 UTC
(In reply to comment #1)
> Thanks for your report.
> 
> If an application needs a different authorization rule "for itself" because
> the policy defaults mechanism in .action,
"because the policy defaults mechanism in .action is too weak"

Comment 4 Miloslav Trmač 2014-07-04 17:46:48 UTC
Patch sent upstream for review.

Comment 5 Fedora End Of Life 2015-01-09 22:06:18 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2015-11-04 15:43:54 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Florian Weimer 2016-04-23 16:08:01 UTC
polkit-0.113-5 still contains:

    <para>
      and those audiences only. In particular, applications,
      mechanisms and general-purpose operating systems must never
      include any authorization rules.
    </para>

Comment 8 Miloslav Trmač 2016-04-23 18:01:07 UTC
Yes, nothing happened upstream. Pinged there.