Radicale
Radicale copied to clipboard
Add 'env' auth module
I wrote a small authentication module, which takes login and password from environment variables.
Use-case: This makes it really easy to setup a single-user-Radicale-instance in a dockerized environment.
Config:
[server]
# Bind all addresses
hosts = 0.0.0.0:5232
[auth]
type = env
A docker-compose.yml could look like this:
services:
radicale:
build: .
ports:
- 5232:5232
volumes:
- ./radicale:/data
- ./radicale_config:/etc/radicale/
environment:
RADICALE_LOGIN: admin
RADICALE_PASSWORD: test123
Pull Request Test Coverage Report for Build 903
- 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.05%) to 82.245%
Totals | |
---|---|
Change from base Build 895: | 0.05% |
Covered Lines: | 2965 |
Relevant Lines: | 3521 |
💛 - Coveralls
this would be indeed great for deployments with containers. i'm wondering whether multiple user should be definable by providing comma-separated values.
a RADICALE_PASSWORD_<HASH_ALGORITHM>
as alternative to …_PASSWORD
seems reasonable as well.
i could work on it, but there seems to be no interest.