Hi,
I made a thread before but I actually realized where the issue is so I removed that and I wanted to make this instead, as kind of a feedback/bug report kind-of thread.
So we had working configuration for RoR version 1.27.1 and ELK at 7.8.1.
We had a working readonlyrest.yml config with ldaps mostly specified via environment variables like this:
After updating our ELK stack, we updated RoR to 1.48.0 and configuration stopped working. RoR would fail on startup with the exception: Server information missing: use 'host' and 'port', 'servers'/'hosts' or 'service_discovery' option. that I believe comes from:
It took me quite a while to figure out that the issue is related to env variables. Environment was properly set(we use docker compose but that doesnât matter), variables were there and could be seen by readonlyrest.yml, as other variables, used for example in access_control_rules - worked.
So turns out that if ldaps.port is specified via environment variable like in an example above, startup will fail with exception mentioned above, if we hardcode it manually - it works. I believe thereâs an issue somewhere with parsing variable to an int that causes this behaviour, and I am fairly sure that it worked in older versions as we did not change configurations for a while(at least not since I work at my current project). We have .env files for docker compose where we would specify
It might be worth mentioning this behaviour somewhere or fixing parsing of that particular setting.
Itâs especially confusing since this example actually uses environment variable in port for ldaps?
It also seems that code and documentation are all over the place when it comes to using environment variables in .yml.
F.e. docs mention ${env:TEST_VAR}, this example uses ${TEST_VAR}, this one has {LDAP1_HOST}
Might be good to mention âthe right wayâ in the docs and/or update older tests/examples.
Thanks! Iâm not sure itâs because of the new syntax though. I checked a lot of combinations and every one failed for me. We moved to hard-coded port(since we use default on all environments anyway) and it seems to work perfectly. Host works with both formats as far as Iâve seen.
Hi Maciej!
Thanks for reporting this. I confirm there is a problem with ENV usage in the LDAP connector âportâ field (it works in the case of âhostâ). I think I know where the problem is. Will try to fix it today evening.
Hey, Iâve tested it locally and it seems to work properly We will update to new version when stable comes out then, for now hardcoded ports are good enough. Thank you!