[JIRA] (JOIDC-132) Improve customization methods for the configuration flow

Henri Mikkonen (Jira) jira at shibboleth.atlassian.net
Fri Nov 4 13:05:31 UTC 2022


Henri Mikkonen ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A1614c4a5-c89e-4edc-9421-990bd6ea85fd ) *commented* on JOIDC-132 ( https://shibboleth.atlassian.net/browse/JOIDC-132?atlOrigin=eyJpIjoiNDcyZmQwNDZiYjMyNGUzNWIzZTc4YmIwZjg4ZTM2NGIiLCJwIjoiaiJ9 )

Re: Improve customization methods for the configuration flow ( https://shibboleth.atlassian.net/browse/JOIDC-132?atlOrigin=eyJpIjoiNDcyZmQwNDZiYjMyNGUzNWIzZTc4YmIwZjg4ZTM2NGIiLCJwIjoiaiJ9 )

Added support for new property idp.oidc.discovery.resolver.values. It can be used for wiring a custom bean for configuring the map of dynamic claims for the configuration flow response.

New class net.shibboleth.idp.plugin.oidc.op.metadata.impl.FunctionMetadataValueResolver helps to set static values via Java Functions.

For example, when idp.oidc.discovery.resolver.values = CustomConfigurationValues , the following bean adds a custom JSON attribute *STATIC_TEST_ATTRIBUTE* with value *TestValue* to the JSON response of the configuration flow:

   <bean id="CustomConfigurationValues" parent="shibboleth.oidc.discovery.DefaultDynamicValueResolvers"
       class="org.springframework.beans.factory.config.MapFactoryBean">
       <property name="sourceMap">
           <map merge="true">
               <entry key="STATIC_TEST_ATTRIBUTE">
                   <bean class="net.shibboleth.idp.plugin.oidc.op.metadata.impl.FunctionMetadataValueResolver">
                       <property name="resolverFunction">
                           <bean parent="shibboleth.Functions.Constant" c:target="TestValue"/>
                       </property>
                   </bean>
               </entry>
           </map>
       </property>
   </bean>

As the bean parent is shibboleth.oidc.discovery.DefaultDynamicValueResolvers and map merge="true" is set, the custom claim is merged to the default map of values.

( https://shibboleth.atlassian.net/browse/JOIDC-132#add-comment?atlOrigin=eyJpIjoiNDcyZmQwNDZiYjMyNGUzNWIzZTc4YmIwZjg4ZTM2NGIiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/JOIDC-132#add-comment?atlOrigin=eyJpIjoiNDcyZmQwNDZiYjMyNGUzNWIzZTc4YmIwZjg4ZTM2NGIiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:21ade21 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20221104/2cc32bab/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-9d06f79d-2e9a-4bc6-a5e8-003d560db3c8
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221104/2cc32bab/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-8344109c-9604-485c-b5ca-d1830638d236
Type: image/png
Size: 457 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221104/2cc32bab/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-3be15164-2e75-475b-8146-220937306983
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221104/2cc32bab/attachment-0005.png>


More information about the commits mailing list