Skip to main content

Module backend

Module backend 

Source
Expand description

Backend handling for NetHsm.

Based on a NetHsm, NetHsmAdminCredentials and a Config this module offers the ability to populate a NetHsm backend with the help of the NetHsmBackend struct.

Using NetHsmBackend::sync all users and keys configured in a Config are created and adapted to changes upon re-run. The state representation can be found in the nethsm::state module.

ยงNote

This module only works with data for the same iteration (i.e. the iteration of the NetHsmAdminCredentials and those of the NetHsm backend must match).

Structsยง

KeySetupComparison ๐Ÿ”’
Comparable components of a key setup between a NetHsm backend and a Signstar config.
KeyState ๐Ÿ”’
The state of a key in a NetHsmBackend.
NetHsmBackend
A NetHSM backend that provides full control over its data.
NetHsmBackendState
The state of a NetHsmBackend.
UserState ๐Ÿ”’
The state of a user in a NetHsmBackend.

Functionsยง

add_namespace_admins ๐Ÿ”’
Sets up all N-Administrators and their respective namespaces.
add_namespaced_keys ๐Ÿ”’
Sets up all namespaced keys and tags them.
add_namespaced_non_administrative_users ๐Ÿ”’
Sets up all namespaced non-administrative users.
add_namespaced_openpgp_certificates ๐Ÿ”’
Adds OpenPGP certificates for namespaced keys that are used for OpenPGP signing.
add_non_administrative_users ๐Ÿ”’
Sets up all system-wide, non-administrative users based on provided credentials.
add_system_wide_admins ๐Ÿ”’
Creates all R-Administrators on a NetHsm.
add_system_wide_keys ๐Ÿ”’
Sets up all system-wide keys.
add_system_wide_openpgp_certificates ๐Ÿ”’
Adds OpenPGP certificates for system-wide keys that are used for OpenPGP signing.
compare_key_setups ๐Ÿ”’
Compares the key setups of a key from a Signstar config and that of a NetHSM backend.
get_first_available_namespace_admin ๐Ÿ”’
Retrieves the first available user in the [Administrator][UserRole::Administrator] (N-Administrator) role in a namespace.