Menu

No Swagger-UI not available

Help
aloeee
2022-07-21
2022-08-01
  • aloeee

    aloeee - 2022-07-21

    Hi!

    I just deployed the latest EJBCA CE with docker, but I don't see Swagger-UI nor Docs? What I'm doing wrong? I set ejbca.productionmode to false

    grep ejbca.productionmode /opt/primekey/ejbca/conf/ejbca.properties
    ejbca.productionmode=false
    

    and then launch ejbca container.

    docker run -it --name ejbca --rm -p 80:8080 -p 443:8443 -h my-host -e TLS_SETUP_ENABLED="simple" -v /opt/primekey/ejbca/conf/web.properties:/etc/ejbca/conf/web.properties -v /opt/primekey/ejbca/conf/ejbca.properties:/etc/ejbca/conf/ejbca.properties keyfactor/ejbca-ce:latest
    

    I enabled rest-api functionality after EJBCA is up & running

    curl -sk https://localhost:443/ejbca/ejbca-rest-api/v1/certificate/status | jq .
    {
      "status": "OK",
      "version": "1.0",
      "revision": "EJBCA 7.9.0.2 Community (e9a5aa4700aaffc5468fbbd06780a6c100b18cb8)"
    }
    

    but there is no swagger-ui as described in the EJBCA documentation https://doc.primekey.com/ejbca/ejbca-operations/ejbca-ca-concept-guide/protocols/ejbca-rest-interface#EJBCARESTInterface-SwaggerUIswagger

    curl -sk https://localhost:443/ejbca/swagger-ui
    <html><head><title>Error</title></head><body>Not Found</body></html>
    

    Is the Swagger-UI only accessible for EJBCA Enterprise version?

    Thanks

     
  • aloeee

    aloeee - 2022-07-28

    Any suggestions?

     
  • Tomas Gustavsson

    The setting ejbca.productionmode affect build-time, so without the setting enabled during (java) build the swagger code (a separate war deployment in the ejbca.ear) is not included at all. So it's not possible to enable easily in the container without overriding the ear deployment file.

     

Log in to post a comment.