Working on this module recently, I noticed that in some configurations (namely, Lando, but probably any Docker-based localdev), Apache sets the environment variable as `REDIRECT_SSL_CLIENT_CERT` instead of the usual `SSL_CLIENT_CERT`. I noticed other applications that do this kind of client cert authentication check for an array of environment variables passed by the webserver, rather than just a single variable.

We should allow administrators to provide a list of environment variables, and perhaps default it to the known good options from both Apache and Nginx, as well as the REDIRECT variant. This covers the use-case in #2928715: Automatically detect certificate variable based on Web server as well.

Comments

spiderman created an issue. See original summary.

spiderman’s picture

Status: Active » Needs review
StatusFileSize
new2.62 KB

Attached is a patch that converts the server_variable config setting to a textarea to allow for multiple variable names to be configured. Then it adds a simple routine to look through this list of environment variables to find one that has a value in it.

  • spiderman committed a4eee80 on 8.x-1.x
    Issue #3106910 by spiderman: Allow admin to provide multiple (alternate...
spiderman’s picture

Status: Needs review » Fixed

Having tested this a bit and found it works with no real update process, I've committed it on the 8.x-1.x dev branch in preparation for cutting a new release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.