KEYCLOAK-2102 added AbstractKerberosTest.caseInsensitiveTest
This commit is contained in:
parent
81eb1e1e30
commit
bc22abf8cb
2 changed files with 42 additions and 1 deletions
|
@ -127,7 +127,34 @@ public abstract class AbstractKerberosTest {
|
||||||
|
|
||||||
spnegoResponse.close();
|
spnegoResponse.close();
|
||||||
events.clear();
|
events.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// KEYCLOAK-2102
|
||||||
|
@Test
|
||||||
|
public void spnegoCaseInsensitiveTest() throws Exception {
|
||||||
|
KeycloakRule keycloakRule = getKeycloakRule();
|
||||||
|
AssertEvents events = getAssertEvents();
|
||||||
|
|
||||||
|
Response spnegoResponse = spnegoLogin("MyDuke", "theduke");
|
||||||
|
Assert.assertEquals(302, spnegoResponse.getStatus());
|
||||||
|
|
||||||
|
events.expectLogin()
|
||||||
|
.client("kerberos-app")
|
||||||
|
.user(keycloakRule.getUser("test", "myduke").getId())
|
||||||
|
.detail(Details.REDIRECT_URI, KERBEROS_APP_URL)
|
||||||
|
//.detail(Details.AUTH_METHOD, "spnego")
|
||||||
|
.detail(Details.USERNAME, "myduke")
|
||||||
|
.assertEvent();
|
||||||
|
|
||||||
|
String location = spnegoResponse.getLocation().toString();
|
||||||
|
driver.navigate().to(location);
|
||||||
|
|
||||||
|
String pageSource = driver.getPageSource();
|
||||||
|
Assert.assertTrue(pageSource.contains("Kerberos Test") && pageSource.contains("Kerberos servlet secured content"));
|
||||||
|
|
||||||
|
spnegoResponse.close();
|
||||||
|
events.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -76,6 +76,20 @@ userPassword: theduke
|
||||||
krb5PrincipalName: jduke@KEYCLOAK.ORG
|
krb5PrincipalName: jduke@KEYCLOAK.ORG
|
||||||
krb5KeyVersionNumber: 0
|
krb5KeyVersionNumber: 0
|
||||||
|
|
||||||
|
dn: uid=MyDuke,ou=People,dc=keycloak,dc=org
|
||||||
|
objectClass: top
|
||||||
|
objectClass: person
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: krb5principal
|
||||||
|
objectClass: krb5kdcentry
|
||||||
|
cn: My
|
||||||
|
sn: Duke
|
||||||
|
mail: MyDuke@keycloak.org
|
||||||
|
uid: MyDuke
|
||||||
|
userPassword: theduke
|
||||||
|
krb5PrincipalName: MyDuke@KEYCLOAK.ORG
|
||||||
|
krb5KeyVersionNumber: 0
|
||||||
|
|
||||||
dn: uid=gsstestserver,ou=People,dc=keycloak,dc=org
|
dn: uid=gsstestserver,ou=People,dc=keycloak,dc=org
|
||||||
objectClass: top
|
objectClass: top
|
||||||
objectClass: person
|
objectClass: person
|
||||||
|
|
Loading…
Reference in a new issue