JanssenProject / jans

An open source enterprise digital identity platform for CIAM or workforce... Janssen is a distribution of standards-based, developer friendly, components that are engineered to work together in any cloud. #OAuth #OpenID #FIDO
https://docs.jans.io
Apache License 2.0
463 stars 73 forks source link

Upgrade base image to Alpine 3.15 #1129

Closed iromli closed 2 years ago

iromli commented 2 years ago

Is your feature request related to a problem? Please describe.

Janssen images are based on Alpine 3.14. This version has vulnerabilities which most of them are fixed in Alpine 3.15. Note that Java-based images are based on bellsoft/liberica-openjre-alpine:11 which unfortunately are still using Alpine 3.14. The bellsoft/liberica-openjre-alpine:11 is used for glibc (instead of musl) compatibility as Janssen Java-based apps are using native library (that only works with glibc) to interact with Spanner.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

References:

moabu commented 2 years ago

Yes this is quite an issue. I think we need to stick to a plain image and handle the rest manually without depending on another image. We have switched base images before and I think that hurts.

iromli commented 2 years ago

Agreed. Having base image from another vendor may block security patches.

One thing that still unresolved while using ld_preload is failure on calling external program from Java apps. This happens on jans-config-api image that calls facter via subprocess. Still investigating the issue.

iromli commented 2 years ago

After a few tests, using LD_PRELOAD has some issue on resolving path when Java code calls shell process (i.e. running facter).

I'm testing custom image with the following setup:

  1. official Alpine 3.15 image
  2. glibc Alpine package
  3. self-compile zlib and gcc for Java 11
  4. Eclipse Temurin (OpenJDK) JRE 11 with glibc-based native library
iromli commented 2 years ago

Here's an example of Dockerfile that conform to the following image setup:

1. official Alpine 3.15 image

2. glibc Alpine package

3. self-compile zlib and gcc for Java 11

4. Eclipse Temurin (OpenJDK) JRE 11 with glibc-based native library
iromli commented 2 years ago

This issue is no longer relevant as there's newer Alpine stable release (v3.16).