Basic Auth
Simple file-based Basic Auth provider.
system: security provider: basic introduced in v0.1
This is a simple provider which looks for default Basic Auth header and validates against users from a local file of secret storage.
Local file
File should be located in configs folder and named _users
.
To generate a password user_pwd
for a new user user_name
run:
htpasswd -B -n user_name
And add it as a new line into _users
file:
user_name:$2y$05$dYF192wo1LbwKF7NTAQpEOYqOzmEr0SLxsctQ6LFkRaOMdSjMJY3G
Provider checks Authorization: Basic
header. You can use it with curl
:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic $(echo -n user_name:user_pwd | base64)" http://localhost:8000/api/v1/device
Secrets storage
Just place username:password
into your secrets storage.
Configuration options
This provider doesn’t have any configuration options and is loaded by default if no other providers are specified.