All articles

Improving passbolt security with distroless containers

4 min. read

Diego Lendoiro

Diego Lendoiro

17 August, 2020

It’s undeniable that containers have had a big impact on today’s software engineering.

  • Reduce the disk usage.
  • Improve build times on CI.
  • Minimize network usage when pulling and pushing images.
  • Decrease the attack surface (by reducing the number of services).
  • Simplify the patching process (by reducing the number of dependencies).
  • Enhance signal to noise ratio when running vulnerability scanners (as false positives will be less likely).
  • Help establish the provenance of what it is installed in your container to just what you need.

Enter minimal “distroless” images

{Fast, Correct} — Choose two
”Distroless” images contain only your application and its runtime dependencies. They do not contain package managers, shells or any other programs you would expect to find in a standard Linux distribution.
  • It is based on debian packages.
  • We can continue using the nginx / php-fpm stack which is known for us.
  • As it is based on debian packages we still rely on a solid project that will continue the patching of dependencies passbolt requires.
  • We can take advantage of our recently published debian package.
  • As it forces you to pin debian snapshots, builds are deterministic.
  • We had to build what they call “lang image” as there was no php-fpm distroless image. A pull request is pending approval.
  • We introduce a new tool to learn / dependency with bazel.
  • php-cli or php-fpm binary as entrypoint
  • Php extensions: php-json, php-mysql, php-common (package that contains a bunch of common extensions) and some more. The list is here
  • Configuration files:
     — A /etc/passwd file with an entry for www-data
     — A www.conf pool to set up some parameters of the php-fpm process
  • Gnupg
  • Extra php-extensions: php-gnupg, php-intl, php-redis
  • Bash (only for passbolt-cli image)

Image sizes

  • passbolt/passbolt current docker image based on php:7.3.21-fpm image
  • passbolt_debian_buster local image created based on debian:buster-slim image
  • bazel/experimental/passbolt-fpm distroless image

Vulnerability scan

Hands on test

Future work

References

Continue reading

Too many email notifications?

3 min. read

Too many email notifications?

Opt-in for some digests!

Passbolt team

Passbolt team

19 August, 2020

Why does passbolt require an extension?

6 min. read

Why does passbolt require an extension?

The short explanation, as per the official FAQ, is that passbolt requires an extension to ensure the integrity of the cryptographic code, but also to enable functionalities on other websites such as the “password auto-fill”. Not convinced?

Passbolt team

Passbolt team

2 July, 2020

Flag of European UnionMade in Europe. Privacy by default.