glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
46 stars 27 forks source link

About the server URL to use as server parameter, it will depends on your server and plugins installation #510

Open AlexTR85 opened 4 months ago

AlexTR85 commented 4 months ago

Describe the bug

In the documentation: "https://glpi-agent.readthedocs.io/en/latest/configuration.html" It states the following:


If you're using GLPI 10+, there are few cases regarding GlpiInventory plugin usage:

If you're not using GlpiInventory plugin:

Your server URL should look like: https://my-glpi-server/, or https://my-glpi-server/front/inventory.php

Using https://my-glpi-server/ may cause issues fixed in GLPI 10.0.6. If you use an older version, it may be better to use the full URL for now.

If you have installed GlpiInventory plugin via Marketplace:

Your server URL should look like: https://my-glpi-server/marketplace/glpiinventory/

If you have installed GlpiInventory plugin manually under /plugins GLPI folder:

Your server URL should look like: https://my-glpi-server/plugins/glpiinventory/


However, "https://my-glpi-server/" continues to function even when using the inventory plugin, so it's pointless to set up a separate agent proxy and close it off from the internet if you want to avoid exposing the GLPI inventory to the internet when only conducting local inventory. (At the firewall level, you can prevent access to "https://my-glpi-server/marketplace/glpiinventory/" from the internet while maintaining local access, but you can't do that with "https://my-glpi-server/".)

The URL "https://my-glpi-server/front/inventory.php" returns an error, but you can still send inventory to "https://my-glpi-server/" without any issues.

With the plugin activated, "https://my-glpi-server/" should not receive inventories; they should only be sent to "https://my-glpi-server/marketplace/glpiinventory/" or "https://my-glpi-server/plugins/glpiinventory/".

To reproduce

With the plugin installed, configuring an agent with the URL: "https://my-glpi-server/" and sending an inventory, GLPI collects it

Expected behavior

The expected behavior would be that with the plugin activated, only inventory reception through the plugin's URLs would function.

"https://my-glpi-server/marketplace/glpiinventory/" or "https://my-glpi-server/plugins/glpiinventory/" and not "https://my-glpi-server/"

Operating system

Linux

GLPI Agent version

Other (See additional context below)

GLPI version

10.0.10

GLPIInventory plugin

1.3.4

Additional context

I want to have GLPI published to the internet, but not the inventory since I use it for local PCs, and in the event of using it for external ones, I would use a 'proxy agent'. This is because it's easier to update the 'proxy agent' than GLPI when there are vulnerabilities like 'CVE-2023-46727'. I understand that the native inventory and the inventory of the 'proxy agent' are different.