No description
|
All checks were successful
/ check (push) Successful in 39s
Reviewed-on: #20 |
||
|---|---|---|
| .forgejo/workflows | ||
| src/kanidm_authorized_keys | ||
| .envrc | ||
| .gitignore | ||
| .python-version | ||
| flake.lock | ||
| flake.nix | ||
| module.nix | ||
| package.nix | ||
| pyproject.toml | ||
| README.md | ||
| renovate.json | ||
| test.nix | ||
| uv.lock | ||
kanidm-authorized-keys
Given a kanidm group this tool writes all its members' SSH public key into a
shared authorized_keys file that can be used for SSH authentication.
Usage
Usage: kanidm-authorized-keys [OPTIONS] AUTHORIZED_KEYS_FILE
Arguments:
AUTHORIZED_KEYS_FILE Destination path for the managed authorized_keys file
[env var: AUTHORIZED_KEYS_FILE; required]
Options:
--origin TEXT Origin of your Kanidm instance, e.g.
https://idm.example.com [env var: KANIDM_ORIGIN;
required]
--token-file FILENAME Path to a file that holds the API token for a Kanidm
service account [env var: KANIDM_TOKEN_FILE;
required]
--group TEXT Group to load SSH public keys for [env var:
KANIDM_GROUP; required]
--min-users INTEGER Assertion for minimum users that need to be found
[default: 0]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or
customize the installation.
--help Show this message and exit.
Environment variables
KANIDM_ORIGIN: The base url that hosts your kanidm, e.g. https://idm.example.comKANIDM_TOKEN: API token for a service account on the Kanidm instanceKANIDM_GROUP: The group that holds the users whose SSH Public Keys should be installedAUTHORIZED_KEYS_FILE: The destination file path.
Development
This project uses
- Nix Development Shell for Development Tools
- Direnv to manage attaching/detaching to the development environment
- uv for Python and its dependencies
To run the project during development execute
uv run kanidm-authorized-keys