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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | allow-multiple-env-vars-3106910-1.patch | 2.62 KB | spiderman |
Comments
Comment #2
spidermanAttached 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.
Comment #4
spidermanHaving 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.