Compare commits

..

5 Commits

Author SHA1 Message Date
haburger fd6690ec85 new configuration version 2025-09-10 13:20:23 +00:00
haburger ba48cbb253 new configuration version 2025-09-09 13:39:10 +00:00
haburger 9a98a657c2 new configuration version 2025-09-09 09:05:40 +00:00
haburger fae3a6e302 new configuration version 2025-09-08 16:07:42 +00:00
haburger d18a83bb2a new configuration version 2025-09-05 05:52:36 +00:00
3 changed files with 109 additions and 42 deletions

View File

@ -46,7 +46,7 @@ spec:
podDisruptionBudget: podDisruptionBudget:
maxUnavailable: "50%" maxUnavailable: "50%"
git: git:
tag: "r-5a1cf0f4c41794f3a56737201bbe9465e5fd25ab" tag: "r-53c09bd6632aebeda2b892197a01a8f7f185561d"
dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth" dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth"
credentials: "git-credentials" credentials: "git-credentials"
database: database:

View File

@ -950,52 +950,18 @@
<!-- source: pattern://92cb6d5256008a32f12ceb93 --> <!-- source: pattern://92cb6d5256008a32f12ceb93 -->
<property name="out.attribute.http://schemas.agov.ch/ws/2025/07/identity/claims/op/conversationId" value="${inctx:connection.HttpHeader.traceparent:^([0-9a-f]+)-([0-9a-f]+)-([0-9a-f]+)-([0-9a-f]+)$:$2}"/> <property name="out.attribute.http://schemas.agov.ch/ws/2025/07/identity/claims/op/conversationId" value="${inctx:connection.HttpHeader.traceparent:^([0-9a-f]+)-([0-9a-f]+)-([0-9a-f]+)-([0-9a-f]+)$:$2}"/>
</AuthState> </AuthState>
<AuthState name="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC" class="ch.nevis.esauth.auth.states.saml.IdentityProviderState" final="false" resumeState="true"> <AuthState name="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC" class="ch.nevis.esauth.auth.states.standard.ConditionalDispatcherState" final="false" resumeState="false">
<!-- source: pattern://bb9e7806a04578e0ad468829 --> <!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="IDP-initiated-ConcurrentLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Concurrent_Logout"/> <ResultCond name="default" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC_post"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 --> <!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="IDP-initiated-SingleLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/> <ResultCond name="useArtifact" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC_artifact"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="LogoutCompleted" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Logout_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="LogoutFailed" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Logout_Fail"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="SP-initiated-ConcurrentLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Concurrent_Logout"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="SP-initiated-SingleLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="authenticate:IDP-initiated-SSO" next="Auth_Realm_Main_IDP_RequestedRoleLevel"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="authenticate:SP-initiated-SSO" next="Auth_Realm_Main_IDP_RequestedRoleLevel"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="invalidAssertionConsumerUrl" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="ok" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="stepup:IDP-initiated-SSO" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Selector"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="stepup:SP-initiated-SSO" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Selector"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 --> <!-- source: pattern://bb9e7806a04578e0ad468829 -->
<Response value="AUTH_ERROR"> <Response value="AUTH_ERROR">
<!-- source: pattern://bb9e7806a04578e0ad468829 --> <!-- source: pattern://bb9e7806a04578e0ad468829 -->
<Gui name="saml_idp" label="title.saml.failed"> <Gui name="AuthErrorDialog"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<GuiElem name="lasterror" type="error" label="error.saml.failed"/>
</Gui>
</Response> </Response>
<propertyRef name="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 --> <!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.issuer" value="https://auth.agov-w.azure.adnovum.net/SAML2SEC/"/> <property name="condition:useArtifact" value="${sess:agov.idp.use.artifact:^true$}"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.binding" value="http-artifact"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.post.relayStateEncoding" value="HTML"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt" value="none"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt.keystoreref" value="EncryptionKeys"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt.keyobjectref" value="DefaultEncryptionKey"/>
</AuthState> </AuthState>
<AuthState name="Auth_Realm_Main_IDP_ReturnTimeoutButKeepSession" class="ch.nevis.esauth.auth.states.scripting.ScriptState" final="false" resumeState="true"> <AuthState name="Auth_Realm_Main_IDP_ReturnTimeoutButKeepSession" class="ch.nevis.esauth.auth.states.scripting.ScriptState" final="false" resumeState="true">
<!-- source: pattern://826166d230a6a4849f2837ae --> <!-- source: pattern://826166d230a6a4849f2837ae -->
@ -1252,6 +1218,100 @@
<Arg name="ch.nevis.isiweb4.response.status" value="403"/> <Arg name="ch.nevis.isiweb4.response.status" value="403"/>
</Response> </Response>
</AuthState> </AuthState>
<AuthState name="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC_post" class="ch.nevis.esauth.auth.states.saml.IdentityProviderState" final="false" resumeState="true">
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="IDP-initiated-ConcurrentLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Concurrent_Logout"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="IDP-initiated-SingleLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="LogoutCompleted" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Logout_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="LogoutFailed" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Logout_Fail"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="SP-initiated-ConcurrentLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Concurrent_Logout"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="SP-initiated-SingleLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="authenticate:IDP-initiated-SSO" next="Auth_Realm_Main_IDP_RequestedRoleLevel"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="authenticate:SP-initiated-SSO" next="Auth_Realm_Main_IDP_RequestedRoleLevel"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="invalidAssertionConsumerUrl" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="ok" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="stepup:IDP-initiated-SSO" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Selector"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="stepup:SP-initiated-SSO" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Selector"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<Response value="AUTH_ERROR">
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<Gui name="saml_idp" label="title.saml.failed">
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<GuiElem name="lasterror" type="error" label="error.saml.failed"/>
</Gui>
</Response>
<propertyRef name="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.issuer" value="https://auth.agov-w.azure.adnovum.net/SAML2SEC/"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.binding" value="http-post"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.post.relayStateEncoding" value="HTML"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt" value="none"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt.keystoreref" value="EncryptionKeys"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt.keyobjectref" value="DefaultEncryptionKey"/>
</AuthState>
<AuthState name="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC_artifact" class="ch.nevis.esauth.auth.states.saml.IdentityProviderState" final="false" resumeState="true">
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="IDP-initiated-ConcurrentLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Concurrent_Logout"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="IDP-initiated-SingleLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="LogoutCompleted" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Logout_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="LogoutFailed" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Logout_Fail"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="SP-initiated-ConcurrentLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Concurrent_Logout"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="SP-initiated-SingleLogout" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="authenticate:IDP-initiated-SSO" next="Auth_Realm_Main_IDP_RequestedRoleLevel"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="authenticate:SP-initiated-SSO" next="Auth_Realm_Main_IDP_RequestedRoleLevel"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="invalidAssertionConsumerUrl" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP_SEC"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="ok" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Prepare_Done"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="stepup:IDP-initiated-SSO" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Selector"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<ResultCond name="stepup:SP-initiated-SSO" next="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_Selector"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<Response value="AUTH_ERROR">
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<Gui name="saml_idp" label="title.saml.failed">
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<GuiElem name="lasterror" type="error" label="error.saml.failed"/>
</Gui>
</Response>
<propertyRef name="Auth_Realm_Main_IDP_Auth_Realm_Main_IDP_Custom_AGOV_IDP"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.issuer" value="https://auth.agov-w.azure.adnovum.net/SAML2SEC/"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.binding" value="http-artifact"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.post.relayStateEncoding" value="HTML"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt" value="none"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt.keystoreref" value="EncryptionKeys"/>
<!-- source: pattern://bb9e7806a04578e0ad468829 -->
<property name="out.encrypt.keyobjectref" value="DefaultEncryptionKey"/>
</AuthState>
<AuthState name="Auth_Realm_Main_IDP_Fido_Email_Verify" class="ch.nevis.idm.authstate.IdmUserVerifyState" final="false" resumeState="false"> <AuthState name="Auth_Realm_Main_IDP_Fido_Email_Verify" class="ch.nevis.idm.authstate.IdmUserVerifyState" final="false" resumeState="false">
<!-- source: pattern://7fb39bfd6c34685866a22180 --> <!-- source: pattern://7fb39bfd6c34685866a22180 -->
<ResultCond name="clientNotFound" next="Auth_Realm_Main_IDP_AuthnFailed_Client_NotFound"/> <ResultCond name="clientNotFound" next="Auth_Realm_Main_IDP_AuthnFailed_Client_NotFound"/>

View File

@ -84,6 +84,10 @@ String getAttributeConsumingServiceIndex(String value) {
return getAttribute(value, 'AttributeConsumingServiceIndex') return getAttribute(value, 'AttributeConsumingServiceIndex')
} }
String getProtocolBinding(String value) {
return getAttribute(value, 'ProtocolBinding')
}
def dispatchIssuer(i2s, String issuer, boolean secureMode) { def dispatchIssuer(i2s, String issuer, boolean secureMode) {
def result = i2s.get(issuer) def result = i2s.get(issuer)
if (result == null) { if (result == null) {
@ -99,7 +103,7 @@ def dispatchIssuer(i2s, String issuer, boolean secureMode) {
result = result + "_secure" result = result + "_secure"
} }
response.setResult(result) response.setResult(result)
session.put("saml.inbound.issuer", issuer) session.put('saml.inbound.issuer', issuer)
session.put('saml.idp.result', result) // remember decision for sub-sequent requests without a SAML message session.put('saml.idp.result', result) // remember decision for sub-sequent requests without a SAML message
} }
@ -111,12 +115,15 @@ def dispatchIssuer(i2s, String issuer) {
def dispatchMessage(i2s, String message) { def dispatchMessage(i2s, String message) {
def issuer = getIssuer(message) def issuer = getIssuer(message)
def secureMode = (getAttributeConsumingServiceIndex(message) == '10101') def secureMode = (getAttributeConsumingServiceIndex(message) == '10101')
def useArtifact = ('urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact' == getProtocolBinding(message))
LOG.info("secureMode requested: ${secureMode}") LOG.info("secureMode requested: ${secureMode}")
if (issuer == null) { if (issuer == null) {
LOG.info("No issuer found in incoming SAML message. Giving up.") LOG.info("No issuer found in incoming SAML message. Giving up.")
} }
session.put("saml.inbound.issuer", issuer) session.put('saml.inbound.issuer', issuer)
session.put('agov.idp.use.artifact', '' + useArtifact)
dispatchIssuer(i2s, issuer, secureMode) dispatchIssuer(i2s, issuer, secureMode)
} }