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

salt runner foreman_reports_upload.py script issues with load balancers #92

Open
tek0011 opened this issue Jul 30, 2024 · 0 comments
Open

Comments

@tek0011
Copy link

tek0011 commented Jul 30, 2024

As we continue to build out our large foreman/salt infrastructure, we use multiple load balancers for the foremanUI, API, etc. It is common use with load balancers to set them up as ssl managed, where as you forward port 443 from the load balancer, to 443 on the foreman server. But then you modify the apache configuration to be https, without the SSL engine itself. This allows the load balancer to handle http traffic via SSL, then forward it to the Foreman servers, where the SSL ends.

The current script will not work this way, as it does a check for https. If https is enabled in the config file this if will run:

    if config[":proto"] == "https":

Which will look for ssl certs, and fail. The foreman-node script, for example, doesnt care if you set it to https or http. It will only use the ssl certs if they are NOT empty.

This isnt a bug so to say, but it will prevent people from using the script if they are using managed load balancers.

I edited the script to ignore the checking of https, and instead check to see if ssl_cert and ssl_key are empty or not. If they are empty, it assumes ssl is not enable, but still uses https.

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

1 participant