Golang Broken Object Level Authorization Guide: Examples and Prevention
Blog post from StackHawk
Broken access control, particularly broken object level authorization (BOLA), is identified as a critical vulnerability in web APIs, leading to unauthorized access to privileged resources. This issue arises when applications, such as those developed in Golang, inadequately verify user permissions, thus allowing unauthorized users to read, alter, delete, or create data by merely knowing an object's ID. The text illustrates a typical CRUD API implementation vulnerable to BOLA and demonstrates how Golang applications can fix this by incorporating object level authorization, which involves validating user permissions for each action they attempt. The article emphasizes the importance of this approach to prevent data loss or compromise and suggests enhancing API security further by using non-sequential formats like UUIDs for user IDs. It concludes by recommending tools like StackHawk to identify and address such vulnerabilities, authored by Eric Goebelbecker, a seasoned professional in financial market infrastructure.