add secret-values utility, to hide passwords

fixes https://github.com/ciel-lang/CIEL/issues/53
This commit is contained in:
vindarel 2024-08-30 11:15:24 +02:00
parent b947ffcf3f
commit f619f0f77f
3 changed files with 27 additions and 0 deletions

View file

@ -101,6 +101,9 @@
;; string manipulation
:str
;; security
:secret-values
;;;
;;; Language extensions.
;;;

View file

@ -58,6 +58,7 @@ simple string literal definition that doesn't require escaping characters.
- shasht: JSON reading and writing for the Kzinti.
- shlex: Lexical analyzer for simple shell-like syntax.
- spinneret: Common Lisp HTML5 generator.
- secret-values: reduce the risk of accidentally revealing secret values such as passwords.
- str: Modern, consistent and terse Common Lisp string manipulation library.
- sxql: A SQL generator
- trivia: NON-optimized pattern matcher compatible with OPTIMA, with extensible optimizer interface and clean codebase

View file

@ -782,6 +782,29 @@ Use `ppcre`.
See <https://common-lisp-libraries.readthedocs.io/cl-ppcre> and <https://lispcookbook.github.io/cl-cookbook/regexp.html>
## Security
We ship [secret-values](https://github.com/rotatef/secret-values) that
helps in reducing the risk of accidentally revealing secret values,
such as passwords.
When you read a password, you can hide it behind a `secret-values` object:
```lisp
(secret-values:conceal-value "secret")
;; => #<SECRET-VALUES:SECRET-VALUE {100F2EC9E3}>
```
To reveal it, at the last moment, use:
```lisp
(secret-value:reveal-value *)
;; => "secret"
```
See also what `ensure-value-revealed` does on their documentation.
## Threads, monitoring, scheduling
We ship: