miniroon

Simplistic macaroon-based authorization for Unix systems
git clone https://ccx.te2000.cz/git/miniroon
Log | Files | Refs | README

commit 4cfdbae176d84e4243c77b463dd14f69f567edb0
parent ad4364c8678ea7813f36667dff11bb6c052d4a9d
Author: Jan Pobrislo <ccx@te2000.cz>
Date:   Sat, 15 Feb 2025 23:09:21 +0000

Write rough outline of operation into README file

Diffstat:
MREADME | 33++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/README b/README @@ -35,7 +35,38 @@ TBD miniroon programs and directory structure ----------------------------------------- -TBD +miniroon <-- catalog directory +├── example1 <-- run directory +│   ├── run +│   ├── secret +│   └── verify +└── example2 <-- another run directory + ├── run + ├── secret + └── verify + +The `miniroon-read` command takes single argument that is the catalog directory to use, +eg. `miniroon-read ./data/miniroon`. +The `miniroon-read` program is expected to be launched from `s6-sudo`, via OpenSSH +`ForceCommand` option or otherwise from other security domain but inheriting required +access rights. +It reads miniroon wire format on stdin, parses it's header and if it contains recognized +`version` and `id` it changes into run directory with the same name as the `id` in the +catalog directory. +The stdin file descriptor is then closed, but stdout and stderr are left intact and free +to use by application being run. +It then executes into `verify` file in the run directory and passess it arguments +that should be given to `miniroon-verify` program. +The `verify` file is supposed to set up environment variables that may be changed and +execute `miniroon-verify` with the same arguments it got. +Similarly to `s6-sudod` only the environment variables which are present but empty can +be changed by the provided miniroon. +The `miniroon-verify` program then does the actual verification of full miniroon +including the provided signature verifying each part of miniroon starting with the +content of the `secret` file in the rundir. +If verification passess the `run` file in the run directory is then executed. + +TODO: document `invoke-once` and `revoke` miniroon modes. references ----------