derricksmith / phpsaml

GLPI Plugin - SAML integration using the Onelogin SAML Library
MIT License
32 stars 24 forks source link

The GLPI Agent for assets inventory doesn't work when plugin is enforced #110

Open mpjaubry opened 1 year ago

mpjaubry commented 1 year ago

When the plugin mode is enforced, the GLPI agent (at least on Windows) will fail with the error (with Azure in this case):

[info] sending prolog request to server0 [error] [http client] unexpected content, starting with:

The plugin redirects the request for the SAML authentication but for the inventory it should not be redirected to the SAML provider.

cyrilballagny commented 1 year ago

I confirm this bug too.

derricksmith commented 1 year ago

Can you confirm the path GLPI Agent is attempting to access?

mpjaubry commented 1 year ago

Yes, "front/inventory.php" is used by the GLPI Agent.

derricksmith commented 1 year ago

I'll add this exclusion in version 1.3.0.

You can temporarily fix by adding the exclusion to setup.php. You'll see other examples in the file.

if (strpos($_SERVER['REQUEST_URI'], 'apirest.php') !== false){
    return;
}

if (strpos($_SERVER['REQUEST_URI'], 'front/acs.php') !== false || strpos($_SERVER['REQUEST_URI'], 'front\acs.php') !== false){
    return;
}