shell completition added net-nds/kanidmd

This commit is contained in:
Micha Glave
2026-01-02 11:20:00 +01:00
parent 3600ebfbfb
commit a4410a22de
4 changed files with 3552 additions and 12 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,214 @@
# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.
function __fish_kanidmd_global_optspecs
string join \n c/config-path= o/output= h/help
end
function __fish_kanidmd_needs_command
# Figure out if the current invocation already has a command.
set -l cmd (commandline -opc)
set -e cmd[1]
argparse -s (__fish_kanidmd_global_optspecs) -- $cmd 2>/dev/null
or return
if set -q argv[1]
# Also print the command, so this can be used to figure out what it is.
echo $argv[1]
return 1
end
return 0
end
function __fish_kanidmd_using_subcommand
set -l cmd (__fish_kanidmd_needs_command)
test -z "$cmd"
and return 1
contains -- $cmd[1] $argv
end
complete -c kanidmd -n "__fish_kanidmd_needs_command" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_needs_command" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_needs_command" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "server" -d 'Start the IDM Server'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "configtest" -d 'Test the IDM Server configuration, without starting network listeners'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "cert-generate" -d 'Create a self-signed ca and tls certificate in the locations listed from the configuration. These certificates should *not* be used in production, they are for testing and evaluation only!'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "recover-account" -d 'Recover an account\'s password'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "disable-account" -d 'Disable an account so that it can not be used. This can be reset with `recover-account`'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "show-replication-certificate" -d 'Display this server\'s replication certificate'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "renew-replication-certificate" -d 'Renew this server\'s replication certificate'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "refresh-replication-consumer" -d 'Refresh this servers database content with the content from a supplier. This means that all local content will be deleted and replaced with the supplier content'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "db-scan" -d 'Inspect the internal content of the database datastructures'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "database" -d 'Database maintenance, backups, restoration etc'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "domain" -d 'Change domain settings'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "healthcheck" -d 'Load the server config and check services are listening'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "version" -d 'Print the program version and exit'
complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand server" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand server" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand server" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand configtest" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand configtest" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand configtest" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand cert-generate" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand cert-generate" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand cert-generate" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand recover-account" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand recover-account" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand recover-account" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand disable-account" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand disable-account" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand disable-account" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand show-replication-certificate" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand show-replication-certificate" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand show-replication-certificate" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand renew-replication-certificate" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand renew-replication-certificate" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand renew-replication-certificate" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand refresh-replication-consumer" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand refresh-replication-consumer" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand refresh-replication-consumer" -l i-want-to-refresh-this-servers-database -d 'Acknowledge that this database content will be refreshed from a supplier'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand refresh-replication-consumer" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-all-indexes" -d 'List all index tables that exist on the system'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-index" -d 'List all content of a named index'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-id2entry" -d 'List all id2entry values with reduced entry content'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "get-id2entry" -d 'View the data of a specific entry from id2entry'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-index-analysis" -d 'List all content of index analysis'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "quarantine-id2entry" -d 'Given an entry id, quarantine the entry in a hidden db partition'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-quarantined" -d 'List the entries in quarantine'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "restore-quarantined" -d 'Given an entry id, restore the entry from the hidden db partition'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-all-indexes" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-all-indexes" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-all-indexes" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-id2entry" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-id2entry" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-id2entry" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from get-id2entry" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from get-id2entry" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from get-id2entry" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index-analysis" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index-analysis" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index-analysis" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from quarantine-id2entry" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from quarantine-id2entry" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from quarantine-id2entry" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-quarantined" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-quarantined" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-quarantined" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from restore-quarantined" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from restore-quarantined" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from restore-quarantined" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-all-indexes" -d 'List all index tables that exist on the system'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-index" -d 'List all content of a named index'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-id2entry" -d 'List all id2entry values with reduced entry content'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "get-id2entry" -d 'View the data of a specific entry from id2entry'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-index-analysis" -d 'List all content of index analysis'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "quarantine-id2entry" -d 'Given an entry id, quarantine the entry in a hidden db partition'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-quarantined" -d 'List the entries in quarantine'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "restore-quarantined" -d 'Given an entry id, restore the entry from the hidden db partition'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "vacuum" -d 'Vacuum the database to reclaim space or change db_fs_type/page_size (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "backup" -d 'Backup the database content (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "restore" -d 'Restore the database content (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "verify" -d 'Verify database and entity consistency'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "reindex" -d 'Reindex the database (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from vacuum" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from vacuum" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from vacuum" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from backup" -s C -l compression -d 'Compression method' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from backup" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from backup" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from backup" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from restore" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from restore" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from restore" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from verify" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from verify" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from verify" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from reindex" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from reindex" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from reindex" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "vacuum" -d 'Vacuum the database to reclaim space or change db_fs_type/page_size (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "backup" -d 'Backup the database content (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "restore" -d 'Restore the database content (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "verify" -d 'Verify database and entity consistency'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "reindex" -d 'Reindex the database (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "show" -d 'Show the current domain'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "rename" -d 'Change the IDM domain name based on the values in the configuration'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "upgrade-check" -d 'Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "raise" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "remigrate" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from show" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from show" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from show" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from rename" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from rename" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from rename" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from upgrade-check" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from upgrade-check" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from upgrade-check" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from raise" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from raise" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from raise" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from remigrate" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from remigrate" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from remigrate" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "show" -d 'Show the current domain'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "rename" -d 'Change the IDM domain name based on the values in the configuration'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "upgrade-check" -d 'Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "raise" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "remigrate" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s v -l verify-tls -d 'Disable TLS verification'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s O -l check-origin -d 'Check the \'origin\' URL from the server configuration file, instead of the \'address\''
complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand version" -s c -l config-path -r -F
complete -c kanidmd -n "__fish_kanidmd_using_subcommand version" -s o -l output -d 'Output formatting' -r
complete -c kanidmd -n "__fish_kanidmd_using_subcommand version" -s h -l help -d 'Print help'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "server" -d 'Start the IDM Server'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "configtest" -d 'Test the IDM Server configuration, without starting network listeners'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "cert-generate" -d 'Create a self-signed ca and tls certificate in the locations listed from the configuration. These certificates should *not* be used in production, they are for testing and evaluation only!'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "recover-account" -d 'Recover an account\'s password'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "disable-account" -d 'Disable an account so that it can not be used. This can be reset with `recover-account`'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "show-replication-certificate" -d 'Display this server\'s replication certificate'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "renew-replication-certificate" -d 'Renew this server\'s replication certificate'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "refresh-replication-consumer" -d 'Refresh this servers database content with the content from a supplier. This means that all local content will be deleted and replaced with the supplier content'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "db-scan" -d 'Inspect the internal content of the database datastructures'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "database" -d 'Database maintenance, backups, restoration etc'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "domain" -d 'Change domain settings'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "healthcheck" -d 'Load the server config and check services are listening'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "version" -d 'Print the program version and exit'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-all-indexes" -d 'List all index tables that exist on the system'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-index" -d 'List all content of a named index'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-id2entry" -d 'List all id2entry values with reduced entry content'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "get-id2entry" -d 'View the data of a specific entry from id2entry'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-index-analysis" -d 'List all content of index analysis'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "quarantine-id2entry" -d 'Given an entry id, quarantine the entry in a hidden db partition'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-quarantined" -d 'List the entries in quarantine'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "restore-quarantined" -d 'Given an entry id, restore the entry from the hidden db partition'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "vacuum" -d 'Vacuum the database to reclaim space or change db_fs_type/page_size (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "backup" -d 'Backup the database content (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "restore" -d 'Restore the database content (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "verify" -d 'Verify database and entity consistency'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "reindex" -d 'Reindex the database (offline)'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "show" -d 'Show the current domain'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "rename" -d 'Change the IDM domain name based on the values in the configuration'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "upgrade-check" -d 'Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "raise" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available'
complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "remigrate" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from'

File diff suppressed because it is too large Load Diff

View File

@@ -763,7 +763,7 @@ CRATES="
zxcvbn@3.1.0 zxcvbn@3.1.0
" "
inherit cargo inherit cargo shell-completion systemd
DESCRIPTION="Kanidm Server Daemon" DESCRIPTION="Kanidm Server Daemon"
HOMEPAGE="https://github.com/kanidm/kanidm/" HOMEPAGE="https://github.com/kanidm/kanidm/"
@@ -792,6 +792,7 @@ pam? ( sys-libs/pam )
" "
BDEPEND=" BDEPEND="
llvm-core/clang llvm-core/clang
sys-devel/binutils
>=dev-lang/rust-bin-1.90.0 >=dev-lang/rust-bin-1.90.0
" "
@@ -829,30 +830,32 @@ src_install() {
newins examples/radius_full.toml radius.toml newins examples/radius_full.toml radius.toml
newins examples/unixd unixd newins examples/unixd unixd
newbashcomp ${FILESDIR}/${PN}.bash ${PN}
newfishcomp ${FILESDIR}/${PN}.fish ${PN}.fish
newzshcomp ${FILESDIR}/${PN}.bash _${PN}
if use server; then if use server; then
einfo "Installing kanidmd-server" einfo "Installing kanidmd-server"
newins examples/server.toml server.toml newins examples/server.toml server.toml
dodir /usr/share/kanidm dodir /usr/share/kanidm/ui/hpkg
cp -R "${S}/server/core/static" "${ED}/usr/share/kanidm/" || die "Install failed!" cp -R "${S}/server/core/static" "${ED}/usr/share/kanidm/ui/hpkg/" || die "Install failed!"
systemd_newunit platform/opensuse/kanidm-ipa-sync.service kanidm-ipa-sync.service systemd_dounit platform/opensuse/kanidm-ipa-sync.service
systemd_newunit platform/opensuse/kanidm-unixd-tasks.service kanidm-unixd-tasks.service systemd_dounit platform/opensuse/kanidm-unixd-tasks.service
systemd_newunit platform/opensuse/kanidm-unixd.service kanidm-unixd.service systemd_dounit platform/opensuse/kanidm-unixd.service
systemd_newunit platform/opensuse/kanidmd.service kanidmd.service systemd_dounit platform/opensuse/kanidmd.service
newinitd "${FILESDIR}/kanidm.initd" kanidmd newinitd "${FILESDIR}/kanidm.initd" kanidmd
cp examples/server.toml "${ED}/usr/share/kanidm/" || die "Install failed!"
fi fi
if use acct; then if use acct; then
fowners root:kanidmd /etc/kanidm/{,config,radius.toml,unixd} fowners root:kanidm /etc/kanidm/{,config,radius.toml,unixd}
fperms g+w,o-rwx /etc/kanidm/{,config,radius.toml,unixd} fperms g+w,o-rwx /etc/kanidm/{,config,radius.toml,unixd}
if use server; then if use server; then
fowners root:kanidmd /etc/kanidm/server.toml fowners root:kanidm /etc/kanidm/server.toml
fperms g+w,o-rwx /etc/kanidm/server.toml fperms g+w,o-rwx /etc/kanidm/server.toml
diropts -m0750 -o kanidmd -g kanidmd diropts -m0750 -o kanidm -g kanidm
keepdir /var/lib/private/kanidm keepdir /var/lib/private/kanidm
keepdir /var/log/kanidmd keepdir /var/log/kanidmd
fi fi