[BUG] API on Docker container not working properly #614
Replies: 4 comments
-
Also, for |
Beta Was this translation helpful? Give feedback.
-
For future reference for those who needs it, I managed to successfully use the API with the docker container and a Nginx reverse proxy. The directive that made all the difference was server {
server_name server.example.com;
ssl_verify_client optional_no_ca;
location / {
proxy_pass http://<EJBCA_IP>:8082;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header SSL_CLIENT_CERT $ssl_client_cert;
}
} This works for API authentication but for the web ui, the client can still refuse to send the certificate and access the UI. |
Beta Was this translation helpful? Give feedback.
-
We have some new container documentation, including Helm charts to deploy EJBCA to kubenteres, with optional ingress. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Using the docker container, API is working correctly when using
TLS_SETUP_ENABLE=true
and accessing it on bare IP address or localhost. However, I cannot make it work behind an reverse proxy. There's no mention of API in the docker documentation.From what I understand, we should use the
PROXY_HTTP_BIND
environment variable and put the certificate in the client, then the container should read the certificate from theSSL_CLIENT_CERT
header. However, that doesn't seems to work.To reproduce
https://<URL>/ejbca/ejbca-rest-api/v2/certificate/count?isActive=
), using the certificate.Expected behavior
Screenshot of a successfull request made with postman:
Product Deployement
Desktop
Beta Was this translation helpful? Give feedback.
All reactions