Search Policy Gateway for Bitbucket
Apply an external access policy to Bitbucket code search.
Overview
A plugin that adds an organization-specific access layer to Bitbucket code search. It intercepts the search REST call behind the search page and sends the requester’s server-side IP and user details to an external hook.
Results are filtered by the allowed project keys or deny decision the hook returns. Queries are never changed; denied snippets are replaced with locale-specific text or the row is removed. It shares its hook contract with the Confluence edition.
How it works
Instead of public screens, here is how it works.
- 1A user searches code
- 2User, IP and query sent to the hook
- 3Hook returns allowed projects
- 4Filtered results returned
Highlights
Project-level policy
Results are filtered by the project keys the hook allows, with glob patterns for projects or repositories that are always visible or always hidden.
Resilient hook calls
Timeouts, optional fail-closed, a decision cache, a circuit breaker and a concurrency limit keep a hook outage from stalling search.
Easy to operate
Edit the hook URL, payload template and headers from the admin page, and manage search logging, duplicate-log suppression and excluded users, groups and IPs.