Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Self Hosted Pipeline Runners with self signed certificate firewall inspection

Bobin Joseph
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2022

Hello,

I am running a self hosted runner as mentioned here in K8s. https://support.atlassian.com/bitbucket-cloud/docs/pipelines-runners-frequently-asked-questions/

 

I am running into an issue with our CORP firewall performing inspection on outbound traffic. The runner fails as it cannot talk to Bitbucket to register itself as a runner in my repo.

 

I would like to know how I can install or add the self-signed cert to the bitbucket pod so that it accepts the certificate as valid.

 

Thanks,

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 21, 2022

Hi @Bobin Joseph and welcome to the community!

What you can do is build a new Docker image that is based on the image runners are using and modify the certificate store.

An example Docker file would be the following:

FROM docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1
COPY ldap.cer $JAVA_HOME/lib/security
RUN \
cd $JAVA_HOME/lib/security \
&& keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias ldapcert -file ldap.cer

where ldap.cer replace with your certificate. Place the certificate file in the same directory as the Dockerfile, and then you can build the image with the following command

docker image build -t example/runner:cert .

and push it to Dockerhub or another registry.

When you create a runner from the Bitbucket website, you are given a docker container run command to start the runner.
In that command, replace docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1 with the name of the image you pushed earlier and then use it to start the runner.

Please feel free to let me know how it goes and if you need anything further.

Kind regards,
Theodora

Alexander Christian
Contributor
January 13, 2026

We have the exact same problem: We need a specific certificate in our truststore to load Docker images with Bitbucket Runner (more precisely, with Z-Scaler).

The recommended solution worked perfectly for months.

However, the certificates' validity period is decreasing. It seems we now have to create a custom Bitbucket Runner image with our Z-Scaler certificate every week.

It's strange that this extensive workaround is necessary and that there's no other way to provide the Bitbucket Runner image with the required certificates.

Who do I need to bother to get an updated Bitbucket Runner that can be configured to accept certificates from a volume? That would simplify things considerably.

br,
Alex

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events