# What 90 minutes of API security training leaves FDEs to do

> APIsec University's free course shows where APIs break, but engineers still have to write the two-account test that catches authorization flaws.

Original: https://fdetimes.net/en/books-courses/api-security-fundamentals-course-for-fdes/

In a [job posting for a Forward Deployed Engineer](https://www.arcade.dev/careers/forward-deployed-engineer-acaf5d8f), Arcade.dev calls agent authorization one of the hardest problems the company solves. The [API Security Fundamentals](https://au.apisec.ai/courses/api-security-fundamentals) course from APIsec University runs 90 minutes, according to its course page, which makes no mention of labs.

Do not expect the course to teach you how to solve Arcade's problem. Its value lies in a reflex you need before connecting any system to client data: looking at each endpoint and asking who could abuse it.

If your job includes writing code that calls a client's API, you can use that reflex immediately. A missing permission check should be found by the person who wrote the code, before an outsider finds it.

## Tie every risk to an endpoint

The instructor is Dan Barahona, founder of APIsec University. The course covers the main threats to APIs and how to prevent breaches. One section goes through the 2023 OWASP API Security Top 10 with examples, consequences and defenses. Another is devoted to the three pillars of Governance, Testing and Monitoring.

The first idea to keep: rather than memorizing the names of the risks, find where each could occur. After each one, pause the video, pick an endpoint in your project, and write down the HTTP request that could slip through and the check that should block it. If you cannot, watch that part again.

The table below links each part of the course to work you should do at the client:

| Part of the course | How to study it | Next step at the client |
|---|---|---|
| OWASP Top 10 | Most closely, with OWASP's documentation open alongside | Write a test for the top risk |
| Governance | Apply it to your current project | Ask who approves new endpoints and where access rules are recorded |
| Testing | Closely, then practice on your own | Put authorization tests into CI/CD |
| Monitoring | Apply it to your current project | Ask who gets the alert when one account is denied repeatedly |

## Six green tests still miss six unauthorized calls

At the top of the 2023 list, as API1, is Broken Object Level Authorization, or BOLA. [OWASP explains](https://api-security.owasp.org/editions/2023/en/0x11-t10) that APIs tend to expose endpoints that take object IDs, giving attackers many places to try to exceed their permissions. If you have time to study only one risk in depth, choose this one.

The hands-on part is up to you. Start from [OWASP's testing guide](https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References), which says it is best to have at least two users, each owning different objects.

Take a hypothetical orders API. An and Binh each have their own orders, and the API allows three actions: view, edit and cancel. A typical test suite has each person perform all three actions on their own order: 2 × 3 = 6 calls, all green.

But the server only checks that the token is valid, then looks up the order by ID. An changes the ID in the path to Binh's order and can still view, edit and cancel it; Binh can do the same in reverse. Six cross-access calls get through, and the original test suite catches 0 of 6.

**Key point:** An API that returns the right data may still be returning it to the wrong person.

To fix this, the server must check the caller's permission on that specific order for all three actions. The test suite needs all 12 calls: six by the owner that succeed, and six cross-access calls that are denied and leave the data unchanged. Each test creates a new order, because with a shared one, a cancellation that slips through would corrupt the state of the tests that follow.

```python
import pytest

ACTIONS = [
    ("GET", "", None, 200),
    ("PATCH", "", {"note": "call before delivery"}, 200),
    ("POST", "/cancel", None, 200),
]
PAIRS = [("an", "an"), ("binh", "binh"),
         ("an", "binh"), ("binh", "an")]

@pytest.mark.parametrize("method,path,body,ok", ACTIONS)
@pytest.mark.parametrize("caller,owner", PAIRS)
def test_order_access(clients, new_order, caller, owner,
                      method, path, body, ok):
    order_id = new_order(owner)  # new order for each test
    url = f"/orders/{order_id}"
    before = clients[owner].get(url).json()

    res = clients[caller].request(method, url + path, json=body)

    if caller == owner:
        assert res.status_code == ok
    else:
        assert res.status_code == 404
        assert clients[owner].get(url).json() == before
```

Four pairs times three actions gives exactly 12 tests; against the flawed server, six will go red. `clients` and `new_order` are fixtures you write yourself: one HTTP client per account and a function that creates an order. The example uses 404 for cross-access calls so as not to reveal whether the order exists. If the client's API uses 403 by convention, change the number and keep it consistent.

At the client, start by requesting two test accounts with the same role on staging. Then ask who is allowed cross-access, such as support staff, because legitimate exceptions need their own tests too. [OWASP recommends](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html) using tests to confirm that permissions defined at design time are enforced correctly.

The second idea to keep is that authorization is a business rule. To know which tests should go red, ask someone who understands the business before you open an editor.

## After handover, who guards the door?

A test that runs only once is out of date as soon as a new endpoint appears. [Course notes by syselement](https://github.com/syselement/blog/blob/main/cyber-everything/web/api/api-fundamentals.md) offer advice on this point: put security testing in the CI/CD pipeline to assess every release.

On BOLA, [OWASP is firmer still](https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/): do not deploy changes that make authorization tests fail.

The 12-call matrix above is small enough to serve as the first gate. But the pipeline holds only if someone adds tests for new endpoints and someone responds when a test goes red.

That leads to the third idea: every pillar needs a named owner. If the client has no one responsible for a pillar, add choosing that person to the list of tasks that must be done before go-live.

## When the caller is an agent

The course best suits backend engineers about to take on an integration project and FDEs who have never read the OWASP API Top 10. If you already write authorization tests regularly, go straight to the three pillars. Afterward, read OWASP's BOLA page, then the testing guide, and finally its [guide to automating authorization tests](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Testing_Automation_Cheat_Sheet.html).

That last document recommends keeping the authorization matrix in a file that feeds the integration tests. The advice pays off as soon as An delegates work to an agent: add three agent calls on An's order and three on Binh's, and the matrix grows to 18.

The agent may view and edit, but may it cancel? The comparison `caller == owner` cannot answer that, so expectations have to be recorded as data.

If you are aiming for a role like the one at Arcade.dev, practice those six calls and be ready to explain why each is allowed or blocked. One posting does not represent the whole profession, so when a listing mentions only API integration in general terms, ask: do FDEs configure authorization on the client side themselves, or does another team handle it?

The course is free, but set aside a full two hours. The [Credly badge for the '25 edition](https://www.credly.com/org/apisec-university/badge/api-security-fundamentals-25-2-hours) lists that duration, and [freeCodeCamp](https://www.freecodecamp.org/news/learn-the-basics-of-api-security/) also gives two hours for Barahona's course of the same name on YouTube.

[APIsec University](https://au.apisec.ai/) awards a certificate and a badge on completion. On a résumé, the badge belongs after a line about work you have done: which endpoints were tested, how many cross-access cases, and at which pipeline stage the tests run. Include a repo so that recruiters can run it themselves.

You will know whether those two hours were useful the first time a cross-access test you wrote goes red before go-live, while you are still the one who found the problem.

**Try this week:**

- Watch the OWASP Top 10 section and, for each risk, note one endpoint in your project that could be exposed to it.
- Request two test accounts on staging, write a cross-access test for one resource, and add it to CI/CD.
- Open three FDE job postings, underline every mention of authorization, and write one question for the recruiter.

## Sources

- [Learn API Security Fast – Free Course for AppSec & DevSecOps Pros | APISec University](https://au.apisec.ai/courses/api-security-fundamentals)

- [APIsec University](https://au.apisec.ai/)

- [API Security Fundamentals '25 (2 hours) - Credly](https://www.credly.com/org/apisec-university/badge/api-security-fundamentals-25-2-hours)

- [Learn the Basics of API Security](https://www.freecodecamp.org/news/learn-the-basics-of-api-security/)

- [API Sec Fundamentals - APIsec University (syselement notes)](https://github.com/syselement/blog/blob/main/cyber-everything/web/api/api-fundamentals.md)

- [OWASP Top 10 API Security Risks – 2023](https://api-security.owasp.org/editions/2023/en/0x11-t10)

- [API1:2023 Broken Object Level Authorization - OWASP API Security Top 10](https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/)

- [WSTG - v4.2 | OWASP Web Security Testing Guide](https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References)

- [Authorization Cheat Sheet - OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html)

- [Authorization Testing Automation Cheat Sheet - OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Testing_Automation_Cheat_Sheet.html)

- [Forward Deployed Engineer - Arcade.dev](https://www.arcade.dev/careers/forward-deployed-engineer-acaf5d8f)
