Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add mTLS certificate loading for Falco via Helm #565

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

jgmartinez
Copy link
Contributor

What type of PR is this?

/kind feature

/kind chart-release

Any specific area of the project related to this PR?

/area falco-chart

What this PR does / why we need it:

This PR adds the capability of loading certificates for mTLS communication dynamically via Helm values. It's structured in a way to make it easier to deploy mTLS cryptographic material for Falco http_output when mTLS is enabled.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

Substituting #549

Checklist

  • Variables are documented in the README.md

@poiana poiana added dco-signoff: yes kind/feature New feature or request kind/chart-release Add this label when the chart version has been bumped labels Oct 23, 2023
@poiana poiana requested review from alacuku and bencer October 23, 2023 10:20
@poiana poiana added the size/M label Oct 23, 2023
@cpanato
Copy link
Member

cpanato commented Nov 3, 2023

@jgmartinez can you please rebase your PR? thanks

@jgmartinez
Copy link
Contributor Author

Done @cpanato

@CasperGN
Copy link

CasperGN commented Nov 6, 2023

@cpanato can you consider looking at this PR?
We're using this setup in our cluster deployment and would like to get rid of managing multiple upstreams and rather just reference yours - thanks!

@cpanato
Copy link
Member

cpanato commented Nov 6, 2023

@CasperGN i will try to take a look today, but it is kubecon

@cpanato
Copy link
Member

cpanato commented Nov 7, 2023

/approve

/assign @leogr to check the ssl change path part

@poiana poiana added the approved label Nov 7, 2023
Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

Just left a comment regarding the file path. Otherwise, SGTM!

Thank you!

Comment on lines +718 to 725
ca_path: "/etc/falco/certs/"
# -- Tell Falco to use mTLS
mtls: false
# -- Path to the client cert.
client_cert: "/etc/ssl/certs/client.crt"
client_cert: "/etc/falco/certs/client/client.crt"
# -- Path to the client key.
client_key: "/etc/ssl/certs/client.key"
client_key: "/etc/falco/certs/client/client.key"
# -- Whether to echo server answers to stdout
Copy link
Member

Choose a reason for hiding this comment

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

Although this is legit, we will risk getting these values overwritten when maintainers update the config (N.B.: these defaults are usually copied/pasted from falco.yaml).

So I'd prefer to keep the /etc/ssl/certs folder unless there's any compelling reason not to do so 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reason I changed the path is because if we use /etc/ssl/certs we are overwriting the base image CAs and other certificates, risking getting certificate errors if the container need to trust other servers or other certificate related issues.

This being said, we could mount a folder inside like /etc/ssl/certs/ falco so there's some consistency :)

Copy link
Member

Choose a reason for hiding this comment

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

Good point. I believe /etc/falco/certs works. Just waiting for @alacuku for a second opinion.

Thank you!

Copy link
Member

@alacuku alacuku left a comment

Choose a reason for hiding this comment

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

Hi @jgmartinez, thank you for the contribution.

Left a suggestion.

charts/falco/templates/client-certs-secret.yaml Outdated Show resolved Hide resolved
Signed-off-by: Juan Gonzalez <[email protected]>
Copy link
Member

@alacuku alacuku left a comment

Choose a reason for hiding this comment

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

/LGTM

@poiana
Copy link
Contributor

poiana commented Nov 15, 2023

LGTM label has been added.

Git tree hash: 459ade81717e74dbff21402dde24cda52bc38135

@alacuku
Copy link
Member

alacuku commented Nov 15, 2023

@leogr could you please have a look?

@jgmartinez
Copy link
Contributor Author

@leogr could you please have a look?

any updates on this? :)

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

/lgtm

/hold for @leogr approval

Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

/hold cancel

@poiana
Copy link
Contributor

poiana commented Nov 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alacuku, cpanato, jgmartinez, leogr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit ae53304 into falcosecurity:master Nov 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/falco-chart dco-signoff: yes kind/chart-release Add this label when the chart version has been bumped kind/feature New feature or request lgtm size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants