opensearch-build: [BUG] Not all dashboards settings (e.g. opensearch_security) can be specified as env vars with dashboards container image

Describe the bug It is possible to specify certain configuration variables of OpenSearch Dashboards’ opensearch_dashboards.yml via environment variables passed to the container. Currently all of the opensearch_security settings which are required for e.g. OIDC cannot be specified (at least they do not have any effect) because they are not in the whitelist in the entrypoint script (?).

Those variables would likely cause problems because they contain an underscore (_). Environment variables are specified in uppercase where the dots in the YAML notation become underscores for the environment variable. For variables with an underscore it would not be clear which underscores should be converted to dots and which shouldn’t. Since the OpenSearch container does not use this behaviour on environment variables maybe it would be best to drop this conversion altogether?

To Reproduce Steps to reproduce the behavior:

  1. Run the opensearch-dashboards container image either with docker-compose, k8s pod manifest, podman etc.
  2. set the environment variable OPENSEARCH_SECURITY_AUTH_TYPE to openid and other necessary variables for OIDC in the way the chosen runtime expects them.
  3. Observe that OIDC is not working and the login screen of Dashboards is showing.

Expected behavior All configuration options of opensearch_dashboards.yml should be settable via environment variables.

Plugins N/A

Screenshots N/A

Host/Environment (please complete the following information):

  • OS: Linux (Ubuntu 20.04)
  • Version 1.0.0

Additional context N/A

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 16 (12 by maintainers)

Most upvoted comments

Okay, I understand the discrepancy now. I misread your initial description about the configuration values. opensearch_security.auth.type is the setting for activating OpenID in the .yml file.