falco: SSL server failed to start
What happened:
I enabled SSL support in Falco configuration file but then the server failed to start. Its logs:
** CONFIG_BPF_JIT enabled and/or use --net=host if **
** running inside a container. **
**********************************************************
* BPF probe located, it's now possible to start sysdig
Thu Sep 26 06:37:19 2019: Falco initialized with configuration file /etc/falco/falco.yaml
Thu Sep 26 06:37:19 2019: Loading rules from file /etc/falco/falco_rules.yaml:
Thu Sep 26 06:37:20 2019: Loading rules from file /etc/falco/falco_rules.local.yaml:
Thu Sep 26 06:37:20 2019: Loading rules from file /etc/falco/k8s_audit_rules.yaml:
Thu Sep 26 06:37:20 2019: Starting internal webserver, listening on port 443 (SSL)
Thu Sep 26 06:37:20 2019: Runtime error: Could not create embedded webserver: null context when constructing CivetServer. Possible problem binding to port.. Exiting.
What you expected to happen:
Falco server can start successfully with SSL support.
How to reproduce it (as minimally and precisely as possible):
- Following official docs: https://falco.org/docs/installation/ to install Falco in daemonset .
- modify falco-config/falco.yaml and open the SSL flag:
webserver:
enabled: true
listen_port: 443
k8s_audit_endpoint: /k8s-audit
ssl_enabled: true
ssl_certificate: /etc/falco/falco.pem
The SSL certificate is generated following the comment:
$ openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem $ cat certificate.pem key.pem > falco.pem $ sudo cp falco.pem /etc/falco/falco.pem
After that the daemonset can’t start successfully, but it can start after I set “ssl_enabled: false”.
And the falco.pem is passed to POD via ConfigMap “falco-config”
Anything else we need to know?:
Environment:
- Falco version (use
falco --version): image “falcosecurity/falco:latest” - System info <!-- Falco has a built-in support command you can use “falco --support | jq .system_info” -->
- Cloud provider or hardware configuration:
- OS (e.g:
cat /etc/os-release): 18.04.1 LTS (Bionic Beaver) - Kernel (e.g.
uname -a): 4.15.0-51-generic - Install tools (e.g. in kubernetes, rpm, deb, from source): Kubernetes
- Others:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 31 (19 by maintainers)
Is it possible to get an update on this? It looks like the issue is still present in
falcosecurity/falco:0.18.0. This issue prevents operators from running falco in an SSL everywhere type of environment.Here is what I’m seeing:
Following up on what @fntlnz suggested, I have tried the following workaround in the Falco daemonset to fix this issue.
I have only tested this out in the following image: docker.io/falcosecurity/falco:0.18.0. Hope it helps someone.
The bug still exists for me after I changed the port to 8765
I’m sure no other process is binding to 8765.
Working on this branch: https://github.com/falcosecurity/falco/compare/860-fix-civet-ssl