opsick
Public Attributes | List of all members
opsick_config_adminsettings Struct Reference

#include <config.h>

Public Attributes

uint64_t max_users
 
uint8_t use_index_html
 
uint64_t key_refresh_interval_hours
 
char user_registration_password [OPSICK_MAX_USER_CREATION_PASSWORD_LENGTH]
 
uint32_t argon2_time_cost
 
uint32_t argon2_memory_cost_kib
 
uint32_t argon2_parallelism
 
uint8_t api_key_algo
 
uint8_t api_key_public [32]
 
char api_key_public_hexstr [64+1]
 

Detailed Description

The admin section of the opsick config file.

Member Data Documentation

◆ api_key_algo

uint8_t opsick_config_adminsettings::api_key_algo

The algorithm ID for the API key.

◆ api_key_public

uint8_t opsick_config_adminsettings::api_key_public[32]

The public key to use for verifying requests that come from the API master, who signs the requests using this key's private counterpart.

The API master is whoever has the private key for signing requests to this backend to create and extend users. It's kinda like an admin.

◆ api_key_public_hexstr

char opsick_config_adminsettings::api_key_public_hexstr[64+1]

The hex-encoded api_key_public string (NUL-terminated).

It's the hex-encoded Ed25519 key with which to verify API requests such as user creation and user extension (the API master needs to sign his request's body with the private counterpart of that key).

◆ argon2_memory_cost_kib

uint32_t opsick_config_adminsettings::argon2_memory_cost_kib

Memory cost parameter for the Argon2 hashing (higher == slower == safer).

◆ argon2_parallelism

uint32_t opsick_config_adminsettings::argon2_parallelism

Amount of threads to use for the Argon2 hashing.

◆ argon2_time_cost

uint32_t opsick_config_adminsettings::argon2_time_cost

Time cost parameter for the Argon2 hashing (the higher this iteration count, the slower the hashing, the safer the passwords).

◆ key_refresh_interval_hours

uint64_t opsick_config_adminsettings::key_refresh_interval_hours

Define the interval (in hours) at which the opsick server keys are auto-replaced with freshly generated ones.

These keys (one pair of public and private key) are used by the server to sign HTTP responses (private key), and by the clients to verify the HTTP responses' signature (public key).

[DEFAULT] 72 (after 72 hours the server keys are regenerated and the old ones discarded).

◆ max_users

uint64_t opsick_config_adminsettings::max_users

The maximum amount of users the opsick instance is allowed to have (if this limit is reached, the registration endpoint is disabled).

[DEFAULT] 0 (which means unlimited).

◆ use_index_html

uint8_t opsick_config_adminsettings::use_index_html

Set this to a non-zero value if you want to let the home endpoint (reachable under "/") serve the index.html file that's located inside the directory where the opsick executable resides.

You could for example modify that index.html file and customize it to your needs, add some sort of welcome screen to your users and basically do whatever you like with it.

If set to 0, the "/" endpoint just returns a plain HTTP status code 200 ("OK"). In that case, the whole opsick instance would act as a plain Web API without any visual feedback/interface.

[DEFAULT] 1

◆ user_registration_password

char opsick_config_adminsettings::user_registration_password[OPSICK_MAX_USER_CREATION_PASSWORD_LENGTH]

The user registration password is an Argon2 encoded hash of the password that the API master needs to additionally pass to the opsick server as a request parameter when trying to create a new user.

[DEFAULT] argon2id("opsick_registration_password")


The documentation for this struct was generated from the following file: