BUNDBITBK-4339
This commit is contained in:
parent
90b50d4367
commit
26bb8332f0
|
@ -9,7 +9,7 @@ if (inargs['recovery'] != null && inargs['recovery'] == 'recovery' ) {
|
|||
def sessionKeySet = new HashSet(session.keySet())
|
||||
sessionKeySet.each { key ->
|
||||
if ( key ==~ /.*Recovery_redirectAgovMe-session-participants.*/ ) {
|
||||
LOG.info("Deleted session attribute '${key}'")
|
||||
LOG.debug("Deleted session attribute '${key}'")
|
||||
s.removeAttribute(key)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
<property name="detaillevel.credential" value="HIGH"/>
|
||||
</AuthState>
|
||||
<AuthState name="${state.entry}_verifyUser" class="ch.nevis.esauth.auth.states.scripting.ScriptState" final="false" resumeState="true">
|
||||
<ResultCond name="ok" next="${state.exit.1}"/>
|
||||
<ResultCond name="ok" next="${state.entry}_prepareRedirect"/>
|
||||
<ResultCond name="needCode" next="${state.entry}_IdmUserIdPasswordLogin"/>
|
||||
<ResultCond name="error" next="${state.failed}"/>
|
||||
<ResultCond name="alreadyInRecovery" next="${state.exit.3}"/>
|
||||
|
@ -230,14 +230,14 @@
|
|||
<property name="client.name" value="agov"/>
|
||||
</AuthState>
|
||||
<AuthState name="${state.entry}_codeVerified" class="ch.nevis.esauth.auth.states.standard.TransformAttributes" final="false" resumeState="false">
|
||||
<ResultCond name="default" next="${state.exit.1}"/>
|
||||
<ResultCond name="default" next="${state.entry}_prepareRedirect"/>
|
||||
<Response value="AUTH_CONTINUE"/>
|
||||
<property name="sess:agov.recovery.authenticatedWith" value="urn:qa.agov.ch:names:tc:authfactor:emailAndCode"/>
|
||||
<property name="sess:agov.recovery.codeStatus" value="verified"/>
|
||||
<property name="sess:agov.recovery.codeDetailStatus" value="n/a"/>
|
||||
</AuthState>
|
||||
<AuthState name="${state.entry}_codeSkipped" class="ch.nevis.esauth.auth.states.standard.TransformAttributes" final="false" resumeState="false">
|
||||
<ResultCond name="default" next="${state.exit.1}"/>
|
||||
<ResultCond name="default" next="${state.entry}_prepareRedirect"/>
|
||||
<Response value="AUTH_CONTINUE"/>
|
||||
<property name="sess:agov.recovery.codeStatus" value="skipped"/>
|
||||
<property name="${sess:agov.recovery.codeDetailStatus}==n/a?sess:agov.recovery.codeDetailStatus" value="directly skipped by user"/>
|
||||
|
@ -247,3 +247,11 @@
|
|||
<Response value="AUTH_CONTINUE"/>
|
||||
<property name="sess:agov.recovery.codeDetailStatus" value="${notes:lasterrorinfo} (${notes:lasterror})"/>
|
||||
</AuthState>
|
||||
<AuthState name="${state.entry}_prepareRedirect" class="ch.nevis.esauth.auth.states.scripting.ScriptState" final="false" resumeState="true">
|
||||
<!-- acts as resumeState, if the user comes back from agov.me -->
|
||||
<ResultCond name="back" next="${state.entry}_IdmGetPropertiesStateTicket"/>
|
||||
<ResultCond name="redirect" next="${state.exit.1}"/>
|
||||
<Response value="AUTH_CONTINUE"/>
|
||||
<property name="scriptTraceGroup" value="Recovery"/>
|
||||
<property name="script" value="file:///var/opt/nevisauth/default/conf/recovery-prepareRedirect.groovy"/>
|
||||
</AuthState>
|
|
@ -0,0 +1,22 @@
|
|||
if (session['agov.recovery.redirectDone']) {
|
||||
// user navigated back from AGOV.me, go again for the code
|
||||
|
||||
// clean up SAML state first,
|
||||
// IdentityProviderState sets session attributes as follows
|
||||
// <IDP-State-Name>-session-participants.<SAML-RP-ISSUER> = <ACS-URL>
|
||||
// State name contains the name of the pattern 'Recovery_redirectAgovMe'
|
||||
def s = request.getAuthSession(true)
|
||||
def sessionKeySet = new HashSet(session.keySet())
|
||||
sessionKeySet.each { key ->
|
||||
if ( key ==~ /.*Recovery_redirectAgovMe-session-participants.*/ ) {
|
||||
LOG.debug("Deleted session attribute '${key}'")
|
||||
s.removeAttribute(key)
|
||||
}
|
||||
}
|
||||
s.removeAttribute('agov.recovery.redirectDone')
|
||||
response.setResult('back')
|
||||
} else {
|
||||
// redirect
|
||||
response.setSessionAttribute('agov.recovery.redirectDone', 'true')
|
||||
response.setResult('redirect')
|
||||
}
|
|
@ -16,7 +16,7 @@ def maxLoiRoleToCtxClssConvertorMap = [
|
|||
]
|
||||
|
||||
// https://docs.nevis.net/nevisidm/Developer-Guide/SOAP-Interface/Interface-specification/Value-types#enum-value-types
|
||||
def blockingCredentialStates = ['DISABLED', 'EXPIRED', 'LOCKED_TEMPORARY', 'LOCKED', 'ARCHIVED', 'RESET_CODE']
|
||||
def blockingCredentialStates = ['DISABLED', 'EXPIRED', 'LOCKED', 'ARCHIVED', 'RESET_CODE']
|
||||
|
||||
def getUserIdVerificationForRecovery(currentLoaRole) {
|
||||
// application is AGOV-AccountStatus
|
||||
|
|
|
@ -82,8 +82,9 @@ if (inargs['fidoUafDone'] == 'true' ||
|
|||
if (inargs['fallback'] == 'fallback') {
|
||||
response.setResult('fido2')
|
||||
}
|
||||
// dispatch to recovery
|
||||
if (inargs['fallback'] == 'recovery') {
|
||||
|
||||
// dispatch to recovery
|
||||
if (inargs['fallback'] == 'recovery') {
|
||||
response.addOutArg('nevis.transfer.destination', parameters.get('recoveryurl'))
|
||||
response.setStatus(ch.nevis.esauth.auth.engine.AuthResponse.AUTH_CONTINUE)
|
||||
response.setIsRedirectTransfer(true)
|
||||
|
|
Loading…
Reference in New Issue