Security / Topic 14 of 30

Application and API Security

Can a signed-in user read somebody else’s record?

Core exercise: 45–90 minutes · Self-paced · Synthetic data

Suggested prerequisites: Topic 02 · Topic 11

All topics · Read Markdown source

Understand the technology

Applications expose functions and data through interfaces. Authentication tells an application who is calling; authorization must also check the requested object and action. An API key should not be embedded in a public client or repository. Input validation, parameterized database queries, error handling and dependency management reduce different classes of risk and require separate verification.

By the end, you should be able to

  • Explain how the components below support the business need.
  • Complete the scoped exercise and compare expected with observed results.
  • Defend a decision using your own evidence and state its limitations.
HTTP and APIs
Methods, routes, status codes and payloads form the interface.
Object authorization
Check access for each requested resource.
Secrets
Keep credentials out of public clients and source history.
Input and dependencies
Validate boundaries and use maintained components.

See the connections

Conceptual sequence: Client request, Authentication, Object authorization, Application data, Response and logs
A conceptual dependency sequence, not a literal network path. Explain each transition and identify the evidence needed.
1. Client request

Locate Client request in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.

In your diagram, label the owner, input, output and a possible failure at this stage.

2. Authentication

Locate Authentication in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.

In your diagram, label the owner, input, output and a possible failure at this stage.

3. Object authorization

Locate Object authorization in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.

In your diagram, label the owner, input, output and a possible failure at this stage.

4. Application data

Locate Application data in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.

In your diagram, label the owner, input, output and a possible failure at this stage.

5. Response and logs

Locate Response and logs in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.

In your diagram, label the owner, input, output and a possible failure at this stage.

Practice: Can a signed-in user read somebody else’s record?

Choose your depth. Core: analyze the supplied synthetic material in a browser, text editor or spreadsheet; no paid cloud account is required. Technical extension: optional external tool, installation or account as stated below. Review tool requirements and current licensing first. For paper-only practice, walk through tool steps as a plan and label outcomes modeled; do not claim configuration or testing you did not perform. No production changes are authorized.

A mock Northstar API stores records for synthetic users u01 and u02. User u01 requests both records.

Supplied synthetic input

caller,resource_owner,action,expected
u01,u01,read,allow
u01,u02,read,deny
u01,u01,delete,deny

Download synthetic input · Download worksheet

Procedure

  1. Describe the expected role and object checks for each request.
  2. Write pseudocode that authenticates the caller and verifies ownership before returning data.
  3. Evaluate the three synthetic requests; include an unauthenticated request as a fourth case.
  4. Create a mock response log using synthetic identifiers and no tokens.
  5. Review a fictional configuration containing PLACEHOLDER_ONLY instead of a real secret; explain where actual secrets would be stored.
  6. Document limits: paper or mock tests do not establish live application security.
Compare your reasoning and expected results

Only the owner read is allowed. A valid login must not grant cross-user access or deletion privileges. No live target is tested.

Optional technical extension

Use a deliberately vulnerable application only in an isolated authorized training lab. Prefer official guided exercises; never test unrelated public APIs.

External-tool procedures are reviewed instructions, not claims of execution in every listed environment. Record your actual tool version, observations and deviations. See the verification record.

Best practices to verify

  • Enforce authorization server-side on every object and action.
  • Use parameterized queries and explicit input constraints.
  • Avoid logging sensitive payloads and credentials.
  • Test denied cases and dependency updates in an isolated environment.

For each practice, specify an owner, a verification test and the evidence that would show failure.

Vendors, projects and tools

Representative examples, not a market ranking or endorsement
Vendor / projectWhat to investigateOfficial reference
MicrosoftApplication identity and authorization learningDocumentation / product site
PortSwiggerWeb Security Academy trainingDocumentation / product site
OWASPCommunity application/API security guidance, not a vendorDocumentation / product site

Selection criteria: fit to the requirement, support lifecycle, integration, security controls, learning access, licensing and total cost. Examples are not exhaustive. Commercial products may require paid licenses; community editions and free learning access do not imply free production use. No purchase is required for the core exercise.

Check your reasoning

A valid user token is sufficient to read any record.

Read the explanation

Each requested object needs authorization. The HTTP method does not establish ownership.

Turn practice into career evidence

Role families to investigate: Application support analyst, Junior developer, Application security trainee. These are search suggestions, not verified vacancies or a promise of job readiness. Requirements vary by employer.

  1. Search for these titles plus the supporting technologies in this lesson. Compare three current job descriptions and record repeated requirements.
  2. Map requirements to evidence you personally produced. Mark gaps honestly and plan one additional lab or supervised experience.
  3. Publish your original diagram, sanitized inputs, decisions and test record in your own repository after checking reuse rights. Link the relevant project in an application.
  4. Rehearse the interview question below, explaining what you did, what failed and how you verified the result.
What is the difference between authentication and object-level authorization?

Resume pattern: “Independent lab project: investigated application and api security, documented [your specific action], verified [your actual result], and identified [a limitation].” Replace placeholders truthfully; do not imply employment or production implementation.

Start here: build your GitHub portfolio

Your learning record

This form sends nothing to a server. Browser storage can be cleared, blocked or shared with other users of this browser. Download a copy you want to keep. Do not enter sensitive information.

Continue with primary sources

Reference review date: December 1, 2026. Follow current vendor instructions and verify licensing before optional tool use. Product links establish context, not independent performance rankings.

Preserved earlier lessons