Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
bgColorlightblue
titleExercise 5.3 - Advanced access-control configuration with context-check

The goal of this exercise is to configure the test_rp application to be only accessible for teppo2 user. Shibboleth IdP provides context-check interceptor for this purpose.

  1. Add context-check post authentication flow to the relying party configuration

    Code Block
    themeRDark
    titleSnippet of /opt/shibboleth-idp/conf/relying-party.xml
    collapsetrue
    ...
    
        <util:list id="shibboleth.RelyingPartyOverrides">
            <bean parent="RelyingPartyByName"  p:responderIdLookupStrategy-ref="profileResponderIdLookupFunction" c:relyingPartyIds="test_rp">
                <property name="profileConfigurations">
                    <list>
                        <bean parent="OIDC.SSO" p:postAuthenticationFlows="context-check"/>
                    </list>
                </property>
            </bean>
        </util:list>
    
    ...


  2. Edit /opt/shibboleth-idp/conf/intercept/context-check-intercept-config.xml for your needs. HINT! The existing file contains good basis, find out from attribute-resolver which is the username in your configuration.

    Code Block
    themeRDark
    titleHints, Tips and Result
    collapsetrue
    ...
    
    
        <bean id="shibboleth.context-check.Condition" parent="shibboleth.Conditions.AND">
            <constructor-arg>
                <list>
                    <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidates="#{{'test_rp'}}" />
                    <bean class="net.shibboleth.idp.profile.logic.SimpleAttributePredicate"
                            p:useUnfilteredAttributes="true">
                        <property name="attributeValueMap">
                            <map>
                                <entry key="uid">
                                    <list>
                                        <value>teppo2</value>
                                    </list>
                                </entry>
                            </map>
                        </property>
                    </bean>
                </list>
            </constructor-arg>
        </bean>
    
    
    ...


  3. Restart IDP service and try to access the test RP with teppo and teppo2 (same password). You can logout the user via /idp/profile/Logout -endpoint.

    Code Block
    themeRDark
    titleSnippet of /opt/shibboleth-idp/logs/idp-process.log
    collapsetrue
    ...
    2018-10-05 01:20:37,187 - INFO [Shibboleth-Audit.SSO:276] - 20181005T012037Z|AuthenticationRequest||test_rp|http://csc.fi/ns/profiles/oidc/sso/browser|https://192.168.0.150|||teppo|||||
    ...


...