Web Architecture Flashcards

(24 cards)

1
Q

What is architecture

A

High-level design of components and their interaction. Draw as building blocks (paper/whiteboard)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is implementation?

A

Made concrete with languages, tools and frameworks. Consider practical low-level details (security, scalability etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Vulnerabilities due to poor architecture

A
  • Lack of encryption
  • Vulnerable to DoS
  • Race condition
  • Unintended access
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Vulnerabilities due to poor implementation

A
  • Buffer overflow
  • Unvalidated input
  • Code injection
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Difference between vulnerability fixes for architecture and implementation

A

Architecture - mostly unfixable, requires rebuild
Implementation - mostly fixable depending on language + off-shelf components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Web Application Architecture

A
  • User communicates with web server via HTTP
  • Web server serves HTML and runs server-side scripting
  • Database runs SQL
  • Web server communicates with other services via HTTP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

HTML

A

Defines structure and display. Actual page content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

HTTP

A

Protocol for exchanging info (independent of page design)
Web server requests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

TCP/IP

A

Handles connectivity (ports)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does PHP do?

A

Generates dynamic pages. Input is processed and output as pure HTML. It runs on the server and the browser only sees HTML.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are HTTP Headers?

A

Key-value pairs sent with HTTP requests and responses, providing metadata about the message. Enable structured, efficient, and secure web communication between server and client.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Content-Security-Policy (CSP)

A

allows you to restrict which resources (such as JavaScript, CSS, Images etc.) can be loaded, prevents xss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

X-Frame-Options

A

Defines whether the browser should allow iframes, mitigates clickjacking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Referrer-Policy

A

Controls privacy, controls the amount of referrer information sent w/in subsequent request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Strict-Transport-Security (HSTS)

A

Defines whether browser requests HTTPS only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Cross-Origin Resource Sharing (CORS)

A

From the server, a website loads different elements from different origins. This defines which domains the browser can accept resources from

17
Q

Why are cookies needed?

A

HTTP is stateless, each client-server request-response cycle is independent, server does not retain any information about past interactions. Cookies track sessions

18
Q

Cookies

A

Files that store information about your session. Created by Netscape as way to store items in shopping carts.

19
Q

Session cookies

A

Temporary text files stored on device by websites during visit, enabling site to remember information like login status or items in shopping cart

20
Q

Persistent cookies

A

Long-term tracking. Last forever until deleted or the expiration date. Store information like user preferences.

21
Q

First-Party Cookies

A

set/read by the visited site

22
Q

Third-party cookies

A

Cookies set by a domain different from the one you are directly visiting, e.g., advertisers, analytics services. Enable tracking across sites. (Being phased out)

23
Q

Cookie Risks

A

Session hijacking. Cookie is intercepted and stolen, leading to impersonation.

24
Q

Cookie Attributes

A

Secure, HttpOnly, SameSite, expiry, domain