Modern web applications use Application Programming Interfaces (APIs) to manage user accounts, retrieve application data, access individual objects, and perform operations on application resources. These APIs commonly process object identifiers, such as user IDs, order IDs, product IDs, or resource identifiers, to determine which object a client is requesting.
Broken Object Level Authorization (BOLA) occurs when an API fails to verify whether the authenticated user has permission to access or modify a particular object. An attacker may manipulate an object identifier in an API request and attempt to access another user's resource.
BOLA is an important API security risk because successful exploitation may expose sensitive information or permit unauthorized modification of another user's data. Proper object-level authorization requires the application to verify access permissions for every relevant operation.
In this use case, OWASP Juice Shop is deployed within an isolated cybersecurity laboratory. Kali Linux is used as the controlled security-testing environment, while Ubuntu Linux hosts the application and machine-learning analysis workflow.
An existing public API security dataset is used as the data source for the machine-learning stage. The available records, labels, and request attributes are inspected to determine whether they support the proposed authorization-related classification task. Suitable labelled records are selected and processed to establish the features required for Decision Tree training.
A Decision Tree classifier, implemented using Scikit-learn, is used to classify API-request observations based on the patterns learned from the available labelled data. The model evaluates selected request characteristics and produces a classification that can help identify potentially suspicious API access activity.
The trained model is subsequently evaluated using compatible API requests captured during normal application activity and a controlled BOLA testing scenario against the local OWASP Juice Shop environment.
During the controlled test, requests are generated using authorized laboratory accounts. The test examines whether an authenticated test user can access an object that belongs to another test user without the required authorization. The requests and responses are captured and processed using the same feature-extraction procedure used during training.
The Decision Tree model classifies the processed request features, and its predictions are compared with the known authorization-test results. Suspicious requests are flagged for further investigation. The application’s actual authorization behavior is evaluated separately because a machine-learning prediction does not itself enforce object-level access control.
The complete workflow is:
Public API Security Dataset
→
Dataset Inspection
→
Label and Feature Assessment
→
Data Preprocessing
→
Feature Extraction
→
Decision Tree Training
→
OWASP Juice Shop Deployment
→
Normal API Activity
→
Controlled BOLA Attack Simulation
→
API Request Capture
→
Authorization Verification
→
Consistent Feature Extraction
→
Decision Tree Classification
→
Suspicious Access Identification
→
Detection Result Validation
→
Performance Evaluation