Skip to content


Repository files navigation

Boomerang Bosun Service


The Bosun service works with the Bosun UI and optionally the Repository service. It controls the CRUD on policy objects and the execution and validation of these poilicies as gates in your CICD pipelines.


  1. Java 1.11
  2. Springboot 2.1.8
  3. Maven
  4. OpenPolicyAgent

How to Run:


  1. mvn package
  2. java -jar /target/services-boomerangci-1.0.jar


docker run -p 8181:8181 openpolicyagent/opa run --server --log-level debug


Included is a Postman collection that can be used to submit policies and test data into OPA

OPA Policies

The policy rego documents are stored in the Helm chart

Rest API

Validate API

Validate direct policy with pre-integrated repository data.

POST  /bosun/policies/validate
    "referenceId" : "",
    "policyId" : "5cf95aefa814cf0001781636",
    "labels": {


  • referenceId equals a distinct unique identifier that is consistent for all related validations. This could be a combination of git repository plus pipeline id.
  • policyId is the policy you wish to validate against
  • labels are key value pairs of metadata that can help provide descriptive information to guide the user in resolving a violation. This could be version or git commit reference.



Spring Data Aggregations

To get the violations we use a complex aggregation and the following links provided good reference material