-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce cryptographic documentation
Documents all our current key generation algorithms.
- Loading branch information
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,11 @@ Slurm | |
munge | ||
LXD | ||
yaml | ||
JWT | ||
RSA | ||
mungectl | ||
Gid | ||
Uid | ||
cryptographic | ||
cryptographically | ||
PyPI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(cryptography)= | ||
# Cryptography | ||
|
||
This section describes the cryptographic algorithms used by the Charmed HPC project. | ||
|
||
- {ref}`munge` | ||
- {ref}`jwt` | ||
|
||
```{toctree} | ||
:titlesonly: | ||
:maxdepth: 1 | ||
:hidden: | ||
MUNGE <munge> | ||
JSON Web Tokens <jwt> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(jwt)= | ||
# JSON Web Tokens (JWT) | ||
|
||
Some Slurm charms support [JSON Web Tokens](https://jwt.io/) as an alternative authentication method for a Slurm cluster. | ||
|
||
This service is used by the Slurm charms: | ||
|
||
- [`slurmctld`](https://charmhub.io/slurmctld) | ||
- [`slurmrestd`](https://charmhub.io/slurmrestd) | ||
|
||
A shared private encryption key is required to verify the signature of client tokens. The current method uses RSA with a length of 2048 bits, which is generated using the [`cryptography`](https://pypi.org/project/cryptography/) package for Python. | ||
|
||
The [Slurm documentation](https://slurm.schedmd.com/jwt.html) contains more information about the topic. | ||
|
||
## Libraries used | ||
|
||
- [`cryptography`](https://pypi.org/project/cryptography/), from PyPI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(munge)= | ||
# MUNGE | ||
|
||
[MUNGE (MUNGE Uid 'N' Gid Emporium)](https://dun.github.io/munge/) is an authentication service for creating and validating credentials. | ||
|
||
This service is used by all our Slurm charms, including: | ||
|
||
- [`slurmctld`](https://charmhub.io/slurmctld) | ||
- [`slurmd`](https://charmhub.io/slurmd) | ||
- [`slurmdbd`](https://charmhub.io/slurmdbd) | ||
- [`slurmrestd`](https://charmhub.io/slurmrestd) | ||
|
||
MUNGE requires sharing a cryptographically secure key between all the Slurm nodes in a cluster. To generate this key, the charms | ||
use the [mungectl](https://github.com/charmed-hpc/mungectl) utility, which uses Go's [`crypto/rand`](https://pkg.go.dev/crypto/rand) library to generate a cryptographically secure key of 1024 bytes of length, using either [`getrandom(2)`](https://man7.org/linux/man-pages/man2/getrandom.2.html) if available, and [`/dev/urandom`](https://en.wikipedia.org/wiki//dev/random) otherwise. | ||
|
||
You can find more information about MUNGE on its [official wiki](https://github.com/dun/munge/wiki). | ||
|
||
## Packages used | ||
|
||
- [`crypto/rand`](https://pkg.go.dev/crypto/rand), from the [Go standard library](https://pkg.go.dev/std). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
(explanation)= | ||
# Explanation | ||
|
||
- {ref}`cryptography` | ||
|
||
🚧 Under construction 🚧 | ||
|
||
```{toctree} | ||
:titlesonly: | ||
:maxdepth: 1 | ||
:hidden: | ||
cryptography/index | ||
``` |