Background
The deployed stack currently serves everything on plain HTTP via nginx on port 80. Until recently, docker-compose.yml configured the frontend to open a TLS WebSocket:
webprotege.websocketUrl: wss://${SERVER_HOST}/wsapps
but no TLS listener exists (nginx is bound only to 80/tcp, no certificate is configured, and the image doesn't listen on 443). The browser's wss:// handshake failed silently, so no events reached the frontend — stale hierarchy trees after create-subclass / create-property, etc.
As a short-term fix, webprotege.websocketUrl has been changed to ws://${SERVER_HOST}/wsapps, matching the rest of the stack which is all http://. Events flow again.
Why follow-up matters
Plain ws:// / http:// is fine for local Docker Compose development, but not for any shared or production-style deployment:
- Keycloak is already configured with
KC_PROXY: edge, meaning it expects TLS to be terminated at the edge proxy (nginx). Serving it behind http:// is a misalignment waiting to bite.
- Any real browser context (non-
localhost) will treat ws:// + sensitive tokens as insecure; some environments will actively block it.
- Mixed-content warnings / cookie
Secure flag behavior differ between HTTP and HTTPS, and we don't want to discover those differences in production.
Scope
webprotege-deploy/nginx/nginx.conf: add a server { listen 443 ssl; ... } block mirroring the current :80 server; reference ssl_certificate + ssl_certificate_key from a mountable path; optionally add a 301 redirect from :80 to :443.
webprotege-deploy/docker-compose.yml:
nginx service — expose 443:443, mount cert files read-only into /etc/nginx/certs/.
- Flip the
http:// URLs in the webprotege-gwt-ui-server, webprotege-gwt-api-gateway, webprotege-authorization-service, and webprotege-user-management-service envs to https:// where they reference ${SERVER_HOST} (Keycloak issuer URIs, logout URLs, file upload URL, allowed origin).
- Flip
webprotege.websocketUrl back to wss://${SERVER_HOST}/wsapps.
README.md: mkcert-based instructions for generating a locally-trusted cert for ${SERVER_HOST} so developers don't see browser warnings.
Acceptance criteria
docker compose up brings the stack up on https://${SERVER_HOST} with a valid (local-dev) cert.
- Browser DevTools → Network → WS shows
101 Switching Protocols on wss://${SERVER_HOST}/wsapps.
- Creating a subclass updates the class-hierarchy tree immediately (no manual refresh).
- Creating a new object/data/annotation property updates the property-hierarchy tree immediately.
- No mixed-content warnings in the browser console.
- Keycloak login + logout round-trip works end-to-end.
Background
The deployed stack currently serves everything on plain HTTP via nginx on port 80. Until recently,
docker-compose.ymlconfigured the frontend to open a TLS WebSocket:but no TLS listener exists (nginx is bound only to
80/tcp, no certificate is configured, and the image doesn't listen on 443). The browser'swss://handshake failed silently, so no events reached the frontend — stale hierarchy trees after create-subclass / create-property, etc.As a short-term fix,
webprotege.websocketUrlhas been changed tows://${SERVER_HOST}/wsapps, matching the rest of the stack which is allhttp://. Events flow again.Why follow-up matters
Plain
ws:///http://is fine for local Docker Compose development, but not for any shared or production-style deployment:KC_PROXY: edge, meaning it expects TLS to be terminated at the edge proxy (nginx). Serving it behindhttp://is a misalignment waiting to bite.localhost) will treatws://+ sensitive tokens as insecure; some environments will actively block it.Secureflag behavior differ between HTTP and HTTPS, and we don't want to discover those differences in production.Scope
webprotege-deploy/nginx/nginx.conf: add aserver { listen 443 ssl; ... }block mirroring the current :80 server; referencessl_certificate+ssl_certificate_keyfrom a mountable path; optionally add a 301 redirect from:80to:443.webprotege-deploy/docker-compose.yml:nginxservice — expose443:443, mount cert files read-only into/etc/nginx/certs/.http://URLs in thewebprotege-gwt-ui-server,webprotege-gwt-api-gateway,webprotege-authorization-service, andwebprotege-user-management-serviceenvs tohttps://where they reference${SERVER_HOST}(Keycloak issuer URIs, logout URLs, file upload URL, allowed origin).webprotege.websocketUrlback towss://${SERVER_HOST}/wsapps.README.md:mkcert-based instructions for generating a locally-trusted cert for${SERVER_HOST}so developers don't see browser warnings.Acceptance criteria
docker compose upbrings the stack up onhttps://${SERVER_HOST}with a valid (local-dev) cert.101 Switching Protocolsonwss://${SERVER_HOST}/wsapps.