> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/start-scanning/overview-scan-settings/test-bola-vulnerabilities.md).

# Test BOLA vulnerabilities

Learn how to set up your target to be tested against Broken Object Level Authorization vulnerabilities.

Broken Object Level Authorization (BOLA) is a critical security vulnerability that occurs when a user can gain unauthorized access to other users' resources by changing part of a request, for example, changing a bank account number in a URL to access another user's data or resources.

You can use Snyk API & Web to test your APIs against this type of vulnerability by configuring the API target authentication and setting up two different users.

{% hint style="info" %}
BOLA testing is only available for OpenAPI and GraphQL targets.
{% endhint %}

Setting up your target to be tested against BOLA vulnerabilities involves two steps:

1. Configure additional user for authorization testing
2. Select the appropriate scan profile

The following sections describe these steps in detail.

## Step 1: Configure additional user for authorization testing

To configure the API Target authentication for BOLA testing:

1. Visit [Configure OpenAPI authentication](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/configure-targets/configure-authentication/configure-openapi-authentication.md) or [Configure GraphQL authentication](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/configure-targets/configure-authentication/configure-graphql-authentication.md) and follow the instructions for your authentication scenario.
2. When configuring authentication, select the **Add additional user for authorization testing** check box.
3. Configure the authentication for the second user using the same method (authentication payload or static headers/cookies). To reduce false positives, the second user must have the same level of privileges as the first user, or lower.
4. Complete the authentication configuration and ensure the toggle is set to **On**.

## Step 2: Select the appropriate scan profile

After configuring the API target authentication, choose the appropriate scan profile:

1. Access the Profile tab of that target's settings.
2. Choose either the **API normal** or **API full** scan profiles.

After you configure both sets of users for API targets and select the appropriate scan profile, Snyk tests against BOLA vulnerabilities.

## Does the privilege level of the users matter?

Yes. The second user (the attacker) must not have access to the first user's resources.

The two users can have different privilege levels (for example, admin versus regular user), or they can have the same level, as long as the first user owns resources that should not be accessible to the second. That is what allows the scanner to test for BOLA vulnerabilities.

Ideally, the first user has multiple and varied private resources, so attempts by the second user to access them can effectively reveal access control flaws.

## Related content

* [Configure OpenAPI authentication](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/configure-targets/configure-authentication/configure-openapi-authentication.md)
* [Configure GraphQL authentication](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/configure-targets/configure-authentication/configure-graphql-authentication.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/start-scanning/overview-scan-settings/test-bola-vulnerabilities.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
