Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
de:aai:mfa_mit_passwd_spnego_first [2023/12/31 15:03] 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 erstem 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"> <callout type="danger" title="Wichtiger Hinweis">
Zeile 12: Zeile 12:
     <!--     <!--
     <bean id="shibboleth.authn.Password.ExtendedFlows" class="java.lang.String" c:_0="SPNEGO" />     <bean id="shibboleth.authn.Password.ExtendedFlows" class="java.lang.String" c:_0="SPNEGO" />
-      
     <util:list id="shibboleth.authn.Password.ExtendedFlowParameters">     <util:list id="shibboleth.authn.Password.ExtendedFlowParameters">
         <value>_shib_idp_SPNEGO_enable_autologin</value>         <value>_shib_idp_SPNEGO_enable_autologin</value>
Zeile 19: Zeile 18:
 </file> </file>
  
-Weiterhin muss der SPNEGO-Button im Login-Template überarbeitet werden. Gemeinsam mit dem Username/Password-Button sieht dies dann folgendermaßen aus:+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> <file xml ./views/login.vm>
 +    <!-- ... -->
     <div class="grid">     <div class="grid">
         <div class="grid-item">         <div class="grid-item">
-            <button type="submit" name="_eventId_proceed" +          <button type="submit" name="_eventId_proceed" 
-                onClick="this.childNodes[0].nodeValue='#springMessageText("idp.login.pleasewait", "Logging in, please wait...")'" +             onClick="this.childNodes[0].nodeValue='#springMessageText("idp.login.pleasewait", "Logging in, please wait...")'"> 
-                >#springMessageText("idp.login.login", "Login")</button>+             #springMessageText("idp.login.login", "Login") 
 +          </button>
         </div>         </div>
         <div class="grid-item">         <div class="grid-item">
           <button type="submit" name="_eventId_SPNEGO">           <button type="submit" name="_eventId_SPNEGO">
-            #springMessageText("idp.login.SPNEGO", "One-Click Kerberos Login")+             #springMessageText("idp.login.SPNEGO", "One-Click Kerberos Login")
           </button>           </button>
         </div>         </div>
     </div>     </div>
 +    <!-- ... -->
 </file>   </file>  
  
-Um innerhalb des MFA-Flows aufgerufen werden zu können, müssen in ''./conf/authn/authn-event-flow.xml'' folgende Einträge ergänzt werden:+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 xml ./conf/authn/authn-events-flow.xml+<file properties ./conf/authn/authn.properties
-    <end-state id="SPNEGO" /> +idp.authn.SPNEGO.enforceRun true
-    <global-transitions> +
-        <transition on="SPNEGO" to="SPNEGO" /> +
-        <transition on="#{!'proceed'.equals(currentEvent.id)}" to="InvalidEvent" /> +
-    </global-transitions>+
 </file> </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}} {{tag>2FA MFA Zwei-Faktor-Authentifizierung Mehr-Faktor-Authentifizierung Mehrfaktorauthentifizierung idp4 spnego}}
  • Zuletzt geändert: vor 5 Monaten