Htpasswd authorization
Authorizes a user request via credentials stored in htpasswd format.
Properties
type
Authorization Type = "htpasswd"
Has to be set to htpasswd
to enable the htpasswd authorization.
file
File Path = "<os specific>"
A file where each line contains an entry in htpasswd format.
The default value varies depending on the platform Bifröst runs on:
- Linux:
/etc/engity/bifroest/htpasswd
- Window:
C:\ProgramData\Engity\Bifroest\htpasswd
Examples
/etc/engity/bifroest/htpasswd | |
---|---|
1 2 |
|
entries
string
This is similar to file
, but does contain the htpasswd entries directly inside the configuration.
Examples
1 2 3 4 5 |
|
Format
htpasswd is a format created for Apache HTTP Server to enable an easy way to configure Basic Authentication for web servers. Nowadays, it is used in more web server projects than just the Apache HTTP Server and also in other project types like Bifröst. The reason: There is a huge toolset available to create those files.
Tools
- Apache HTTP Server command line tool which can be easily installed on many systems such as:
- Ubuntu:
1
sudo apt-get install apache2-utils -y
- Fedora/RedHat:
1
sudo apt install apache2-utils -y
- Ubuntu:
- Helm for Kubernetes function
- Ansible module
- Terraform/OpenTofu plugin
- ...
Context
This authorization will produce a context of type Authorization Htpasswd.
Examples
- Using dedicated file from default location:
1
type: htpasswd
- Using dedicated file from custom location:
1 2
type: htpasswd file: /etc/foo/bar
- Using embedded entries:
1 2 3 4
type: htpasswd entries: | foo:$apr1$zapgfl56$eXIHR/wBYFypkUEXWdCZN/ bar:$apr1$wqkvo7c2$dqi5g.hK67jLMY4SJzrjq.
Compatibility
linux |
windows |
---|---|
/ | / |