Skip to content

use bpm to run blackbox#246

Open
mkocher wants to merge 1 commit into
cloudfoundry:mainfrom
mkocher:use-bpm
Open

use bpm to run blackbox#246
mkocher wants to merge 1 commit into
cloudfoundry:mainfrom
mkocher:use-bpm

Conversation

@mkocher

@mkocher mkocher commented Jun 13, 2026

Copy link
Copy Markdown
Member

The Resolute Raccoon stemcell removes runit which provies chpst which was used in the blackbox start script to not run as root. Moving to BPM fixes this, as well as provides an enhanced security posture.

I validated this change by running all of the acceptance tests. I updated scripts/test to upload bpm release. I'm not sure if CI uses that script or will need a corresponding change.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing performed?

  • Unit tests
  • Integration tests
  • Acceptance tests

Checklist:

  • This PR is being made against the main branch, or relevant version branch
  • I have made corresponding changes to the documentation
  • I have added testing for my changes

If you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack

The Resolute Raccoon stemcell removes `runit` which provies chpst
which was used in the blackbox start script to not run as root.
Moving to BPM fixes this, as well as provides an enhanced security
posture.

@jorbaum jorbaum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I got one question regarding the DAC_READ_SEARCH capability. Otherwise its clear and looks good.

Sadly there is no CI running the acceptance tests yet.

<% end %>

<% unless p('syslog.respect_file_permissions') %>
setcap cap_dac_read_search+ep /var/vcap/packages/blackbox/bin/blackbox

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is setcap cap_dac_read_search+ep still being set in pre-start.erb if BPM is now declaring capabilities: [DAC_READ_SEARCH]? These appear to be redundant.

Consider removing setcap cap_dac_read_search+ep here. AFAIU then only the bpm process would get those permissions and not the binary ifself. Then acceptance tests should run through without this line.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @jorbaum

@chombium chombium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkocher Thanks for testing this and thinking about the future :)

Please fix the cap_dac redundancy and we can merge this

<% end %>

<% unless p('syslog.respect_file_permissions') %>
setcap cap_dac_read_search+ep /var/vcap/packages/blackbox/bin/blackbox

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @jorbaum

@github-project-automation github-project-automation Bot moved this from Inbox to Waiting for Changes | Open for Contribution in Foundational Infrastructure Working Group Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting for Changes | Open for Contribution

Development

Successfully merging this pull request may close these issues.

3 participants