Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entrypoint always trying to populate keystore.xml #365

Open
pierrepook opened this issue Oct 22, 2020 · 4 comments
Open

Entrypoint always trying to populate keystore.xml #365

pierrepook opened this issue Oct 22, 2020 · 4 comments
Assignees

Comments

@pierrepook
Copy link

The docker-server.sh entrypoint I believe has a bug

  # Add the keystore password to server configuration
  if [ ! -e $keystorePath ]; then
    sed "s|REPLACE|$PASSWORD|g" $SNIPPETS_SOURCE/keystore.xml > $SNIPPETS_TARGET_DEFAULTS/keystore.xml
  fi
  if [ -e $TRUSTSTORE_FILE ]; then
    sed "s|PWD_TRUST|$TRUSTSTORE_PASSWORD|g" $SNIPPETS_SOURCE/truststore.xml > $SNIPPETS_TARGET_OVERRIDES/truststore.xml
  elif [ ! -z $SEC_TLS_TRUSTDEFAULTCERTS ]; then 
    cp $SNIPPETS_SOURCE/trustDefault.xml $SNIPPETS_TARGET_OVERRIDES/trustDefault.xml  
  fi

The section where it checks for keystore is always adding the keystore if it doesnt exist but it should only populate if it does exist. If the keystore is there, its because I passed the arg at BUILD time then it should populate it.

Always populating it regardless and giving me no option seems like a bug

I believe it should be
if [ -e $keystorePath ]; then

@leochr
Copy link
Member

leochr commented Nov 16, 2020

@arturdzm could you please have a look at this? Thanks.

@arturdzm
Copy link
Contributor

When user provides their own keystore.xml and keystore file and build time this will be skipped.

If the user does not provide any keystore information the XML is generated to make sure the password is set and keystore is generated at runtime by Liberty.

@pierrepook
Copy link
Author

The problem is that in order for it to work I have to provide the key store in a specific location. However, with the cloud vendor I am using I don’t necessarily have control of where I can put the keystone

@pierrepook
Copy link
Author

Therefore I am not using the configure.sh and would like to switch off the auto adding of the keystore which is not possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants