Apache Beam security

Apache Beam is a programming model to author user-supplied code as stream and batch processing pipelines in a supported distributed system.

Pipeline lifecycle

A Beam pipeline’s full lifecycle involves two environments: the pipeline submission environment and the pipeline execution environment.

Pipeline submission environment - This is the environment where the user submits the pipeline to the runner. The pipeline is constructed (compiled/expanded) in this stage and the execution graph is created. The pipeline graph and dependencies are uploaded to a staging location.

Pipeline execution environment - This is the environment where the pipeline is executed by the runner. The staged graph and dependencies are downloaded from the staging location to the workers’ local storage and the pipeline is executed.

Trust Boundary

Authenticated users who submit jobs are fully trusted. Any components or services invoked during pipeline construction time assume that the pipeline options, transforms, and other configurations are from a trusted user.

Based on the above assumption, the following example scenarios are not considered security vulnerabilities:

Unauthenticated access to workers at pipeline execution time is the threat the runner protects against. Beam pipelines run on a supported runner, and it is the runner architecture that protects against unauthenticated access to workers at pipeline execution time. See the following runner security models for examples:

Beam also provides local runners:

The staging location is trusted and protecting it is the user’s responsibility. The staging location is referenced across runners. It acts as the storage for pipeline logic and dependencies. While Beam provides file integrity checks for staged artifacts, it is the user’s responsibility to protect access to the staging location.

Security boundary reference

The table below is intended for security researchers and enterprise security teams evaluating Beam:

ScenarioSecurity boundaryNotes
Unauthenticated access to the runner workerRunner’s security modelDepends on the runner; report to the runner provider
Unauthenticated access to the host machine using Prism RunnerIn scopePrism runner has a basic security model
Code execution via unsafe deserialization (or other mechanism) of input data where no Beam-level control exists to prevent itIn scopeVulnerability – report it
SQL injection via unsafe parsing of input data where no Beam-level control exists to prevent itIn scopeVulnerability – report it
Existing nomenclature, documentation, and logic expose risk of supply-chain attackDependsSee notes below
Denial of service (DoS) via certain data patterns where no Beam-level control exists to prevent itIn scopeVulnerability – report it, with exceptions (see notes below)
Remote Code Execution (RCE) via a submitted JAR, Expansion service, or UDFOut of scopeBy design – these submitters run arbitrary code

Notes:

Reporting Security Issues

Apache Beam uses the standard process outlined by the Apache Security Team for reporting vulnerabilities. Note that vulnerabilities should not be publicly disclosed until the project has responded.

Before reporting a possible security vulnerability, please review this page to check if the vulnerability pattern is explicitly out of scope or should be routed to the runner provider. To report a possible security vulnerability, please email security@apache.org and pmc@beam.apache.org. This is a non-public list that will reach the Beam PMC.

Known Security Issues

For security issues in old Beam versions, see archive.