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

Respect Service Template Zones in Service Sets #2356

Closed
Thomas-Gelf opened this issue Jul 13, 2021 · 6 comments
Closed

Respect Service Template Zones in Service Sets #2356

Thomas-Gelf opened this issue Jul 13, 2021 · 6 comments

Comments

@Thomas-Gelf
Copy link
Contributor

Expected Behavior

I want to be able to put Services in specific Zones by tweaking their Templates

Current Behavior

While this works fine for Single Services (and Apply Rules), it doesn't work as expected for Service Sets. It's possible to tweak the zone property of the Service, but Service (Set) Apply Rules are still rendered to the global zone.

Technical reason: the "main" object tells the Config Renderer about it's preferred Zone. In this case, the Set is this "main object". As the Set has no Zone, the Renderer falls back to it's default decision tree. It never "talks" to single Services, as they do not exist at all - the Set generates them on the fly for rendering purposes only.

Possible Solution

Fix this 🤣. And have a look at #1589, it is related.

@bobapple
Copy link
Member

ref/IP/34331

@Linuxfabrik
Copy link

There is also a security aspect to this: Currently, if one sets a password as a variable (custom properties) on a service in a service set, the password is deployed to all the agents and can be found as plaintext in /var/lib/icinga2/api/zones/director-global/director/servicesets.conf. This can leak the password to unauthorised parties, especially in multi-tenant organisations with a centralised monitoring system. This forces one to set all the passwords on the host directly, which can be unwieldy.

For example, if we have a service set for our mysql-servers including the password for the database connection, this password can be found on all the other hosts as well, even if they are not using said service set. This means the external development company that has root-permissions on a dev-system can get the mysql password.

This could be prevented by setting the zone to master, if this option is implemented.

@phil-or
Copy link

phil-or commented Oct 8, 2021

I also discussed the security aspect in the Icinga community. https://community.icinga.com/t/how-to-store-passwords-credentials/8029
Setting zones to services or service sets would be definitely the best solution.

@Thomas-Gelf Thomas-Gelf modified the milestones: 1.9.0, 1.10.0 Dec 13, 2021
@Thomas-Gelf Thomas-Gelf modified the milestones: 1.10.0, next Jun 20, 2022
@Wintermute2k6
Copy link

ref/NC/761567

@bobapple
Copy link
Member

ref/IP/43726

@Thomas-Gelf Can we please have this with v1.11? 😃

@Thomas-Gelf Thomas-Gelf modified the milestones: next, v1.11.0 Dec 22, 2022
@Thomas-Gelf
Copy link
Contributor Author

@bobapple: sure! It's already in the master, but was pinned to the wrong GitHub milestone. Has been fixed, thank you!

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

No branches or pull requests

4 participants