Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
de:aai:mfa_mit_passwd_spnego_first [2023/12/31 14:26] – angelegt Wolfgang Pempede:aai:mfa_mit_passwd_spnego_first [2024/01/10 21:08] (aktuell) Wolfgang Pempe
Zeile 1: Zeile 1:
-====== MFA mit fudiscr und wahlweise Password/SPNEGO als ersten Faktor ====== +====== MFA mit fudiscr und wahlweise Password/SPNEGO als erstem Faktor ====== 
-([[user:hofmann_fu-berlin.de|zurück zur fudiscr-Seite]])+([[de:shibidp:plugin-fudiscr|zurück zur fudiscr-Seite]]) 
 + 
 +<callout type="danger" title="Wichtiger Hinweis"> 
 +Die folgende Anleitung setzt voraus, dass Kerberos-Login bzw. SPNEGO gemäß der [[https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1265631622/SPNEGOAuthnConfiguration|Anleitung im Shibboleth-Wiki]] als Extended Flow des Password Login Flows eingerichtet wurde.  
 +</callout> 
 + 
 +==== SPNEGO als eigenständiger Flow ==== 
 +Damit authn/SPNEGO als unabhängiger, eigenständiger Flow angesprochen werden kann, muss zunächst die Referenz als Extended Flow in der authn/Password-Konfiguration entfernt oder zumindest auskommentiert werden: 
 + 
 +<file xml ./conf/authn/password-authn-config.xml> 
 +    <!-- 
 +    <bean id="shibboleth.authn.Password.ExtendedFlows" class="java.lang.String" c:_0="SPNEGO" /> 
 +    <util:list id="shibboleth.authn.Password.ExtendedFlowParameters"> 
 +        <value>_shib_idp_SPNEGO_enable_autologin</value> 
 +    </util:list> 
 +    --> 
 +</file> 
 + 
 +In ''./conf/authn/authn-event-flow.xml'' müssen folgende Einträge ergänzt werden: 
 + 
 +<file xml ./conf/authn/authn-events-flow.xml> 
 +    <!-- ... --> 
 +    <end-state id="SPNEGO" /> 
 +    <global-transitions> 
 +        <transition on="SPNEGO" to="SPNEGO" /> 
 +        <transition on="#{!'proceed'.equals(currentEvent.id)}" to="InvalidEvent" /> 
 +    </global-transitions> 
 +    <!-- ... --> 
 +</file> 
 + 
 +Weiterhin muss der SPNEGO-Button im Login-Template überarbeitet werden (mensch beachte die eventId). Gemeinsam mit dem Username/Password-Button sieht dies dann folgendermaßen aus: 
 + 
 +<file xml ./views/login.vm> 
 +    <!-- ... --> 
 +    <div class="grid"> 
 +        <div class="grid-item"> 
 +          <button type="submit" name="_eventId_proceed" 
 +             onClick="this.childNodes[0].nodeValue='#springMessageText("idp.login.pleasewait", "Logging in, please wait...")'"> 
 +             #springMessageText("idp.login.login", "Login"
 +          </button> 
 +        </div> 
 +        <div class="grid-item"> 
 +          <button type="submit" name="_eventId_SPNEGO"> 
 +             #springMessageText("idp.login.SPNEGO", "One-Click Kerberos Login"
 +          </button> 
 +        </div> 
 +    </div> 
 +    <!-- ... --> 
 +</file>   
 + 
 +authn/SPNEGO erwartet als eigenständiger Flow, dass Autologin aktiviert ist (um es dann zu deaktivieren). Dies lässt sich über folgenden Parameter bewerkstelligen: 
 + 
 +<file properties ./conf/authn/authn.properties> 
 +idp.authn.SPNEGO.enforceRun = true 
 +</file> 
 + 
 +\\ 
 + 
 +==== Spezifische fudiscr-MFA-Konfiguration ==== 
 + 
 +Zunächst in die entsprechende Transition Map definieren: 
 + 
 +<file xml ./conf/authn/mfa-authn-config.xml> 
 +    <!-- ... --> 
 +    <util:map id="shibboleth.authn.MFA.TransitionMap"> 
 +        <entry key=""> 
 +            <bean parent="shibboleth.authn.MFA.Transition" p:nextFlow="authn/Password"/> 
 +        </entry> 
 +        <entry key="authn/Password"> 
 +            <bean parent="shibboleth.authn.MFA.Transition"> 
 +                <property name="nextFlowStrategyMap"> 
 +                    <map> 
 +                        <entry key="SPNEGO" value="authn/SPNEGO" /> 
 +                        <entry key="proceed" value-ref="checkSecondFactor" /> 
 +                    </map> 
 +                </property> 
 +            </bean> 
 +        </entry> 
 +        <entry key="authn/SPNEGO"> 
 +            <bean parent="shibboleth.authn.MFA.Transition"> 
 +                <property name="nextFlowStrategyMap"> 
 +                    <map> 
 +                        <entry key="InvalidCredentials" value="authn/Password" /> 
 +                        <entry key="proceed" value-ref="checkSecondFactor" /> 
 +                    </map> 
 +                </property> 
 +            </bean> 
 +        </entry> 
 +    </util:map> 
 +    <!-- ... --> 
 +</file> 
 + 
 +Die Liste der supported Principals um den entsprechenden Kerberos-Eintrag erweitern: 
 +<file properties ./conf/authn/authn.properties> 
 +idp.authn.MFA.supportedPrincipals = \ 
 +    saml2/urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocol,
 +    saml2/urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport,
 +    saml2/urn:oasis:names:tc:SAML:2.0:ac:classes:Password,
 +    saml2/urn:oasis:names:tc:SAML:2.0:ac:classes:Kerberos,
 +    saml2/urn:de:zedat:fudis:SAML:2.0:ac:classes:CR 
 +</file> 
 + 
 +Falls für die weitere Verarbeitung im IdP die User Id ohne Realm benötigt wird (entsprechende Transformationen in der c14n-Config vorausgesetzt), gilt es zu verhindern, dass der MFA-Flow mit zwei unterschiedlichen Usernames bzw. "Username Principals" arbeitet - einmal mit, einmal ohne Realm. Daher muss fudiscr daran gehindert werden, die User Id aus der Authentisierung mit dem zweiten Faktor weiter zu verarbeiten: 
 + 
 +<file properties ./conf/authn/fudiscr.properties> 
 +fudiscr.result_with_username_principal=shibboleth.Conditions.FALSE 
 +</file> 
 + 
 +Sowie in ''./conf/c14n/subject-c14n.xml'' in der Liste der ''PostLoginSubjectCanonicalizationFlows'' nach ''<ref bean="c14n/simple" />'' die Referenz ''<ref bean="c14n/fudiscr" />'' einfügen:  
 + 
 +<file xml ./conf/c14n/subject-c14n.xml> 
 +    <!-- ... --> 
 +    <util:list id="shibboleth.PostLoginSubjectCanonicalizationFlows"> 
 +        <!-- was auch immer sonst hier steht --> 
 +        <ref bean="c14n/x500" /> 
 +        <ref bean="c14n/simple" /> 
 +        <ref bean="c14n/fudiscr" /> 
 +    </util:list> 
 +    <!-- ... --> 
 +</file> 
 + 
 +Analog zu ''idp.authn.Password.reuseCondition'' sollte auch die Condition für ''idp.authn.SPNEGO.reuseCondition'' gesetzt werden, also z.B. 
 + 
 +<file properties ./conf/authn/authn.properties> 
 +idp.authn.MFA.reuseCondition=shibboleth.Conditions.FALSE 
 +idp.authn.Password.reuseCondition=shibboleth.Conditions.TRUE 
 +idp.authn.SPNEGO.reuseCondition=shibboleth.Conditions.TRUE 
 +idp.authn.fudiscr.reuseCondition=shibboleth.Conditions.FALSE 
 +</file> 
 + 
 +{{tag>2FA MFA Zwei-Faktor-Authentifizierung Mehr-Faktor-Authentifizierung Mehrfaktorauthentifizierung idp4 spnego}}
  • Zuletzt geändert: vor 5 Monaten