I am running VyOS 1.3-rolling-202310091117 and the file /usr/share/vyos/templates/ocserv/ocserv_config.tmpl does not contain the important security headers that are a part of the default config file doc/sample.config · master · OpenConnect VPN projects / ocserv · GitLab
The result of the missing headers can be seen when running an online security scan of ocserv - e.g. using https://securityheaders.com
Missing entries can be appended to the VyOS ocserv template file:
HTTP headers
included-http-headers = Strict-Transport-Security: max-age=31536000 ; includeSubDomains
included-http-headers = X-Frame-Options: deny
included-http-headers = X-Content-Type-Options: nosniff
included-http-headers = Content-Security-Policy: default-src ´none´
included-http-headers = X-Permitted-Cross-Domain-Policies: none
included-http-headers = Referrer-Policy: no-referrer
included-http-headers = Clear-Site-Data: “cache”,“cookies”,“storage”
included-http-headers = Cross-Origin-Embedder-Policy: require-corp
included-http-headers = Cross-Origin-Opener-Policy: same-origin
included-http-headers = Cross-Origin-Resource-Policy: same-origin
included-http-headers = X-XSS-Protection: 0
included-http-headers = Pragma: no-cache
included-http-headers = Cache-control: no-store, no-cache