Skip to content
academia.sh

Course Advanced

Server Security and Going to Production

By the end of this course

Start course

01

Application Security

Where untrusted data meets the application: enforcing validation and encoding at the boundary, the string-concatenation decision at the root of injection-class vulnerabilities, configuring cross-origin access correctly on the server, security headers and transport-layer hardening, storing and rotating secrets, managing dependency risk with a version policy, the audit log for traceability, and abuse defense against bots, brute force, and enumeration.

  1. 01 Input Validation and Encoding Enforcing the untrusted-data boundary: the false-accept and false-reject counts of the allowlist versus the blocklist over a set of twenty-two requests, the wasted-side-effect cost of stopping validation at the endpoint, the service, or the store, the number of values a single encoder breaks across three output contexts, and the field a single-line setting silently opens.
  2. 02 Injection-Class Vulnerabilities Measuring query, command, and template injection from a single root: how many unexpected results ten legitimate search inputs produce in a concatenated query, how many of six report labels break when passed as a single string, how many of five note texts change when written into a template body, and how many of twelve call sites use concatenation.
  3. 03 Cross-Origin Resource Sharing The server-side configuration of cross-origin sharing: how many of seven origins each of four settings lets the response be used for, how many origins a wildcard setting opens, how a wildcard setting on a credentialed request returns 200 on the server while being silently dropped on the client, the round-trip cost of a preflight request, and how many endpoints carry the policy.
  4. 04 Security Headers and TLS The server-side measure of transport-layer hardening: how many write sites six security headers occupy across ten endpoints, the eleven files touched by migrating to a single layer, the number of obligations a missing header and a written-but-ineffective value drop without producing an error, and the false accepts and false rejects a forwarded protocol header produces under three settings.
  5. 05 Secrets Management Three measures of a secret in production: how many requests verify with which version during the window where two keys are valid together while rotating, how long a leaked value stays valid when the cleanup step is skipped, and the false-accept and false-reject counts of a scan that looks for a value hardcoded in the source.
  6. 06 Dependency Risk A version policy is a configuration decision: five policies are run over the same dependency tree and the accumulated exposure days and broken upgrades are counted; the silent outcome of a loose version range is measured by how many packages diverge between two deployments of the same source version.
  7. 07 Audit Logging Four measures of the traceability requirement: which decision points get logged and, as a result, how many questions can be answered, what the hash chain catches — a change to the body — and what it cannot — cutting the tail — the personal data the log itself carries, and the effect of retention on volume.
  8. 08 Abuse Defense Two configuration decisions in abuse defense: which key the limit is applied to (client, account, resource) and whether the response gives away whether a record exists; the attempts lockout stops and the legitimate members it locks out are counted in the same run.

02

Server and Deployment Topology

Where the application stands in production and how it changes: TLS termination and header forwarding at the reverse proxy, the restart policy and resource limits of process managers, the cost difference between horizontal and vertical scaling, the stateless design that scaling requires as a precondition, the effect of session placement and stickiness, zero downtime in blue-green and canary releases, how backward-compatible migration steps relate to release order, and capacity estimation from load-test data.

  1. 01 Reverse Proxy Configuration What the reverse proxy leaves out for the application: the client address and scheme information lost after TLS termination, restored through header forwarding; the rate limit collapsing into a single bucket while forwarding is off, and the audit log showing a single address; the wrong record returning successfully when the path is resolved once too often at the proxy; and how the body-size limit sitting separately at two layers changes the effective value and the log.
  2. 02 Process Managers Two settings in the layer beneath the application: how immediate, backoff, and limited-attempt restart policies for a crashing process affect the dropped-request count; how many times the start loop turns under each policy when a process never starts; the difference between killing a process and letting it discard records and stay up when a memory limit is crossed; and how the wait time granted after a stop signal affects the number of drained requests.
  3. 03 Horizontal and Vertical Scaling The backend-side bill of two scaling axes: how many times the process baseline is paid when the same load is met by one large process versus four small ones, how ready time multiplies under a sequential release, the multiplier from each process opening its own connection pool, and how a pool setting left unchanged as process count grows pushes the store's total connections past its limit.
  4. 04 Stateless Application Design Where scaling's precondition breaks in the code: scanning and counting the node-pinned call sites for an in-memory session, a copy-specific local file, an in-process cache, and a per-process timer; running the same application with one copy and with two and measuring how many requests get the wrong result; and ranking the four leaks by how visible they are.
  5. 05 Session and Stickiness Three session placements are measured on the same setup: the cart that silently empties in process memory, the lost session of a member moved when a node is added, the shared store's per-request read, and the signed token's cookie size and its resistance to revocation.
  6. 06 Zero-Downtime Deployment Dropped requests during a release are counted under three layouts: direct replacement, blue-green, and canary. Dropped requests convert to an equivalent downtime in seconds, connection draining's effect on in-flight requests is measured, and rollback step counts are compared.
  7. 07 Deployment Order and Database Migration The same schema change runs in three separate orders, and each order's error count is measured: migration first, code first, and expand–contract. The window where two versions run against the same schema, the function of dual writing, and the irreversibility of dropping a column are all measured.
  8. 08 Capacity Planning The calculation that goes from measured load to process and node count: a single process's capacity measured against pool size, the process, connection, and node counts that follow from it, how the store's connection limit determines pool size working backward, and the difference low and high estimates produce — invisible at target load, visible under a spike.

Start typing to search.

↑↓ Esc navigate · open · close