<para>
PolicyKit provides an authorization API intended to be used by
privileged programs (<quote>MECHANISMS</quote>) offering service
- to unprivileged programs (<quote>CLIENTS</quote>). See
- <link linkend="PolicyKit-1.8">this page</link> for the system
- architecture and big picture.
+ to unprivileged programs (<quote>CLIENTS</quote>). See the
+ <link linkend="PolicyKit-1.8">PolicyKit-1</link> manual page for
+ the system architecture and big picture.
</para>
</chapter>
<emphasis>mechanism</emphasis> use either
the <link linkend="ref-api">GObject API</link>,
the <link linkend="ref-dbus-api">D-Bus API</link> or
- the <link linkend="pkcheck.1">pkcheck</link> command to speak
- to the PolicyKit Authority.
+ the <link linkend="pkcheck.1">pkcheck</link> command to
+ communicate with the PolicyKit Authority.
</para>
<para>
Note that <emphasis>clients</emphasis> never use the PolicyKit
</example>
</chapter>
+ <chapter>
+ <title>Writing PolicyKit Authentication Agents</title>
+ <para>
+ Authentication agents are provided by desktop environments. When
+ an user session starts, the agent registers with the PolicyKit
+ Authority using
+ the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent">RegisterAuthenticationAgent()</link>
+ method. When services are needed, the authority will invoke
+ methods on
+ the <link linkend="eggdbus-interface-org.freedesktop.PolicyKit1.AuthenticationAgent">org.freedesktop.PolicyKit1.AuthenticationAgent</link>
+ D-Bus interface. Once the user is authenticated, (a privileged
+ part of) the agent invokes
+ the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AuthenticationAgentResponse">AuthenticationAgentResponse()</link>
+ method. Note that the PolicyKit Authority itself does not care
+ how the agent authenticates the user.
+ </para>
+ <para>
+ The <link linkend="ref-authentication-agent-api">libpolkit-agent-1</link>
+ library provides helpers to make it easy to build authentication
+ agents that use the native authentication system
+ e.g. pam<literal>(8)</literal>.
+ </para>
+ </chapter>
+
<chapter>
<title>Extending PolicyKit</title>
<para>
<xi:include href="overview.xml"/>
- <reference id="ref-dbus-api">
- <title>D-Bus API Reference</title>
- <xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml"/>
- <xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthorityManager.xml"/>
- <xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml"/>
- </reference>
+ <part id="apis">
+ <title>API Reference</title>
- <reference id="ref-api">
- <title>Core API Reference</title>
- <xi:include href="xml/polkitauthority.xml"/>
- <xi:include href="xml/polkitauthorizationresult.xml"/>
- <xi:include href="xml/polkitdetails.xml"/>
- <xi:include href="xml/polkiterror.xml"/>
- <xi:include href="xml/polkitactiondescription.xml"/>
- <xi:include href="xml/polkitauthoritymanager.xml"/>
- <xi:include href="xml/polkitauthorization.xml"/>
- <chapter id="subjects">
- <title>Subjects</title>
- <xi:include href="xml/polkitsubject.xml"/>
- <xi:include href="xml/polkitunixprocess.xml"/>
- <xi:include href="xml/polkitunixsession.xml"/>
- <xi:include href="xml/polkitsystembusname.xml"/>
+ <chapter id="ref-dbus-api">
+ <title>D-Bus API Reference</title>
+ <xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml"/>
+ <xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthorityManager.xml"/>
+ <xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml"/>
</chapter>
- <chapter id="Identities">
- <title>Identities</title>
- <xi:include href="xml/polkitidentity.xml"/>
- <xi:include href="xml/polkitunixuser.xml"/>
- <xi:include href="xml/polkitunixgroup.xml"/>
+
+ <chapter id="ref-api">
+ <title>Core API Reference</title>
+ <xi:include href="xml/polkitauthority.xml"/>
+ <xi:include href="xml/polkitauthorizationresult.xml"/>
+ <xi:include href="xml/polkitdetails.xml"/>
+ <xi:include href="xml/polkiterror.xml"/>
+ <xi:include href="xml/polkitactiondescription.xml"/>
+ <xi:include href="xml/polkitauthoritymanager.xml"/>
+ <xi:include href="xml/polkitauthorization.xml"/>
+ <chapter id="subjects">
+ <title>Subjects</title>
+ <xi:include href="xml/polkitsubject.xml"/>
+ <xi:include href="xml/polkitunixprocess.xml"/>
+ <xi:include href="xml/polkitunixsession.xml"/>
+ <xi:include href="xml/polkitsystembusname.xml"/>
+ </chapter>
+ <chapter id="Identities">
+ <title>Identities</title>
+ <xi:include href="xml/polkitidentity.xml"/>
+ <xi:include href="xml/polkitunixuser.xml"/>
+ <xi:include href="xml/polkitunixgroup.xml"/>
+ </chapter>
</chapter>
- </reference>
- <reference id="ref-backend-api">
- <title>Backend API Reference</title>
- <xi:include href="xml/polkitbackendauthority.xml"/>
- <xi:include href="xml/polkitbackendlocalauthority.xml"/>
- <xi:include href="xml/polkitbackendactionpool.xml"/>
- <xi:include href="xml/polkitbackendsessionmonitor.xml"/>
- <xi:include href="xml/polkitbackendconfigsource.xml"/>
- <xi:include href="xml/polkitbackendactionlookup.xml"/>
- </reference>
+ <chapter id="ref-backend-api">
+ <title>Backend API Reference</title>
+ <xi:include href="xml/polkitbackendauthority.xml"/>
+ <xi:include href="xml/polkitbackendlocalauthority.xml"/>
+ <xi:include href="xml/polkitbackendactionpool.xml"/>
+ <xi:include href="xml/polkitbackendsessionmonitor.xml"/>
+ <xi:include href="xml/polkitbackendconfigsource.xml"/>
+ <xi:include href="xml/polkitbackendactionlookup.xml"/>
+ </chapter>
- <reference id="ref-authentication-agent-api">
- <title>Authentication Agent API Reference</title>
- <xi:include href="xml/polkitagentlistener.xml"/>
- <xi:include href="xml/polkitagentsession.xml"/>
- </reference>
+ <chapter id="ref-authentication-agent-api">
+ <title>Authentication Agent API Reference</title>
+ <xi:include href="xml/polkitagentlistener.xml"/>
+ <xi:include href="xml/polkitagentsession.xml"/>
+ </chapter>
+ </part>
- <reference id="manpages">
+ <part id="manpages">
<title>Manual Pages</title>
<xi:include href="../man/PolicyKit-1.xml"/>
<xi:include href="../man/polkitd-1.xml"/>
<xi:include href="../man/pkcheck.xml"/>
<xi:include href="../man/pkaction.xml"/>
<xi:include href="../man/pkexec.xml"/>
- </reference>
+ </part>
<chapter id="polkit-hierarchy">
<title>Object Hierarchy</title>
<title>Index</title>
</index>
- <!-- License -->
-
<appendix id="license">
<title>License</title>
<para>