COMP9321 · 06 API security · Lists & facts

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

10 Terms

1
New cards
The three security goals (CIA) + two extras.
Confidentiality, integrity, availability. Plus accountability and authentication.
2
New cards
Security design principles (list as many as you can).
Least privilege · fail-safe defaults · economy of mechanism · complete mediation · open design · separation of privilege · least common mechanism · psychological acceptability · defence in depth.
3
New cards
Basic vs Digest vs Token vs API key vs OAuth: one strength + one weakness each.
Basic: simple / password every time, Base64 not encryption. Digest: no clear password / weak, rare. Token (JWT): stateless, expires / stolen token valid until expiry. API key: simple app ID / long-lived, identifies app not user. OAuth: scoped, revocable, delegated / complex.
4
New cards
The OAuth 2.0 flow in six steps.
1 app asks user for access → 2 user logs in at the authorisation server and approves scopes → 3 app receives the authorisation grant (code) → 4 app exchanges it for an access token → 5 app calls the resource server with the token → 6 resource server checks token + scope, returns data.
5
New cards
Why OAuth instead of giving the app your password?
The password only goes to the authorisation server; the app gets a token limited to approved scopes that can be revoked.
6
New cards
JWT: the three parts and what each holds.
Header (algorithm) . payload (claims: user ID, role, expiry; encoded, not secret) . signature (proves issued by the server and not tampered with).
7
New cards
Protections to list in an answer (and why).
HTTPS/TLS (confidentiality, integrity) · input validation + parameterised queries (injection) · restrict HTTP methods (405) · rate limiting (429, abuse/DoS) · no secrets in URLs (logs, history) · audit logs (trace incidents) · safe error messages (no stack traces).
8
New cards
Why no API keys or tokens in URLs?
URLs end up in server logs, browser history and proxies. Send them in headers or the body.
9
New cards
Template: two security considerations for the ride API (2 marks).
1 Authentication + authorisation: token (JWT/OAuth) over HTTPS, check the caller owns the ride (403 otherwise; prevents broken access control). 2 Input validation + rate limiting: validate coordinates/status (400, stops injection) and limit requests per client (429, abuse/DoS).
10
New cards
Why do APIs matter so much for security?
They expose your data to programs, so a misconfigured or unprotected API is behind many data breaches.