derricksmith / phpsaml

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

Cant find metadata URL #140

Open Deisukey opened 1 year ago

Deisukey commented 1 year ago

Hi, I cant seem to find the metadata url needed by the IDP to retrieve the plugins information.

DonutsNL commented 1 year ago

Hi @Deisukey,

The url should be: GLPI_HOME/plugins/phpsaml/front/meta.php

Shigol1 commented 1 year ago

Hi @Deisukey,

The url should be: GLPI_HOME/plugins/phpsaml/front/meta.php

Hi @DonutsNL ,

Can you tell me why I get a blank page if I open GLPI_HOME/plugins/phpsaml/front/meta.php

All data is filled in GLPI_HOME/plugins/phpsaml/front/config.php

DonutsNL commented 1 year ago

Blank pages are caused by exceptions. Please review the error logging. If i find the time i will have a look at meta as well. Its a file i have not touched yet. Rgrds.

Shigol1 commented 1 year ago

Blank pages are caused by exceptions. Please review the error logging. If i find the time i will have a look at meta as well. Its a file i have not touched yet. Rgrds.

@DonutsNL

Found out that there is no /php saml/lib/php-saml/settings.php file. If you create from settings_example.php, then meta.php starts displaying the information that is filled in this file. But ADFS won't accept it...

The plugin is configurable in /php saml/lib/php-saml/settings.php not the plugin's GUI?

Logs need to watch the web server?

DonutsNL commented 1 year ago

Yeah, phpsaml doesnt use a filebased config but a database config instead. I have rewritten the meta.php to use the configuration thats in the database.

Try replacing the code in meta.php with this. It should populate the meta with the correct information:

include ('../../../inc/includes.php');

use OneLogin\Saml2\Metadata;

// This is still problematic on errors. header('Content-Type: text/xml'); $config = PluginPhpsamlPhpsaml::getSettings();

$samlMetadata = Metadata::builder($config['sp'], $config['security']['authnRequestsSigned'], false); echo $samlMetadata;

This should result in:

image

DonutsNL commented 1 year ago

Also see: https://github.com/DonutsNL/phpsaml/blob/master/front/meta.php

Shigol1 commented 1 year ago

Yeah, phpsaml doesnt use a filebased config but a database config instead. I have rewritten the meta.php to use the configuration thats in the database.

Try replacing the code in meta.php with this. It should populate the meta with the correct information:

include ('../../../inc/includes.php');

use OneLogin\Saml2\Metadata;

// This is still problematic on errors. header('Content-Type: text/xml'); $config = PluginPhpsamlPhpsaml::getSettings();

$samlMetadata = Metadata::builder($config['sp'], $config['security']['authnRequestsSigned'], false); echo $samlMetadata;

This should result in:

image

Sorry, but the metadata is still not displayed... Does this plugin work with On-Premise ADFS?