Self-approval and separation of duties
Who can do what
| Role | Can | Can't |
|---|---|---|
| Requester (a key) | Ask, follow its own requests, use its own grants, end its own grants | Approve anything, including its own requests |
| Approver (a person with a paired device) | Approve or deny requests for the resources that list them, revoke grants, see the log | Approve resources that don't list them |
| Admin (the administrator, with a shell on the server) | Pair devices, create and disable requesters, revoke devices, reload the config, pull the kill switch, re-confirm standing grants | Approve or deny directly: no admin command approves a request. But an admin can pair devices and change who approves, so treat admin access as able to approve (see below) |
| Config owner (whoever can change the config file) | Decide who approves what, for how long, and whether self-approval is allowed | Approve on someone's behalf |
In small installations the same person often holds every role. A new approval always needs a signature from a paired device. But an existing standing grant can be used again, and a personal credential set to Always approved lets the people it's shared with get access without a new signature, including through their command-line key. Limit these with the settings in Approvals and access duration.
Self-approval
A person can ask for access themselves (through their own human requester), or own an agent or host that asks. When the same person then approves, the app labels the request Self-approval or Your own agent, and the grant records it.
Whether that's allowed is a per-resource setting, self_approval, which is on by default:
defaults:
self_approval: false # for every resource
resources:
- id: prod-db-password
self_approval: false # or for one resource
approvers: [alice, bob]
With it off, requests from a person's own requesters need another approver. Make sure each such resource lists at least two approvers, or nobody can approve those requests. Denying is always allowed.
Self-approval still has value: the request, its reason and the decision are all in the log, the grant is time-limited, and the approval needs the person's device in hand. But it isn't a second person's check.
Bouncer does not yet ask for an extra check when you approve your own request or your own agent's. The same key and checks apply as for anyone else: with a standard Android key, an unlocked phone is enough. If self-approval needs a stronger check, set require_hardware_uv: true on those resources or turn self_approval off.
A second approver
Every resource needs exactly one approval in this version. Requiring two different people to approve the same request isn't implemented.
The admin and the config owner
Anyone who can change the config file or run bouncer-admin can change who approves, add requesters, and loosen policy. Bouncer limits the damage and makes it visible:
- loosening changes are written to the log as
policy_loosenedand announced to the affected approvers' devices; - there is no admin command to approve a pending request, but an admin can change policy and enrol devices. Treat that authority, and write access to the database, as trusted;
- every admin action that changes access (pairing, revoking, disabling, the kill switch, re-confirming a review) is in the approval log.
To separate these duties, keep the config file in a repository where changes need review by someone else, and keep shell access to the server to a small group.
How this was checked
From the server source (self_approval in the decision checks, the admin API, the config loader) and a test reload in our run, which produced the policy_loosened entry shown in Configure the server.