leuzimba / simplesamlphp

Automatically exported from code.google.com/p/simplesamlphp
Other
0 stars 0 forks source link

MDUI elements not displayed in SP metadata #537

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

https://<host>/simplesaml/module.php/saml/sp/metadata.php/default-sp doesn't 
show MDUI elements, no do any of the plugins like aggregator or aggregator2.

What is the expected output? What do you see instead?

MDUI elements added to authsources.php (or saml20-sp-remote) should show up, 
they don't

What version of the product are you using? On what operating system?

1.10.0, Ubuntu

Original issue reported on code.google.com by wiereng...@gmail.com on 21 Feb 2013 at 11:25

GoogleCodeExporter commented 8 years ago
Hi Klaas,

I've found some time to implement this. Can you apply the following patch and 
tell me if it works as expected?

Original comment by jaim...@gmail.com on 25 Feb 2013 at 1:28

Attachments:

GoogleCodeExporter commented 8 years ago
Just applied the patch to our WAYF install (which is r3200) and configured 
authsources.php as follows:

    'default-sp' => array(
        'saml:SP',

        'UIInfo' => array(
            'DisplayName' => array(
                'en' => 'TERENA Service Provider Proxy',
            ),
            'Description' => array(
                'en' => 'A Service Provider Proxy for all TERENA Federated Services',
            ),
            'InformationURL' => array(
                'en' => 'https://confluence.terena.org/display/aai/Service+Provider+Proxy',
            ),
            'PrivacyStatementURL' => array(
                'en' => 'http://www.terena.org/p3p',
            ),
            'Logo' => array(
                'en' => array(
                    'height' => '94',
                    'width' => '350',
                    'url' => 'https://www.terena.org/gfx/terena_logo_slogan_rgb-350x97.png',
                ),
            ),
        ),
etc etc

It appears to work OK:

https://login.terena.org/wayf/module.php/saml/sp/metadata.php/default-sp?output=
xhtml

Thanks :-)

Original comment by vis...@terena.org on 25 Feb 2013 at 4:36

GoogleCodeExporter commented 8 years ago
Good!

I committed the patch in r3226. It involved quite a lot of changes, since I 
modified metadata.php to use SAMLBuilder class instead of building the metadata 
itself. I've been careful to include all the features that were supported, but 
there might be some side effects in unusual configurations. Please let me know 
if you notice any problems.

Original comment by jaim...@gmail.com on 26 Feb 2013 at 11:28

GoogleCodeExporter commented 8 years ago
Something is wrong with this fix. The $description variable is not defined here:

https://code.google.com/p/simplesamlphp/source/browse/trunk/modules/saml/www/sp/
metadata.php?r=3229#139

Also this line: 
https://code.google.com/p/simplesamlphp/source/browse/trunk/modules/saml/www/sp/
metadata.php?r=3229#121 looks strange. Why would the 'name' not be included 
when there is no list of attributes? Or is there always a list of attributes?

Original comment by mooknarf@gmail.com on 3 Apr 2013 at 8:41

GoogleCodeExporter commented 8 years ago
Fix for the description issue attached.

Original comment by mooknarf@gmail.com on 3 Apr 2013 at 8:47

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Yes, that's definitely a bug. Side effects of refactoring, I guess.

Regarding the code with the strange if, the reason for that is not to exclude 
the name when there's no attributes, but to make sure there's a name when 
adding an AttributeConsumingService, as it is mandatory. Anyway, I realize that 
the code is pretty messy after the refactoring, so I've tried to make it a bit 
more legible.

Everything is now in the repository, r3231.

Many thanks for reporting!

Original comment by jaim...@gmail.com on 3 Apr 2013 at 11:29