-
Notifications
You must be signed in to change notification settings - Fork 64
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
Allow to specify keychain path on macOS and remove Windows "User" keystore by default to ssl-keystore parameter #823
Conversation
By default, only Windows agents can specify which keystore to load. This patch allows admins to set a filepath to a specific keychain file (e.g. "``/System/Library/Keychains/SystemRootCertificates.keychain``" to load system certificates only). By default, GLPI Agent export all keychains, which can lead that a third party process upload an untrusted certificate to the User store and exploit or commit a MitM attack of GLPI Agent traffic.
👿 are you kidding when speaking about security issue publicly ? First of all, the keychain usage can't permit to "commit a MitM attack" on GLPI Agent traffic: this won't help to change GLPI-Agent configuration. The malicious user first have to corrupt the network traffic. I agree this is a real possibility when glpi-agent requests have to transit on untrusted network. So the MitM attack has first to be committed elsewhere first: this is far more complex than just load a malicious certificate as user as you are suggesting. And this can even less permit to "exploit the GLPI server" itself: GLPI-Agent just submits inventory files to GLPI. So your "attack" may only permit to help to trust a malicious server and your security assertion is totally wrong. Fortunately, you still have few ways to mitigate that kind of usage attempt:
As a general advice, if you have to submit requests to a glpi server via an untrusted network, think first to use a publicly signed server certificate and set And to conclude my comment, have you any evidence that the command |
I just made a test myself on a Monterey system. From root user account, the As user, I added a new and fresh certificate with "add-certificates" sub-command... but as root, I still only see 2 certificates, and the 2 are apple system and kerberos default certificates. As far I understand, you can change the "default-keychain" for a user. If an admin changes this for root and add an untrusted keychain file, this is not our problem. But the default keychain for the root user is safe as this is just the system and trusted keychain. I tested on a system not integrated in a domain, so maybe the default changes, but I don't think this involves to load keychain of untrusted users. So unless you demonstrate I'm wrong, there's definitively no security problem here. |
It's a possibility depending on the user context which GLPI Agent runs on. I didn't follow the Security rules because it's not an exploited vulnerability, not yet. Only the possibility of it exists should be treated with no jokes at all - I'm not attacking you or the GLPI Agent at all, and I already contributed with bugfixes, new features and GLPI translations, so showing some respect would be great. |
Please, I thank you for your contribution attempt, so don't feel bad. I agree with you that any security should be treated with no jokes at all. And this is why I told you to not open such discussion publicly, this is just a wrong. And so I will insist as you're saying:
This is just a bad reason and even don't say that! Just use project security policy when you suspect a problem, this is a major rule. I don't feel your own respect for the project when you're saying this. So, okay, you're guilty of a mishandling of the issue, but be confident I'll check your contribution. I won't disqualify it because of such a mistake. I must note also another wrong assertion you made in your comment:
This is also just wrong. You can use BASIC http authentication and it works since years. The only problem with it, is you should always use it only other SSL to not risk to compromise authentication on untrusted network. About this comment:
This is out of the context of this PR. But if you don't trust GLPI agent, you may also simply not use it in place on coming here to complain on hypothetical security issue. About your comment on Windows User Keystore: So I'm sorry, but you're totally wrong seeing a security issue here. And finally on your last sentences:
No, it is NOT an issue by default: GLPI-Agent still have its own Root Certificates library provided by Mozilla::CA perl module. This module is well maintained and so public CA will be trusted by default. To conclude I'll close this PR as I don't see any good reason to include it. But, I will probably accept another PR where you change the command to use "/System/Library/Keychains/SystemRootCertificates.keychain" on a fixed keyword, let's say "SystemRootCA". Composing a command to run on a configured value is still a bad idea in term of security as this means you can corrupt the command run if you manage to corrupt the configuration (not easy when the value have to be an existing file, but maybe possible, imagine a filename including a shell meta character). You should still have seen the windows command strictly checks provided values to avoid such problem. |
Thank you for your clarifications. I believe that the documentation wasn't clear about how |
By default, only Windows agents can specify which keystore to load. This patch allows admins to set a filepath to a specific keychain file (e.g. "
/System/Library/Keychains/SystemRootCertificates.keychain
" to load system certificates only). By default, GLPI Agent export all keychains, which can lead that a third party process upload an untrusted certificate to the User store and exploit or commit a MitM attack of GLPI Agent traffic.