CPSA ยท Web servers, architecture and protocols
HTTPS, SOAP and security-related headers
TLS use, SOAP basics, cookies flags, HSTS, CSP, X-Frame-Options and similar headers.
Key points
- HTTPS is HTTP over TLS.
- HSTS (Strict-Transport-Security): HTTPS only for max-age seconds; works only over HTTPS.
- Set-Cookie: Secure (HTTPS only), HttpOnly (hidden from JavaScript), SameSite (limits cross-site sending).
- Content-Security-Policy: script and resource sources; frame-ancestors (older X-Frame-Options) limits clickjacking.
- SOAP: XML Envelope, optional Header, mandatory Body, Fault for errors; usually HTTP POST.
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security
Practice questions
Which Set-Cookie attribute prevents JavaScript from reading a cookie through document.cookie?
- Secure
- HttpOnly
- SameSite
- Path
Show answer
Answer: B. HttpOnly
HttpOnly hides the cookie from scripts, limiting theft via XSS. Secure restricts transport to HTTPS, and SameSite limits cross-site sending.
Which statements about HSTS are correct?
- max-age is given in seconds
- Browsers ignore the header when it arrives over plain HTTP
- It is an attribute of Set-Cookie
- includeSubDomains limits the policy to the apex domain only
- It makes the server encrypt database columns
Show answer
Answer: A. max-age is given in seconds, B. Browsers ignore the header when it arrives over plain HTTP
max-age is in seconds and the header is ignored over plain HTTP so a man in the middle cannot set or clear it. It is not a cookie attribute, and includeSubDomains widens, not narrows, scope.
True or false: a SOAP message always needs a Header element.
Show answer
Answer: False
False. In SOAP 1.2 the Envelope holds an optional Header and a mandatory Body.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

More CPSA topics in this module
- Web server operation, virtual hosting and proxies
- IIS and Apache and their typical flaws
- Tiered web architectures
- HTTP methods and response codes
- HTML and XML
- Server-side and client-side web languages
- Application servers and frameworks
- Server extension interfaces
- Thin and thick web clients, applets and decompilation