phpsaml icon indicating copy to clipboard operation
phpsaml copied to clipboard

Problem since upgrade GLPI 10.0.12

Open Had3s99 opened this issue 1 year ago • 19 comments

Hello,

The SSO doesn't work since i've upgraded to 10.0.12 i'm redirect on blank page GLPI_ROOT/plugins/phpsaml/front/acs.php

In apache i've this warning :

PHP Warning: Undefined global variable $_POST in GLPI_ROOT/inc/includes.php on line 102, referer: https://login.microsoftonline.com/

Can you help me please ?

Thanks,

Kévin.

Had3s99 avatar Feb 06 '24 08:02 Had3s99

I don't understand why you link #163 which is closed and the problem is not solved ? Or do you think the solution is to w8 the new version from @DonutsNL ?

SeemsLikeIt avatar Feb 20 '24 13:02 SeemsLikeIt

Hi @SeemsLikeIt,

This issue is mentioned in the 'linked' issue. The 'linked' issue in which this issue is mentioned is closed, not this one.

I have been working on a new version and have not payed to much attention to this one.

Please use the latest version from my repo and report any issues you encounter. I will try to review them in a timely order and fix issues that are actually caused by the code.

rgrds,

DonutsNL avatar Feb 20 '24 14:02 DonutsNL

Hi @DonutsNL, Thank you for the followup, i was trying your v2 ... I try this morning with your v1 and you can find my feedback below

Drop old table plugins_phpsaml* for clean install Put phpsaml in markeplace directory which seems to be the new model, can't install from webui if plugins is not in markeplace directory

files/_log/php-errors.log

[2024-02-21 08:49:28] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() front/marketplace.php:36 include() public/index.php:82 require()

[2024-02-21 08:49:28] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() front/marketplace.php:43 Plugin->checkStates() public/index.php:82 require()

[2024-02-21 08:49:28] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() front/cron.php:44 include() public/index.php:82 require()

[2024-02-21 08:49:29] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/common.tabs.php:46 include() public/index.php:82 require()

[2024-02-21 08:49:29] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() src/Marketplace/View.php:216 Plugin->init() src/Marketplace/View.php:124 Glpi\Marketplace\View::installed() src/CommonGLPI.php:694 Glpi\Marketplace\View::displayTabContentForItem() ajax/common.tabs.php:120 CommonGLPI::displayStandardTab() public/index.php:82 require()

[2024-02-21 08:49:31] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/marketplace.php:62 include() public/index.php:82 require()

[2024-02-21 08:50:31] glpiphplog.WARNING: *** PHP User Warning (512): Usage of signed integers in primary or foreign keys is discouraged, please use unsigned integers instead in glpi_plugin_phpsaml_configs.id. in /var/www/html/glpi/src/DBmysql.php at line 2180 Backtrace : src/DBmysql.php:2180 trigger_error() src/DBmysql.php:394 DBmysql->checkForDeprecatedTableOptions() src/DBmysql.php:352 DBmysql->doQuery() marketplace/phpsaml/inc/config.class.php:1242 DBmysql->query() marketplace/phpsaml/hook.php:58 PluginPhpsamlConfig::install() src/Plugin.php:922 plugin_phpsaml_install() : Plugin->install() src/Marketplace/Controller.php:546 call_user_func() src/Marketplace/Controller.php:436 Glpi\Marketplace\Controller->setPluginState() ajax/marketplace.php:83 Glpi\Marketplace\Controller->installPlugin() public/index.php:82 require()

Only Warning nothing seems broken, but i can't configure plugin by default cause link to plugins directory copy phpsaml in plugins directory So i have phpsaml in markeplace and plugins directory and i can configure the plugin It seems you've hardened the configuration and i need to review my idp configuration.

Bonus for my case : Logout url seems mandatory in your configuration, or i don't want my users to logout from an application, they don't understand it's a global logout and we use MFA on our SSO, so we've got lot of complains when they need to logon mor than once a day.

Have a nice day

SeemsLikeIt avatar Feb 21 '24 08:02 SeemsLikeIt

Hi @SeemsLikeIt

The original plugin was not written for the marketplace, because of this i can guarantee that it will not function correctly.

I know there are hard coded paths that point to the plugins directory. That i decided not to fix anymore.

Also GLPI will prob not handle the same plugin in both marketplace and plugins. It will most prob cause naming conflicts when GLPI tries to register the plugin details.

My advice would be, uninstall and remove all glpisaml stuff, reinstall the latest version in the plugins directory (folder plugins/phpsaml/*) and reinstall the plugin using the ui.

Make sure there is only 1 version in the plugins directory and make sure it is not present in the marketplace directory.

In regards to my v2 its a wip. In regards to the logout url, try pointing it to gpli root (not tested, but it might work)

Rgrds,

DonutsNL avatar Feb 21 '24 08:02 DonutsNL

Hi @DonutsNL, I've reinstall the plugin in glpi/plugins after dropping table [2024-02-21 14:17:08] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() src/Api/API.php:148 include_once() src/Api/APIRest.php:149 Glpi\Api\API->initApi() apirest.php:57 Glpi\Api\APIRest->call() public/index.php:82 require()

[2024-02-21 14:17:49] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() index.php:87 include() public/index.php:82 require()

[2024-02-21 14:17:49] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() front/central.php:43 include() public/index.php:82 require()

[2024-02-21 14:17:50] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() front/cron.php:44 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/common.tabs.php:46 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:52] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:56] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() front/central.php:43 include() public/index.php:82 require()

[2024-02-21 14:17:56] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/common.tabs.php:46 include() public/index.php:82 require()

[2024-02-21 14:17:56] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:56] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:56] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:56] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:56] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:56] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:57] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:57] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/dashboard.php:38 include() public/index.php:82 require()

[2024-02-21 14:17:58] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() front/marketplace.php:36 include() public/index.php:82 require()

[2024-02-21 14:17:58] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() front/marketplace.php:43 Plugin->checkStates() public/index.php:82 require()

[2024-02-21 14:17:58] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/common.tabs.php:46 include() public/index.php:82 require()

[2024-02-21 14:17:58] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() src/Marketplace/View.php:216 Plugin->init() src/Marketplace/View.php:124 Glpi\Marketplace\View::installed() src/CommonGLPI.php:694 Glpi\Marketplace\View::displayTabContentForItem() ajax/common.tabs.php:120 CommonGLPI::displayStandardTab() public/index.php:82 require()

[2024-02-21 14:18:00] glpiphplog.WARNING: *** PHP User Warning (512): Unable to load plugin "phpsaml" information. in /var/www/html/glpi/src/Plugin.php at line 626 Backtrace : src/Plugin.php:626 trigger_error() src/Plugin.php:505 Plugin->checkPluginState() src/Plugin.php:246 Plugin->checkStates() inc/includes.php:98 Plugin->init() ajax/marketplace.php:62 include() public/index.php:82 require()

[2024-02-21 14:22:31] glpiphplog.WARNING: *** PHP User Warning (512): Usage of signed integers in primary or foreign keys is discouraged, please use unsigned integers instead in glpi_plugin_phpsaml_configs.id. in /var/www/html/glpi/src/DBmysql.php at line 2180 Backtrace : src/DBmysql.php:2180 trigger_error() src/DBmysql.php:394 DBmysql->checkForDeprecatedTableOptions() src/DBmysql.php:352 DBmysql->doQuery() plugins/phpsaml/inc/config.class.php:1242 DBmysql->query() plugins/phpsaml/hook.php:58 PluginPhpsamlConfig::install() src/Plugin.php:922 plugin_phpsaml_install() front/plugin.form.php:51 Plugin->install() public/index.php:82 require()

Some Warning but plugin is installed and can be configured. My idp return an error like "error invalid lenght", so i've enable compression in const from config.inc.php and it's working. I've tried to comment out the mandatory field for logout but for the moment it's not a win. Regards

SeemsLikeIt avatar Feb 22 '24 07:02 SeemsLikeIt

Just wondering, are you using php8 or a previous version?

DonutsNL avatar Feb 22 '24 07:02 DonutsNL

php8.1 on ubuntu jammy

SeemsLikeIt avatar Feb 22 '24 07:02 SeemsLikeIt

I've created a pull request for this issue. Until it is merged, you can solve the issue by adding

$_POST = array();

to the file GLPI_ROOT/plugins/phpsaml/front/acs.php at line 11, compare f8a04ae2a742b2c4a9562068724ccb3177d20422.

jeldriks avatar Feb 27 '24 11:02 jeldriks

Hi @jeldriks,

Firstoff, thank you for going through all the trouble of creating a fork, correcting the code and creating a pull request.

But.. Are you sure you are using the latest version in my repository? that you can find here: https://github.com/DonutsNL/phpsaml/blob/master/front/acs.php

Because your (correct) fix has been implemented for some time now as you can see in the linked repo where: $_POST = []; is the square bracket array syntax for $_POST = array();.

Sadly Derrick has been offline for a long time now and I dont have the rights to merge pull requests into his repository. As a work-around i have been maintaining en fixing a fork of the code in my personel repository.

If you like to help, all help is welcome in the next iteration im writing here: https://github.com/DonutsNL/glpisaml.

rgrds,

DonutsNL avatar Feb 27 '24 12:02 DonutsNL

Hi @DonutsNL, thanks for pointing that out! I wasn't aware that you had already fixed this issue in your fork of this repo. Seems like I didn't click on the second link in https://github.com/derricksmith/phpsaml/issues/164#issuecomment-1954312662, which would've made things clear.

After uninstalling the old version of the plugin, the installation and re-configuration of the plugin based on your fork worked well. The only issue I've run into so far is that the login-button no longer works with Microsoft: "AADSTS750055: SAML message was not properly DEFLATE-encoded."

It's not a big deal for me, as an IdP-initiated login still works.

Your new iteration looks great, I'll have a look.

Thanks for your work! 👍 (closing my PR now)

jeldriks avatar Feb 27 '24 13:02 jeldriks

You can toggle deflate in the class property located in config.class.php.

Set both request and response compression to true.

DonutsNL avatar Feb 27 '24 13:02 DonutsNL

Hello. @DonutsNL Thank you for the work/effort your are doing!! In my case:

  • Deleted the old folder (plugins/phpsaml), removed any tables related to the plugin.
  • Downloaded your version from https://github.com/DonutsNL/phpsaml
  • Placed at plugins/phpsaml
  • Installed using Plugins GLPI page
  • Configured it and it works!!!! Just using local ADFS authentication, no Azure...

Just one question: I have this message -> No valid Ipd certificate details provided or available What is it??

andrepetinga avatar Mar 04 '24 15:03 andrepetinga

Hi @andrepetinga ,

Im glad to learn the current version is working for you.

'No valid Ipd certificate details provided or available - What is it??'

My version actually tries to decompile the certificate using openssl and validate the certificate. There are some conditions in which openssl (for example if openssl was not included when php was compiled) is not able to decompile the certificate string. In these cases the reported warning is printed.

The current handling is rather crude and i am working to improve it in the rewrite of the plugin. image

DonutsNL avatar Mar 04 '24 15:03 DonutsNL

Hello @DonutsNL. Just noticed a PHP Warning in file php-errors.log

image

What does it mean? I'm still able to login. No problem there...

andrepetinga avatar Mar 12 '24 11:03 andrepetinga

Its safe to ignore. The property X_FORWARDED isnt available because your installation is not behind a proxy. As the sourcecode will show, this part of the code is flagged being problematic.

DonutsNL avatar Mar 13 '24 07:03 DonutsNL

@DonutsNL Hi! I'm trying to get your fixed plugin to work, but face some issue..

  1. When I install and configure plugin it create configuration with ID. but at /plugins/phpsaml/front/config.form.php?id=1 I get 404 notfound, and at /plugins/phpsaml/front/config.php is empty page, so I can re-check config only at database directly.. Is it ok?
  2. Anyway, I configure plugin and it doesn't work - there is an ADFS error - System.UriFormatException with empty URI

It's FYI, I'll try to implement @jeldriks 's fix, thanks for your work anyway (new iteration looks realy great!)

avelor avatar Mar 25 '24 15:03 avelor

Hi @avelor

Make sure you use the latest version from my repository here: https://github.com/DonutsNL/phpsaml

Also make sure you 'reinstall' the plugin meaning: make sure the old version is removed completely, then copy the version linked above into the /plugins/phpsaml/ folder and reinstall it using the glpi plugin admin.

Then reconfigure the params in the configuration and test the sso.

If it still doesnt work, please share any errors reported in the GLPI_HOME/files/_logs/php_errors.log

Hope this helps. Rgrds,

DonutsNL avatar Mar 26 '24 08:03 DonutsNL

Yes, I did this - remove old version (deinstall at web ui, remove folder, clean with web ui, check database), git clone your repository, copy folder, install from web ui. for now I add $_POST = array(); at this version and it works. I'll try to find php errors (this log file is pretty huge in my installation) and I'll share it if find any. thank you!

avelor avatar Mar 26 '24 09:03 avelor

Hi @avelor,

If you are using my latest version, the POST fix is allready implemented (as the screenshot shows). Where [] is the shorthand for array();. In other words, you should not need to change anything. If you find any issues, let me know.

image

rgrds,

DonutsNL avatar Mar 26 '24 09:03 DonutsNL