Radicale icon indicating copy to clipboard operation
Radicale copied to clipboard

Add 'env' auth module

Open matthinc opened this issue 5 years ago • 2 comments

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

matthinc avatar Oct 11 '19 22:10 matthinc

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 Coverage Status
Change from base Build 895: 0.05%
Covered Lines: 2965
Relevant Lines: 3521

💛 - Coveralls

coveralls avatar Oct 11 '19 22:10 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.

funkyfuture avatar Jan 02 '21 16:01 funkyfuture