crypto
A set of cryptographic tasks.
crypto template details
- Status: stable
- File: https://gitlab.com/op_so/task/task-templates/-/raw/main/Taskfile.d/crypto.yml
- Home: https://gitlab.com/op_so/task/task-templates
- License: MIT
List of tasks
Tasks | Description |
---|---|
crypto:age-decrypt |
Decrypt a folder with age. Arguments: NAME|N=filename (*) |
crypto:age-encrypt |
Encrypt a folder with age. Arguments: DIR|D=dir_path (*) |
crypto:generate-csr |
Generate a private key pair and csr. Arguments: CONFIG|C=server_config.cnf NAME|N=hostname (*) |
crypto:generate-htpasswd |
Generate or add an entry in htpasswd file. Arguments: FILE|F=relative_file_path UUSER|U=user PASS|P=password (*) |
crypto:generate-key |
Generate a SSH key pair. Arguments: KEY|K=key_path (*) |
global variables
Variables | Description | Default value |
---|---|---|
DOCKER_RUN_OPTS |
Optional Docker options for docker run command | - |
crypto:age-decrypt
Decrypt a folder with age. Arguments: NAME|N=filename (*)
Arguments | Description |
---|---|
NAME | N |
File name without extension tar.age (required) |
Requirements:
- age
crypto:age-encrypt
Encrypt a folder with age. Arguments: DIR|D=dir_path (*)
Arguments | Description |
---|---|
DIR | D |
Directory to encrypt (required) |
Requirements:
- age
crypto:generate-csr
Generate a private key pair and csr. Arguments: CONFIG|C=server_config.cnf NAME|N=hostname (*)
[CRYPTO] Generate a private key pair and Certificate Signing Request csr.
Usage: task crypto:generate-csr CONFIG|K=<config_path> NAME|N=<server_name>
Arguments | Description |
---|---|
CONFIG | C |
Config file path (required) |
NAME | N |
Server name (required) |
Configuration file Example:
[ req ]
default_md = sha256
distinguished_name = req_dn
req_extensions = req_ext
prompt = no
[ req_ext ]
subjectAltName = @alt_names
[ req_dn ]
countryName = FR
stateOrProvinceName = Ile-de-France
localityName = Paris
organizationName = organization
organizationalUnitName = unit
commonName = server_name.example.com
[ alt_names ]
DNS.0 = server_name.example.com
Requirements:
- openssl
crypto:generate-htpasswd
Generate or add an entry in htpasswd file. Arguments: FILE|F=relative_file_path UUSER|U=user PASS|P=password (*)
[CRYPTO] Generate a Basic Auth file or add an entry in htpasswd file.
Usage: task crypto:generate-htpasswd FILE|F=<file_relative_path> UUSER|U=<username> PASS|P=<password>
Arguments | Description |
---|---|
FILE | F |
Relative file path to the Basic Auth file (required) |
UUSER | U |
Username (required) |
PASS | P |
Password of the username (required) |
Requirements:
- docker
crypto:generate-key
Generate a SSH key pair. Arguments: KEY|K=key_path (*)
Arguments | Description |
---|---|
KEY | K |
Path to the private key file (required) |
Requirements:
- ssh-keygen