Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
A Common Lisp library to reduce the risk of accidentally revealing secret values such as passwords.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
Secret values is a Common Lisp library designed to reduce the risk of accidentally revealing secret values such as passwords. Source code at https://github.com/rotatef/secret-values Applications will often have to deal with values that should be kept secret, e.g. a password for accessing the applications database. There will allways be a risk that such a secret value is accidentally revealed e.g. in a backtrace or log file. Fixing this can be difficult because the code that generates the backtrace or log is often not part of the application. Turning off logging or backtrace is seldom an option. Making sure that logs and backtrace are kept secure can also be difficult. This library provides a simple wrapper type that can be used to conceal secret data. This wrapper tries to keep it's value secret by overriding print-object and some other tricks. In order to get the full benefits, the value should be concealed as early as possible and revealed as late as possible. For example, a database library should accept the password as a concealed value and only reveal it just before it's used to authenticate with the database. This will greatly reduce the risk of the password ending up in a log file or backtrace. All symbols are exported from the package SECRET-VALUES. The function CONCEAL-VALUE wraps a value into an object of type SECRET-VALUE. An optional name can be provided. The name is intended for debugging only and is included when the object is printed. To get the value back, call REVEAL-VALUE. The function ENSURE-VALUE-REVEALED behaves like REAVEAL-VALUE when called with an argument of type SECRET-VALUE, otherwise it just returns it's argument verbatim. This makes it easy to write code that accepts both secret and plaintext values.