cloudsidedev / appside

Multitenant environment automation.
http://cloudside.ch
GNU Affero General Public License v3.0
38 stars 7 forks source link

Implement htpasswd (basic auth) support #42

Closed ivomarino closed 7 years ago

ivomarino commented 7 years ago

Devs want to be able to protect a given vhost with Apache2 Basic Authentication. This will implemented using a new var called htpasswd_password, if set to false no authentication will occur, if set to anything else this string will be the password, example:

Disable basic authentication:

  foo:
    state: enabled
    ...
    htaccess:
    htpasswd_password: false
    ...

Enable basic authentication:

  foo:
    state: enabled
    ...
    htaccess:
    htpasswd_password: my-secret-password
    ...

in this case when opening http://foo basic auth requires username foo and password my-secret-password. The username will always default to the vhost item (as in this example foo).