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

Removal of Elasticsearch environment variables means secrets have to be stored in code #120

Open
digorgonzola opened this issue Feb 16, 2024 · 2 comments

Comments

@digorgonzola
Copy link

Since v4.4 the individual environment variables for configuring Elasticsearch are obsolete. e.g. ES_HOST, ES_PORT, ES_PASSWORD etc.

This is a regression for us since we rely on passing secrets to individual environment variables from AWS secrets manager/parameter store using the "value_from" directive. See https://docs.aws.amazon.com/AmazonECS/latest/developerguide/secrets-envvar-ssm-paramstore.html#secrets-envvar-ssm-paramstore-update-container-definition

Since we now have to pass all Geonetwork settings in the one variable GN_CONFIG_PROPERTIES it makes it necessary to store the secret for ES_PASSWORD in plain-text in code, unless we store all the values for GN_CONFIG_PROPERTIES as a secret too. However this becomes annoying as we ideally want to be able to look at the code to see what a particular environment is using.

Is there a good reason why these variables were deprecated?

@fxprunayre
Copy link
Member

Is there a good reason why these variables were deprecated?

The main idea was to avoid to create one variable for each options and use Spring configuration as described in the doc (https://github.com/geonetwork/docker-geonetwork/tree/main/4.4.2) for all options instead of doing search/replace on startup (https://github.com/geonetwork/docker-geonetwork/blob/main/4.2.8/docker-entrypoint.sh#L30-L59). It also make configuration in docker the same as when deploying a WAR.

Maybe we can setup Spring var using env var directly ? or maybe use something similar to https://github.com/geonetwork/core-geonetwork/blob/main/pom.xml#L1486.

@digorgonzola
Copy link
Author

Yep I would definitely vote for the use of environment variables just as you have for database configuration.

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

2 participants