Kai Hudalla 47d3f1f1df [bitnami/kafka] Fix conversion of PEM cert chain to multi-line string (#29026)
Fix conversion of PEM cert chain to multi-line string

The libkafka.sh script's kafka_configure_ssl() function contains
functionality to convert a file to a multi-line string. This is used
to inline PEM files into the kafka server.properties.

The current transformation appends a ' \' to each line of the input
file. However, the regular expression used by kafka's
DefaultSslEngineFactory$PemParser.pemEntries() method when starting up
the broker only matches the last certificate in a PEM file that has
been converted this way. This leads to the broker omitting any
intermediary certificates when configured with e.g. a server certificate
chain as described in https://github.com/bitnami/charts/issues/14600.

The transformation function has been changed to append '\n\' to each
line of the file. This results in the regular expression properly
matching each of the certificates contained in the certificate chain.
This type of encoding is also used (and verified) in kafka's
DefaultSslEngineFactoryTest.

Signed-off-by: Kai Hudalla <sophokles.kh@gmail.com>
2023-04-12 17:26:14 +02:00

PRs Welcome

[CI/CD] CD Pipeline

The Bitnami Containers Library

Popular applications, provided by Bitnami, containerized and ready to launch.

Why use Bitnami Images?

  • Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems.
  • With Bitnami images the latest bug fixes and features are available as soon as possible.
  • Bitnami containers, virtual machines and cloud images use the same components and configuration approach - making it easy to switch between formats based on your project needs.
  • All our images are based on minideb a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading Linux distribution.
  • All Bitnami images available in Docker Hub are signed with Docker Content Trust (DCT). You can use DOCKER_CONTENT_TRUST=1 to verify the integrity of the images.
  • Bitnami container images are released on a regular basis with the latest distribution packages available.

Get an image

The recommended way to get any of the Bitnami Images is to pull the prebuilt image from the Docker Hub Registry.

docker pull bitnami/APP

To use a specific version, you can pull a versioned tag.

docker pull bitnami/APP:[TAG]

If you wish, you can also build the image yourself by cloning the repository, changing to the directory containing the Dockerfile and executing the docker build command.

git clone https://github.com/bitnami/containers.git
cd bitnami/APP/VERSION/OPERATING-SYSTEM
docker build -t bitnami/APP .

Remember to replace the APP, VERSION and OPERATING-SYSTEM placeholders in the example command above with the correct values.

Run the application using Docker Compose

The main folder of each application contains a functional docker-compose.yml file. Run the application using it as shown below:

curl -sSL https://raw.githubusercontent.com/bitnami/containers/main/bitnami/APP/docker-compose.yml > docker-compose.yml
docker-compose up -d

Remember to replace the APP placeholder in the example command above with the correct value.

Vulnerability scan in Bitnami container images

As part of the release process, the Bitnami container images are analyzed for vulnerabilities. At this moment, we are using two different tools:

This scanning process is triggered via a GH action for every PR affecting the source code of the containers, regardless of its nature or origin.

Contributing

We'd love for you to contribute to those container images. You can request new features by creating an issue, or submit a pull request with your contribution.

License

Copyright © 2023 Bitnami

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Description
Languages
Shell 94.1%
Dockerfile 5.3%
Smarty 0.6%