The README had grown to 2,940 words (`wc -w README.md`): a table of the app's screens with a list of notes on how the app behaves under it, the checkout's method with its rules, errors and examples, and a subsection on polkit rules with one written out. It is 1,170 words now. What stays is what a reader needs to choose, install and use Nostro, and what they must know for their money's sake: how nostrod keeps the bank connections, the app's pictures with four notes under them, installing, the CLI's commands, a paragraph on the checkout that points at the interface's XML, and "Security" as a list whose last line points at the polkit policy. The README's warning against a rule that keeps an authorization moves into the comment of that policy file, which already describes the rule the README wrote out. The guide's commit guidelines now say that the README is kept short, and where what does not go into it goes. Two of the guide's sentences spoke of what the README says of each screen: the one is gone, the other no longer names the README. A third cited the README for what an app with access to the checkout can learn of an order, which the README no longer says: it stands without the citation.
112 lines
5.9 KiB
XML
112 lines
5.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?> <!--*-nxml-*-->
|
|
<!-- SPDX-License-Identifier: LGPL-3.0-only -->
|
|
<!-- SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® -->
|
|
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
|
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
|
<!-- What nostrod (net.catcrafts.Nostro1) asks polkit before it does anything for a caller.
|
|
|
|
Every action is owned by unix-user:nostro, the user nostrod runs as: polkit lets only root or an action's owner
|
|
check a call made by another user, or pass the details the dialog shows. $(summary) is what nostrod read for the
|
|
call itself, such as the amount, the payee and the account of a payment; the details amount_minor, currency,
|
|
counterparty, account_iban, environment, at checkout reference, and for a card card (its id) and status (ACTIVE,
|
|
DEACTIVATED, LOST or STOLEN) are there for rules (an amount above which an administrator must approve, say).
|
|
|
|
No action keeps an authorization: polkit ties a kept one to the calling process, so the CLI would ask every time
|
|
anyway. Viewing is free in an active session, and nothing else is. Whatever pays (an app's checkout included),
|
|
whatever changes anything at the bank (a request for money, a draft, a schedule cancelled, a card frozen), and
|
|
whatever changes the bank connections or the account checkouts pay from asks for the user's password every time.
|
|
|
|
That is the default, and it is the strict one on purpose: no program of the user's does anything at their bank
|
|
without them. Loosening it is an administrator's choice, made with a rule, and polkit cannot tell one program of
|
|
a user's from another, so a rule that lets an action pass lets it pass for all of them. A rule that lets a card
|
|
be frozen without a password, for one, returns polkit.Result.YES for the action Change when
|
|
action.lookup("status") is "DEACTIVATED"; without that test of status it would let every change pass. Do not
|
|
have a rule keep an authorization (AUTH_SELF_KEEP): for some minutes polkit then lets the same program through
|
|
for that action whatever it asks next, which under Pay is a payment to someone else.
|
|
|
|
A call that names an account, a card, a request, a draft or a connector, and is not a call to see it, is checked
|
|
twice: for View, before nostrod looks up what it names, and then for what it does. A caller who may not see the
|
|
accounts so learns nothing of them by trying to change them. Where a rule makes View ask for a password, such a
|
|
call asks for it twice.
|
|
|
|
Install: /usr/share/polkit-1/actions/net.catcrafts.Nostro1.policy. Tune with rules in /etc/polkit-1/rules.d/. -->
|
|
<policyconfig>
|
|
<vendor>Catcrafts</vendor>
|
|
|
|
<action id="net.catcrafts.Nostro1.View">
|
|
<description>See your bank accounts, transactions, requests and cards</description>
|
|
<message>Authentication is required to $(summary)</message>
|
|
<defaults>
|
|
<allow_any>auth_self</allow_any>
|
|
<allow_inactive>auth_self</allow_inactive>
|
|
<allow_active>yes</allow_active>
|
|
</defaults>
|
|
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
|
|
</action>
|
|
|
|
<action id="net.catcrafts.Nostro1.Change">
|
|
<description>Ask for money, make draft payments, cancel what is pending, or freeze a card</description>
|
|
<message>Authentication is required to $(summary)</message>
|
|
<defaults>
|
|
<allow_any>auth_self</allow_any>
|
|
<allow_inactive>auth_self</allow_inactive>
|
|
<allow_active>auth_self</allow_active>
|
|
</defaults>
|
|
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
|
|
</action>
|
|
|
|
<action id="net.catcrafts.Nostro1.Pay">
|
|
<description>Make a payment, schedule one, or accept a request or a draft payment</description>
|
|
<message>Authentication is required to $(summary)</message>
|
|
<defaults>
|
|
<allow_any>auth_self</allow_any>
|
|
<allow_inactive>auth_self</allow_inactive>
|
|
<allow_active>auth_self</allow_active>
|
|
</defaults>
|
|
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
|
|
</action>
|
|
|
|
<action id="net.catcrafts.Nostro1.UnfreezeCard">
|
|
<description>Let a frozen card pay again</description>
|
|
<message>Authentication is required to $(summary)</message>
|
|
<defaults>
|
|
<allow_any>auth_self</allow_any>
|
|
<allow_inactive>auth_self</allow_inactive>
|
|
<allow_active>auth_self</allow_active>
|
|
</defaults>
|
|
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
|
|
</action>
|
|
|
|
<action id="net.catcrafts.Nostro1.BlockCard">
|
|
<description>Report a card lost or stolen, which blocks it for good</description>
|
|
<message>Authentication is required to $(summary)</message>
|
|
<defaults>
|
|
<allow_any>auth_self</allow_any>
|
|
<allow_inactive>auth_self</allow_inactive>
|
|
<allow_active>auth_self</allow_active>
|
|
</defaults>
|
|
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
|
|
</action>
|
|
|
|
<action id="net.catcrafts.Nostro1.Connectors">
|
|
<description>Add or remove a bank connection, or choose the account apps may ask you to pay from</description>
|
|
<message>Authentication is required to $(summary)</message>
|
|
<defaults>
|
|
<allow_any>auth_self</allow_any>
|
|
<allow_inactive>auth_self</allow_inactive>
|
|
<allow_active>auth_self</allow_active>
|
|
</defaults>
|
|
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
|
|
</action>
|
|
|
|
<action id="net.catcrafts.Nostro1.Checkout">
|
|
<description>Pay an order an app asks you to pay</description>
|
|
<message>Authentication is required to $(summary)</message>
|
|
<defaults>
|
|
<allow_any>auth_self</allow_any>
|
|
<allow_inactive>auth_self</allow_inactive>
|
|
<allow_active>auth_self</allow_active>
|
|
</defaults>
|
|
<annotate key="org.freedesktop.policykit.owner">unix-user:nostro</annotate>
|
|
</action>
|
|
</policyconfig>
|