#10 [ResultsDB] Basic auth
Closed 2 years ago by lrossett. Opened 2 years ago by lrossett.

This ticket is about enabling http basic auth for POST requests in a resultsdb service.

Create a httpd configmap with basic auth configured and mount it in /etc/httpd/conf.d.

The configmap should have a resultsdb.conf with the following content:

IfModule !auth_basic_module>
      LoadModule auth_basic_module '{{ resultsdb_mod_wsgi_dir }}/mod_auth_basic.so'
    </IfModule>
    <IfModule !authn_file_module>
      LoadModule authn_file_module '{{ resultsdb_mod_wsgi_dir }}/mod_authn_file.so'
    </IfModule>
    <IfModule !authz_user_module>
      LoadModule authz_user_module '{{ resultsdb_mod_wsgi_dir }}/mod_authz_user.so'
    </IfModule>

    <Location "/">
      AuthType Basic
      AuthName "Authentication Required"
      AuthBasicProvider file
      AuthUserFile "/etc/httpd/auth/.htpasswd"
      <LimitExcept GET>
        Require valid-user
      </LimitExcept>
    </Location>

Mount an existing secret provided by the user through the CR to /etc/httpd/auth/.htpasswd to be used by apache httpd when doing POST requests.


Metadata Update from @lrossett:
- Issue assigned to lrossett

2 years ago

Metadata Update from @lrossett:
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #12 Merged 2 years ago