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 2 years ago

mpjaubry commented 2 years 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 2 years ago

I confirm this bug too.

derricksmith commented 2 years ago

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

mpjaubry commented 2 years 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;
}