listen pki
bind *:8884 ssl no-sslv3 crt /HAPROXY.pem.ecdsa verify required ca-file /CA_CHAIN.pem
mode http
http-request add-header Content-Type "application/pkcs10"
http-request add-header Content-Transfer-Encoding "base64"
http-request add-header Authorization "Basic somebase64encodedstring"
default_backend pkis_1
backend pkis_1
mode http
http-request add-header Content-Type "application/pkcs10"
http-request add-header Content-Transfer-Encoding "base64"
http-request add-header Authorization "Basic somebase64encodedstring"
server pkis my.domain.com:443 ssl verify none
Using the above config we are able to call the backend successfully from curl on a certain endpoint, using the same certificates, but we are blocked on another endpoint of the same server which requires basic auth.
The curl call is:
curl --cacert '$INITIAL_CACERT' --key '$INITIAL_DEVICE_KEY' --cert '$INITIAL_DEVICE_CERT' --user '$USER':'$PWD' --data @'$1'/'$KEY_NAME'-key.b64 -o '$1'/'$KEY_NAME'-cert-p7.b64 -H "Content-Type: application/pkcs10" -H "Content-Transfer-Encoding: base64" https://'$PKI_SERVER':'$PORT'/.well-known/est/'$2'/simpleenroll
Is there some way to forward everything from this curl command to the backend?
The weird thing is , when we remove all ssl auth and switch to tcp mode as transparent proxy, the basic auth works!