Initialize the HBM database and set default config values. Safe to run multiple times — skips keys that already exist.
hbm init [--action] [--config]
Creates /var/lib/hbm/ and the SQLite database if they don't exist. Migrates legacy schemas automatically.
Start the HBM authorization plugin server. Writes /etc/docker/plugins/hbm.spec and listens on /run/docker/plugins/hbm.sock.
hbm server
Typically run via systemd. Handles graceful shutdown on SIGTERM/SIGINT.
Display HBM version, database path, and current config values.
hbm info
Show the HBM version string.
hbm version
Add a user to the whitelist. The name must match the CN in the user's TLS client certificate.
hbm user add <name>
Remove a user from the whitelist.
hbm user rm <name>
hbm user remove <name>
List all whitelisted users.
hbm user ls [-f <filter>]
hbm user list [-f <filter>]
Check if a user exists.
hbm user find <name>
Add or remove a user from a group.
hbm user member <group> <user> --add
hbm user member <group> <user> --remove
Create a group.
hbm group add <name>
Remove a group. Fails if the group is referenced by a policy.
hbm group rm <name>
hbm group remove <name>
List all groups.
hbm group ls [-f <filter>]
hbm group list [-f <filter>]
Check if a group exists.
hbm group find <name>
Create a policy linking a group to a collection.
hbm policy add <name> -g <group> -c <collection>
Flags:
-g/--group— the group name-c/--collection— the collection name
Remove a policy.
hbm policy rm <name>
hbm policy remove <name>
List all policies.
hbm policy ls [-f <filter>]
hbm policy list [-f <filter>]
Check if a policy exists.
hbm policy find <name>
Create a collection.
hbm collection add <name>
Remove a collection. Fails if referenced by a policy.
hbm collection rm <name>
hbm collection remove <name>
List all collections.
hbm collection ls [-f <filter>]
hbm collection list [-f <filter>]
Check if a collection exists.
hbm collection find <name>
Add a resource to the whitelist.
hbm resource add <name> [-t <type>] [-v <value>] [-o <option>]
Flags:
-t/--type— resource type (default:action). See Resources for all types.-v/--value— the resource value-o/--option— option modifier, can be repeated
Remove a resource.
hbm resource rm <name>
hbm resource remove <name>
List all resources.
hbm resource ls [-f <filter>]
hbm resource list [-f <filter>]
Check if a resource exists.
hbm resource find <name>
Add or remove a resource from a collection.
hbm resource member <collection> <resource> --add
hbm resource member <collection> <resource> --remove
Set a config value.
hbm config set <key> <value>
Available keys:
| Key | Values | Description |
|---|---|---|
authorization |
true / false |
Enable or disable authorization enforcement |
default-allow-action-error |
true / false |
Allow requests when an internal error occurs |
Get the current value of a config key.
hbm config get <key>
hbm config find <key>
List all config keys and their values.
hbm config ls [-f <filter>]
hbm config list [-f <filter>]
hbm system currently has no subcommands beyond hbm init, hbm info, and hbm version (listed above).