Модуль 8 · Урок 31

Authentication, authorization та abuse controls

Authentication відповідає «хто/що звертається», authorization — «чи дозволена саме ця operation над цим object і property». QA тестує matrix actors×objects×operations, не лише missing token.

IdentityObject / propertyFunction / scopeAbuse controls

Security scheme не є security proof

OpenAPI може описати API key, HTTP auth, mutual TLS, OAuth2 або OpenID Connect requirements. Tester перевіряє absent, malformed, expired, revoked, wrong audience/scope та rotation behavior у дозволеному sandbox. Secrets живуть у local secret store/CI vault, не в collection, screenshots, console logs або portfolio.

Не brute-force і не exploit

Security cases виконуються лише на власному/навчальному або письмово дозволеному API з узгодженими rate/stop rules. Знахідка access-control не дає дозволу читати більше data.

Authorization matrix

ControlTest
Object levelActor A не читає/змінює object B через identifier substitution.
Property levelRequest не mass-assigns protected field; response не expose sensitive field.
Function levelRegular role не виконує admin operation через direct endpoint/method.
Business flowQuota, anti-automation, ownership і sequence rules стримують abuse.

Заперечений request має не лише правильний status/problem, а й нуль state changes, events, reservations або data disclosure.

Resource consumption та inventory

Перевіряйте documented pagination caps, upload/body limits, timeouts, batch size, rate policy/Retry-After і expensive filter combinations у safe bounds. Список versions/hosts/operations має мати owner, lifecycle і access policy; forgotten beta/admin endpoint — ризик навіть якщо основний API добре захищений.

Input limitsPage size, nesting, file size, field length, concurrency.
Output limitsPagination, field selection, streaming/batch bounds.
Cost limitsRate/quota, timeout, retry and dependency budget.

Third-party API boundary

Upstream response не є trusted input: validate schema/content type, restrict redirects/hosts, set timeouts/size limits, map failures safely й не forward upstream secrets/details. Contract tests мають synthetic stub/recorded sanitized fixture і failure variants.

Практика

Заповніть `authorization-matrix.csv`: actor, credential state, object owner, operation, property set, expected status/problem, zero-effect oracle й evidence. Додайте one safe quota/limit case.

Офіційні джерела

Практична перевірка · урок 31 з 32

Закріпіть матеріал уроку

Три сценарні питання. Для зарахування уроку потрібно дати щонайменше дві правильні відповіді.

1. Чим authentication відрізняється від authorization?
2. Що тестує BOLA case?
3. Що тестує property-level authorization?