Replies: 5 comments 22 replies
-
You can use the Auth-Basic function from Apache and restrict access on the inventory part, server side, to a list of credentials. https://httpd.apache.org/docs/2.4/en/howto/auth.html You can launch the agent with the previously created credentials, command-line args are : --user=USER --password=PASSWORD |
Beta Was this translation helpful? Give feedback.
-
You are talking about GLPI-Agent Inventory server plugin: Read the doc first, this is not the same than standard usage. The token is just a shared secret of your choice. |
Beta Was this translation helpful? Give feedback.
-
I have the same question. With the default configuration, anyone with the server link could inject unwanted data. I haven't found information on how to restrict this access on server side. The solution given by @AntoninGP up here seems a bit rudimentary. I also tried adding to the file
the line:
This effectively restricts access, but I can't then manage to authenticate the host that I actually want to add. |
Beta Was this translation helpful? Give feedback.
-
This setup mode should be very well documented in the agent. |
Beta Was this translation helpful? Give feedback.
-
So, while the OAuth support is likely still some time away, I poked around a bit more with the basic auth option and realized that, in my case, I had to implement that not in Apache which is in front of GLPI, but in Nginx which is in turn in front of the Apache-GLPI combo - and also in front of a number of other services. Now I have it working, however not just for the inventory part with the agent, but for the whole site. This matter has been asked for in this thread before, but for Apache. Without a proper answer though, as far as I can see. The relevant section of my current Nginx config now looks like this:
Any pointers are appreciated. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your help request related to a problem?
By default, when installing glpi-agent, anyone who known the url can registering in the inventory.
How restrict that ?
Expected behavior
Restricting inventory only to agent with a token or auth login
Actions you've considered
I see a "token" thing in the glpi-agent (inventory-plugin.cfg and in the documentation), but how to setup/link that with the glpi-agent ? (adding token= in the agent.cfg, generating a user with an api dedicated token ?).
I've check glpi-project/glpi#12706 but the issue not having an update since he was created
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions