Auth
A service for all your authn and authz needs.
Password
The service allows you to generate a secure password. The system uses:
We take recommendations from NIST Password Guidelines.
Key
The service allows you to generate a secure RSA public and private keys. We take recommendations from A Guide to RSA Encryption in Go.
The service also requires to have a public and a private key to be configured as such:
server:
v1:
key:
public: |
-----BEGIN RSA PUBLIC KEY-----
...
-----END RSA PUBLIC KEY-----
private: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
These keys should be stored and retrieved from an application configuration system.
Access Token
The service allows access tokens to be created that will be used to generate bearer tokens to be used to generate more bearer tokens like JWT. This is configured as follows:
server:
v1:
admins:
- id: su-1234
hash: bcrypt-password
The password and hash is generated by the password service. The user then sends id:password
as basic auth. The password should be stored and retrieved from an application configuration system.
The hash is safe to just leave as is, not need to securely store it.
Development
If you would like to contribute, here is how you can get started.
Structure
The project follows the structure in golang-standards/project-layout.
Dependencies
Please make sure that you have the following installed:
Style
This project favours the Uber Go Style Guide
Setup
The get yourself setup, please run the following:
make setup
Binaries
To make sure everything compiles for the app, please run the following:
make build-test
Features
To run all the features, please run the following:
make features
Changes
To see what has changed, please have a look at CHANGELOG.md