quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.36k stars 2.56k forks source link

Inconsistency between documentation of ssl.trustStore in amazon-lambda and native-and-ssl #11254

Open debae opened 3 years ago

debae commented 3 years ago

Describe the bug There is an inconsistency between the documentation of https://quarkus.io/guides/amazon-lambda and https://quarkus.io/guides/native-and-ssl.

According to the amazon-lambda documentation to bootstrap file should be adapter like this : `

!/usr/bin/env bash

./runner -Djava.library.path=./ -Djavax.net.ssl.trustStore=./cacerts ` However the documentation about native-and-ssl states :

As a consequence, system properties such as javax.net.ssl.trustStore do not have an effect at run time, so when the defaults need to be changed, these system properties must be provided at image build time. The easiest way to do so is by setting quarkus.native.additional-build-args. For example:

quarkus.native.additional-build-args=-J-Djavax.net.ssl.trustStore=/tmp/mycerts,-J-Djavax.net.ssl.trustStorePassword=changeit

Actual behavior Getting the following log message when starting the lambda function : Setting the 'javax.net.ssl.trustStore' system property will not have any effect at runtime. Make sure to set this property at build time (for example by setting 'quarkus.native.additional-build-args=-J-Djavax.net.ssl.trustStore=someValue').

To Reproduce Steps to reproduce the behavior:

  1. Create a custom bootstrap.yaml that contains -Djavax.net.ssl.trustStore=./cacerts
  2. At startup you see the warning message

Environment (please complete the following information):

quarkusbot commented 3 years ago

/cc @patriot1burke

patriot1burke commented 3 years ago

So, will this work?

quarkus.native.additional-build-args=-J-Djavax.net.ssl.trustStore=/tmp/mycerts,-J-Djavax.net.ssl.trustStorePassword=changeit

FYI, the command line thing used to work I believe, and we just didn't update the docs. This is just a documentation issue?

debae commented 3 years ago

Indeed it's just a documentation issue. Only the additional-build-args in the application.properties is sufficient. No need to add extra parameters in the bootstrap file.