vivekrajenderan / simplesamlphp

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

Include add_candidate option to smartattributes:SmartID to skip prepending candidate field #605

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The AWS SAML gateway expects a 'RoleSessionName' attribute limited to 32 chars 
with limited special characters. Even using ':' characters causes an issue. 
This has been lodged as a bug with AWS.

Regardless of the AWS bug, I see value in being able to skip prepending the 
candidate field name when using the smartID filter. Working patch attached.

Usage:

                60 => array(
                        'class' => 'smartattributes:SmartID',
                'candidates' => array('uid', 'krbPrincipalName', 'mail'),
                'id_attribute' => 'https://aws.amazon.com/SAML/Attributes/RoleSessionName',
                'add_authority' => false,
                'add_candidate' => false

Original issue reported on code.google.com by mark.ter...@gmail.com on 10 Dec 2013 at 3:18

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Mark,

I see no reason to not include your suggested improvement. However, there's a 
bug in your patch which adds a colon no matter if there's the candidate 
attribute name or not. I've made the changes (and fixed the bug) and updated 
the documentation to include the new option (and fix a lot of typos, by the 
way).

Everything is now available in trunk, r3318.

Thanks for the patch and the suggestion!

Original comment by jaim...@gmail.com on 6 Jan 2014 at 8:14

GoogleCodeExporter commented 9 years ago
Thanks!

Original comment by mark.ter...@gmail.com on 7 Jan 2014 at 10:44