Skip to content

Commit 92782dd

Browse files
authored
Merge pull request #894 from OpenConext/feature/behat-test-mfa-authn-context-proxy
Test whether MFA AuthnContext must be added should be based on original SP
2 parents fb00492 + 75cac0c commit 92782dd

File tree

2 files changed

+48
-32
lines changed

2 files changed

+48
-32
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ We will continue to post relevant release notes on the GitHub release page. More
55

66
More information about our release strategy can be found in the [Development Guidelines](https://github.com/OpenConext/OpenConext-engineblock/wiki/Development-Guidelines#release-notes) on the EngineBlock wiki.
77

8+
## 6.3.4
9+
10+
**Bugfix**
11+
- Whether MFA AuthnContext must be added should be based on original SP #893 #894
12+
813
## 6.3.3
914
**Bugfixes:**
1015
- Move NoPassive response processing up in the ACS proces #890

src/OpenConext/EngineBlockFunctionalTestingBundle/Features/MfaAuthnContextClassRef.feature

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,58 +5,69 @@ Feature:
55

66
Background:
77
Given an EngineBlock instance on "vm.openconext.org"
8-
And no registered SPs
9-
And no registered Idps
10-
And an Identity Provider named "SSO-IdP"
11-
And a Service Provider named "SSO-SP"
8+
And no registered SPs
9+
And no registered Idps
10+
And an Identity Provider named "SSO-IdP"
11+
And a Service Provider named "SSO-SP"
12+
And a Service Provider named "Trusted SP"
1213

13-
Scenario: The configured authn method should be set as AuthnContextClassRef if configured with the IdP configuration mapping
14-
Given the IdP "SSO-IdP" is configured for MFA authn method "http://schemas.microsoft.com/claims/multipleauthn" for SP "SSO-SP"
15-
When I log in at "SSO-SP"
16-
And I pass through EngineBlock
17-
Then the url should match "functional-testing/SSO-IdP/sso"
18-
And the AuthnRequest to submit should match xpath '/samlp:AuthnRequest/samlp:RequestedAuthnContext/saml:AuthnContextClassRef[text()="http://schemas.microsoft.com/claims/multipleauthn"]'
14+
Scenario: The configured authn method should be set as AuthnContextClassRef if configured with the IdP configuration mapping
15+
Given the IdP "SSO-IdP" is configured for MFA authn method "http://schemas.microsoft.com/claims/multipleauthn" for SP "SSO-SP"
16+
When I log in at "SSO-SP"
17+
And I pass through EngineBlock
18+
Then the url should match "functional-testing/SSO-IdP/sso"
19+
And the AuthnRequest to submit should match xpath '/samlp:AuthnRequest/samlp:RequestedAuthnContext/saml:AuthnContextClassRef[text()="http://schemas.microsoft.com/claims/multipleauthn"]'
1920

20-
Scenario: The configured authn method should not be set as AuthnContextClassRef if not configured in the IdP configuration mapping
21-
When I log in at "SSO-SP"
22-
And I pass through EngineBlock
21+
Scenario: The configured authn method should be set as AuthnContextClassRef if configured with the IdP configuration mapping for Trusted Proxy
22+
Given the IdP "SSO-IdP" is configured for MFA authn method "http://schemas.microsoft.com/claims/multipleauthn" for SP "SSO-SP"
23+
And SP "Trusted SP" is a trusted proxy
24+
And SP "Trusted SP" signs its requests
25+
And SP "Trusted SP" is authenticating for SP "SSO-SP"
26+
When I log in at "Trusted SP"
27+
And I pass through EngineBlock
2328
Then the url should match "functional-testing/SSO-IdP/sso"
24-
And the response should not contain "http://schemas.microsoft.com/claims/multipleauthn"
29+
And the AuthnRequest to submit should match xpath '/samlp:AuthnRequest/samlp:RequestedAuthnContext/saml:AuthnContextClassRef[text()="http://schemas.microsoft.com/claims/multipleauthn"]'
30+
31+
Scenario: The configured authn method should not be set as AuthnContextClassRef if not configured in the IdP configuration mapping
32+
When I log in at "SSO-SP"
33+
And I pass through EngineBlock
34+
Then the url should match "functional-testing/SSO-IdP/sso"
35+
And the response should not contain "http://schemas.microsoft.com/claims/multipleauthn"
2536

2637
Scenario: The configured authn method should also be set for unsolicited logins if configured in the IdP configuration mapping
2738
Given the IdP "SSO-IdP" is configured for MFA authn method "http://schemas.microsoft.com/claims/multipleauthn" for SP "SSO-SP"
2839
When An IdP initiated Single Sign on for SP "SSO-SP" is triggered by IdP "SSO-IdP"
29-
And I pass through EngineBlock
40+
And I pass through EngineBlock
3041
Then the url should match "functional-testing/SSO-IdP/sso"
3142
And the AuthnRequest to submit should match xpath '/samlp:AuthnRequest/samlp:RequestedAuthnContext/saml:AuthnContextClassRef[text()="http://schemas.microsoft.com/claims/multipleauthn"]'
3243

33-
Scenario: A login should succeed if the configured authn method is set as AuthnContextClassRef in the IdP response
34-
Given the IdP "SSO-IdP" is configured for MFA authn method "http://schemas.microsoft.com/claims/multipleauthn" for SP "SSO-SP"
35-
And the IdP "SSO-IdP" sends AuthnContextClassRef with value "http://schemas.microsoft.com/claims/multipleauthn"
36-
When I log in at "SSO-SP"
37-
And I pass through EngineBlock
38-
And I pass through the IdP
39-
And I give my consent
40-
And I pass through EngineBlock
41-
Then the url should match "/functional-testing/SSO-SP/acs"
44+
Scenario: A login should succeed if the configured authn method is set as AuthnContextClassRef in the IdP response
45+
Given the IdP "SSO-IdP" is configured for MFA authn method "http://schemas.microsoft.com/claims/multipleauthn" for SP "SSO-SP"
46+
And the IdP "SSO-IdP" sends AuthnContextClassRef with value "http://schemas.microsoft.com/claims/multipleauthn"
47+
When I log in at "SSO-SP"
48+
And I pass through EngineBlock
49+
And I pass through the IdP
50+
And I give my consent
51+
And I pass through EngineBlock
52+
Then the url should match "/functional-testing/SSO-SP/acs"
4253

4354
Scenario: A login should succeed if the configured authn method is set as one of the values in the http://schemas.microsoft.com/claims/authnmethodsreferences attribute in the IdP response
4455
Given the IdP "SSO-IdP" is configured for MFA authn method "http://schemas.microsoft.com/claims/multipleauthn" for SP "SSO-SP"
45-
And the IdP "SSO-IdP" sends attribute "http://schemas.microsoft.com/claims/authnmethodsreferences" with values "http://schemas.microsoft.com/claims/multipleauthn" and xsi:type is "xs:string"
56+
And the IdP "SSO-IdP" sends attribute "http://schemas.microsoft.com/claims/authnmethodsreferences" with values "http://schemas.microsoft.com/claims/multipleauthn" and xsi:type is "xs:string"
4657
When I log in at "SSO-SP"
47-
And I pass through EngineBlock
48-
And I pass through the IdP
49-
And I give my consent
50-
And I pass through EngineBlock
58+
And I pass through EngineBlock
59+
And I pass through the IdP
60+
And I give my consent
61+
And I pass through EngineBlock
5162
Then the url should match "/functional-testing/SSO-SP/acs"
5263

5364
Scenario: A login should fail if the configured authn method is not in the IdP response as AuthnContextClassRef or as a value in the http://schemas.microsoft.com/claims/authnmethodsreferences attribute
5465
Given the IdP "SSO-IdP" is configured for MFA authn method "http://schemas.microsoft.com/claims/multipleauthn" for SP "SSO-SP"
5566
When I log in at "SSO-SP"
56-
And I pass through EngineBlock
57-
And I pass through the IdP
67+
And I pass through EngineBlock
68+
And I pass through the IdP
5869
Then I should see "Error - Multi factor authentication failed"
59-
And the url should match "/authentication/feedback/invalid-mfa-authn-context-class-ref"
70+
And the url should match "/authentication/feedback/invalid-mfa-authn-context-class-ref"
6071

6172
Scenario: The SP provided authn method should be set as AuthnContextClassRef if SP configured with transparent_authn_context
6273
Given the IdP "SSO-IdP" is configured for MFA authn method "transparent_authn_context" for SP "SSO-SP"

0 commit comments

Comments
 (0)