#065Technical3 min
Check an API’s authentication
Understand anonymous responses, session protections and the difference between identity and permission.
Hackaiz team · updated 21/11/2026

01Separate identity checks from record permissions
Authentication establishes who is calling an API, while authorization decides what that caller may read or change. An API may reject anonymous requests but still let one signed-in customer retrieve another customer's records. Conversely, an endpoint serving a public catalogue can legitimately answer without a session. Begin the review with an explicit statement of which operations are public and which require a particular role or record owner.
Hackaiz provides evidence about certain anonymous API responses and authentication-related behavior. Do not describe that evidence as a full simulation of every user role. To investigate an access problem properly, connect the relevant code or database as a separate target and ask the owner to explain the server-side rule that should enforce the intended restriction.
02Prepare an authorized API inspection
On /connect, prepare the actual API domain rather than assuming the front-end hostname is sufficient. Before any website or API analysis, prove domain ownership with the displayed DNS TXT value under _hackaiz, the HTTPS file /.well-known/hackaiz-verification.txt, or the instruction for your project's AI to create that file. A sign-in screen or a public API description does not replace this proof.
Choose the relevant checks and review the selection before launching. Analyses consume credits; unticked checks do not run and are not billed. Keep the deployed environment and selected scope in your review notes. If you examine a test environment with different session settings from production, the result cannot establish how production handles authentication.
03Understand the anonymous API check
The API authentication probe discovers an OpenAPI or Swagger description and selects bounded GET operations that meet its criteria. It skips routes with path parameters, mandatory non-path parameters and operations explicitly declared public. It then looks for a successful anonymous response with structured JSON data. The report can include the request path, HTTP status and a masked response excerpt.
A returned list of invoices deserves different treatment from a list of public categories. Confirm the intended policy before changing the endpoint. A JSON response demonstrates what answered that request; it does not prove that the caller could modify data, that all records were exposed, or that every API route has the same problem. The probe does not turn a fallback HTML page into API evidence.
04Review how sessions are transported
Related deployed-site checks examine session-like cookies for flags such as HttpOnly, Secure and SameSite, and identify password forms submitted over plain HTTP. HttpOnly limits script access to a cookie, Secure restricts its transmission to encrypted connections, and SameSite influences cross-site cookie sending. These are transport and browser protections, not substitutes for server-side record permissions.
Read which cookie or form produced the finding instead of assuming all sessions share the same settings. The authentication-depth check described here does not guess passwords or establish that all sign-in methods were exercised. A server can require credentials and still apply an unsafe cookie configuration; correcting one layer should not obscure the need to review the other.
05Validate a targeted correction
Use Danger, To fix and To watch to organize findings, then assign the actual change: add or repair authentication middleware, enforce object-level permission checks, or adjust the identified cookie or form configuration. Test the intended public access as well as the refused private access. Rejecting every request may hide the original issue while breaking the API's legitimate purpose.
A Hackaiz GitHub correction is published as a draft pull request for a person to review and approve, never merged automatically. Once the reviewed change reaches the intended environment, rerun the relevant authorized check and retain its limitations. This repeat analysis also uses credits. Where account-specific behavior is still uncertain, arrange a controlled developer review rather than claiming an anonymous probe has established complete user isolation.
Frequently asked questions
Take the next step
Was this article helpful?