diff --git a/.travis.yml b/.travis.yml index 4d83796ca0..326395793f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,6 @@ env: - TESTS=server-group3 - TESTS=server-group4 - TESTS=adapter-tests - - TESTS=old - TESTS=crossdc-server - TESTS=crossdc-adapter - TESTS=broker diff --git a/pom.xml b/pom.xml index 7ed75c2ca3..0491fa5154 100755 --- a/pom.xml +++ b/pom.xml @@ -1422,17 +1422,6 @@ ${project.version} zip - - org.keycloak - keycloak-testsuite-integration-deprecated - ${project.version} - - - org.keycloak - keycloak-testsuite-integration-deprecated - ${project.version} - test-jar - org.keycloak keycloak-testsuite-utils diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/ApiUtil.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/ApiUtil.java deleted file mode 100644 index 2ab996de94..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/ApiUtil.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite; - -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.Response.StatusType; -import java.net.URI; - -/** - * @author Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc. - */ -public class ApiUtil { - - public static String getCreatedId(Response response) { - URI location = response.getLocation(); - if (!response.getStatusInfo().equals(Status.CREATED)) { - StatusType statusInfo = response.getStatusInfo(); - throw new WebApplicationException("Create method returned status " + - statusInfo.getReasonPhrase() + " (Code: " + statusInfo.getStatusCode() + "); expected status: Created (201)", response); - } - if (location == null) { - return null; - } - String path = location.getPath(); - return path.substring(path.lastIndexOf('/') + 1); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/ApplicationServlet.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/ApplicationServlet.java deleted file mode 100755 index e115604297..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/ApplicationServlet.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite; - -import org.keycloak.services.resources.RealmsResource; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.core.UriBuilder; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author Stian Thorgersen - */ -public class ApplicationServlet extends HttpServlet { - - private static final String LINK = "%s"; - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - String title = ""; - if (req.getRequestURI().endsWith("auth")) { - title = "AUTH_RESPONSE"; - } else if (req.getRequestURI().endsWith("logout")) { - title = "LOGOUT_REQUEST"; - } else { - title = "APP_REQUEST"; - } - - PrintWriter pw = resp.getWriter(); - pw.printf("%s", title); - UriBuilder base = UriBuilder.fromUri("/auth"); - pw.printf(LINK, RealmsResource.accountUrl(base).build("test"), "account", "account"); - - pw.print(""); - pw.flush(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/AssertEvents.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/AssertEvents.java deleted file mode 100755 index a42f576d66..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/AssertEvents.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite; - -import org.hamcrest.CoreMatchers; -import org.hamcrest.Description; -import org.hamcrest.Matcher; -import org.hamcrest.TypeSafeMatcher; -import org.junit.Assert; -import org.junit.rules.TestRule; -import org.junit.runners.model.Statement; -import org.keycloak.Config; -import org.keycloak.OAuth2Constants; -import org.keycloak.authentication.authenticators.client.ClientIdAndSecretAuthenticator; -import org.keycloak.events.Details; -import org.keycloak.events.Event; -import org.keycloak.events.EventListenerProvider; -import org.keycloak.events.EventListenerProviderFactory; -import org.keycloak.events.EventType; -import org.keycloak.events.admin.AdminEvent; -import org.keycloak.models.ClientModel; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; -import org.keycloak.models.UserSessionModel; -import org.keycloak.models.utils.KeycloakModelUtils; -import org.keycloak.representations.idm.UserRepresentation; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.rule.KeycloakRule; -import org.keycloak.util.TokenUtil; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; - -/** - * @author Stian Thorgersen - */ -public class AssertEvents implements TestRule, EventListenerProviderFactory { - - public static String DEFAULT_CLIENT_ID = "test-app"; - public static String DEFAULT_REDIRECT_URI = "http://localhost:8081/app/auth"; - public static String DEFAULT_IP_ADDRESS = "127.0.0.1"; - public static String DEFAULT_REALM = "test"; - public static String DEFAULT_USERNAME = "test-user@localhost"; - - private KeycloakRule keycloak; - - private static BlockingQueue events = new LinkedBlockingQueue(); - - public AssertEvents() { - } - - public AssertEvents(KeycloakRule keycloak) { - this.keycloak = keycloak; - } - - @Override - public String getId() { - return "assert-events"; - } - - @Override - public Statement apply(final Statement base, org.junit.runner.Description description) { - return new Statement() { - @Override - public void evaluate() throws Throwable { - events.clear(); - - keycloak.configure(new KeycloakRule.KeycloakSetup() { - @Override - public void config(RealmManager manager, RealmModel adminstrationRealm, RealmModel appRealm) { - Set listeners = new HashSet(); - listeners.add("jboss-logging"); - listeners.add("assert-events"); - appRealm.setEventsListeners(listeners); - } - }); - - try { - base.evaluate(); - - Event event = events.peek(); - if (event != null) { - Assert.fail("Unexpected type after test: " + event.getType()); - } - } finally { - keycloak.configure(new KeycloakRule.KeycloakSetup() { - @Override - public void config(RealmManager manager, RealmModel adminstrationRealm, RealmModel appRealm) { - appRealm.setEventsListeners(null); - } - }); - } - } - }; - } - - public void assertEmpty() { - Assert.assertTrue(events.isEmpty()); - } - - public Event poll() { - try { - return events.poll(10, TimeUnit.SECONDS); - } catch (InterruptedException e) { - return null; - } - } - - public void clear() { - events.clear(); - } - - public ExpectedEvent expectRequiredAction(EventType event) { - return expectLogin().event(event).removeDetail(Details.CONSENT).session(isUUID()); - } - - public ExpectedEvent expectLogin() { - return expect(EventType.LOGIN) - .detail(Details.CODE_ID, isCodeId()) - //.detail(Details.USERNAME, DEFAULT_USERNAME) - //.detail(Details.AUTH_METHOD, OIDCLoginProtocol.LOGIN_PROTOCOL) - //.detail(Details.AUTH_TYPE, AuthorizationEndpoint.CODE_AUTH_TYPE) - .detail(Details.REDIRECT_URI, DEFAULT_REDIRECT_URI) - .detail(Details.CONSENT, Details.CONSENT_VALUE_NO_CONSENT_REQUIRED) - .session(isUUID()); - } - - public ExpectedEvent expectClientLogin() { - return expect(EventType.CLIENT_LOGIN) - .detail(Details.CODE_ID, isCodeId()) - .detail(Details.CLIENT_AUTH_METHOD, ClientIdAndSecretAuthenticator.PROVIDER_ID) - .detail(Details.GRANT_TYPE, OAuth2Constants.CLIENT_CREDENTIALS) - .removeDetail(Details.CODE_ID) - .session(isUUID()); - } - - public ExpectedEvent expectSocialLogin() { - return expect(EventType.LOGIN) - .detail(Details.CODE_ID, isCodeId()) - .detail(Details.USERNAME, DEFAULT_USERNAME) - .detail(Details.AUTH_METHOD, "form") - .detail(Details.REDIRECT_URI, DEFAULT_REDIRECT_URI) - .session(isUUID()); - } - - public ExpectedEvent expectCodeToToken(String codeId, String sessionId) { - return expect(EventType.CODE_TO_TOKEN) - .detail(Details.CODE_ID, codeId) - .detail(Details.TOKEN_ID, isUUID()) - .detail(Details.REFRESH_TOKEN_ID, isUUID()) - .detail(Details.REFRESH_TOKEN_TYPE, TokenUtil.TOKEN_TYPE_REFRESH) - .detail(Details.CLIENT_AUTH_METHOD, ClientIdAndSecretAuthenticator.PROVIDER_ID) - .session(sessionId); - } - - public ExpectedEvent expectRefresh(String refreshTokenId, String sessionId) { - return expect(EventType.REFRESH_TOKEN) - .detail(Details.TOKEN_ID, isUUID()) - .detail(Details.REFRESH_TOKEN_ID, refreshTokenId) - .detail(Details.REFRESH_TOKEN_TYPE, TokenUtil.TOKEN_TYPE_REFRESH) - .detail(Details.UPDATED_REFRESH_TOKEN_ID, isUUID()) - .detail(Details.CLIENT_AUTH_METHOD, ClientIdAndSecretAuthenticator.PROVIDER_ID) - .session(sessionId); - } - - public ExpectedEvent expectLogout(String sessionId) { - return expect(EventType.LOGOUT).client((String) null) - .detail(Details.REDIRECT_URI, DEFAULT_REDIRECT_URI) - .session(sessionId); - } - - public ExpectedEvent expectRegister(String username, String email) { - UserRepresentation user = username != null ? keycloak.getUser("test", username) : null; - return expect(EventType.REGISTER) - .user(user != null ? user.getId() : null) - .detail(Details.USERNAME, username) - .detail(Details.EMAIL, email) - .detail(Details.REGISTER_METHOD, "form") - .detail(Details.REDIRECT_URI, DEFAULT_REDIRECT_URI); - } - - public ExpectedEvent expectAccount(EventType event) { - return expect(event).client("account"); - } - - public ExpectedEvent expect(EventType event) { - return new ExpectedEvent() - .realm(DEFAULT_REALM) - .client(DEFAULT_CLIENT_ID) - .user(keycloak.getUser(DEFAULT_REALM, DEFAULT_USERNAME).getId()) - .ipAddress(DEFAULT_IP_ADDRESS) - .session((String) null) - .event(event); - } - - @Override - public EventListenerProvider create(KeycloakSession session) { - return new EventListenerProvider() { - @Override - public void onEvent(Event event) { - if (event == null) { - throw new RuntimeException("Added null type"); - } - events.add(event); - } - - @Override - public void close() { - } - - @Override - public void onEvent(AdminEvent event, boolean includeRepresentation) { - // TODO Auto-generated method stub - - } - }; - } - - @Override - public void init(Config.Scope config) { - } - - @Override - public void postInit(KeycloakSessionFactory factory) { - - } - - @Override - public void close() { - } - - public static class ExpectedEvent { - private Event expected = new Event(); - private Matcher userId; - private Matcher sessionId; - private HashMap> details; - - public ExpectedEvent realm(RealmModel realm) { - expected.setRealmId(realm.getId()); - return this; - } - - public ExpectedEvent realm(String realmId) { - expected.setRealmId(realmId); - return this; - } - - public ExpectedEvent client(ClientModel client) { - expected.setClientId(client.getClientId()); - return this; - } - - public ExpectedEvent client(String clientId) { - expected.setClientId(clientId); - return this; - } - - public ExpectedEvent user(UserModel user) { - return user(user.getId()); - } - - public ExpectedEvent user(String userId) { - return user(CoreMatchers.equalTo(userId)); - } - - public ExpectedEvent user(Matcher userId) { - this.userId = userId; - return this; - } - - public ExpectedEvent session(UserSessionModel session) { - return session(session.getId()); - } - - public ExpectedEvent session(String sessionId) { - return session(CoreMatchers.equalTo(sessionId)); - } - - public ExpectedEvent session(Matcher sessionId) { - this.sessionId = sessionId; - return this; - } - - public ExpectedEvent ipAddress(String ipAddress) { - expected.setIpAddress(ipAddress); - return this; - } - - public ExpectedEvent event(EventType e) { - expected.setType(e); - return this; - } - - public ExpectedEvent detail(String key, String value) { - return detail(key, CoreMatchers.equalTo(value)); - } - - public ExpectedEvent detail(String key, Matcher matcher) { - if (details == null) { - details = new HashMap>(); - } - details.put(key, matcher); - return this; - } - - public ExpectedEvent removeDetail(String key) { - if (details != null) { - details.remove(key); - } - return this; - } - - public ExpectedEvent clearDetails() { - if (details != null) details.clear(); - return this; - } - - public ExpectedEvent error(String error) { - expected.setError(error); - return this; - } - - public Event assertEvent() { - try { - return assertEvent(events.poll(10, TimeUnit.SECONDS)); - } catch (InterruptedException e) { - throw new AssertionError("No type received within timeout"); - } - } - public Event event() { - try { - return events.poll(10, TimeUnit.SECONDS); - } catch (InterruptedException e) { - throw new AssertionError("No type received within timeout"); - } - } - - public Event assertEvent(Event actual) { - if (expected.getError() != null && !expected.getType().toString().endsWith("_ERROR")) { - expected.setType(EventType.valueOf(expected.getType().toString() + "_ERROR")); - } - Assert.assertEquals(expected.getType(), actual.getType()); - Assert.assertEquals(expected.getRealmId(), actual.getRealmId()); - Assert.assertEquals(expected.getClientId(), actual.getClientId()); - Assert.assertEquals(expected.getError(), actual.getError()); - Assert.assertEquals(expected.getIpAddress(), actual.getIpAddress()); - Assert.assertThat(actual.getUserId(), userId); - Assert.assertThat(actual.getSessionId(), sessionId); - - if (details == null || details.isEmpty()) { -// Assert.assertNull(actual.getDetails()); - } else { - Assert.assertNotNull(actual.getDetails()); - for (Map.Entry> d : details.entrySet()) { - String actualValue = actual.getDetails().get(d.getKey()); - if (!actual.getDetails().containsKey(d.getKey())) { - Assert.fail(d.getKey() + " missing"); - } - - Assert.assertThat("Unexpected value for " + d.getKey(), actualValue, d.getValue()); - } - /* - for (String k : actual.getDetails().keySet()) { - if (!details.containsKey(k)) { - Assert.fail(k + " was not expected"); - } - } - */ - } - - return actual; - } - } - - public static Matcher isCodeId() { - return isUUID(); - } - - public static Matcher isUUID() { - return new TypeSafeMatcher() { - @Override - protected boolean matchesSafely(String item) { - return KeycloakModelUtils.generateId().length() == item.length(); - } - - @Override - public void describeTo(Description description) { - description.appendText("Not an UUID"); - } - }; - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/Constants.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/Constants.java deleted file mode 100755 index 7c085281e7..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/Constants.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite; - -/** - * @author Stian Thorgersen - */ -public class Constants { - - public static String SERVER_ROOT = "http://localhost:8081"; - public static String AUTH_SERVER_ROOT = SERVER_ROOT + "/auth"; - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/MailUtil.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/MailUtil.java deleted file mode 100644 index c4d59c4cd8..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/MailUtil.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Stian Thorgersen - */ -public class MailUtil { - - private static Pattern mailPattern = Pattern.compile("http[^\\s\"]*"); - - public static String getLink(String body) { - Matcher matcher = mailPattern.matcher(body); - if (matcher.find()) { - return matcher.group(); - } - throw new AssertionError("No link found in " + body); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/OAuthClient.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/OAuthClient.java deleted file mode 100755 index 1d6bac0de1..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/OAuthClient.java +++ /dev/null @@ -1,657 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.io.output.ByteArrayOutputStream; -import org.apache.http.HttpResponse; -import org.apache.http.NameValuePair; -import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.utils.URLEncodedUtils; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.message.BasicNameValuePair; -import org.json.JSONObject; -import org.junit.Assert; -import org.keycloak.OAuth2Constants; -import org.keycloak.RSATokenVerifier; -import org.keycloak.common.VerificationException; -import org.keycloak.common.util.PemUtils; -import org.keycloak.constants.AdapterConstants; -import org.keycloak.jose.jws.JWSInput; -import org.keycloak.jose.jws.crypto.RSAProvider; -import org.keycloak.models.utils.KeycloakModelUtils; -import org.keycloak.protocol.oidc.OIDCLoginProtocolService; -import org.keycloak.representations.AccessToken; -import org.keycloak.representations.RefreshToken; -import org.keycloak.util.BasicAuthHelper; -import org.keycloak.util.TokenUtil; -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; - -import javax.ws.rs.core.UriBuilder; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URISyntaxException; -import java.security.PublicKey; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -/** - * @author Stian Thorgersen - */ -public class OAuthClient { - - private WebDriver driver; - - private String baseUrl = Constants.AUTH_SERVER_ROOT; - - private String realm = "test"; - - private String clientId = "test-app"; - - private String redirectUri = "http://localhost:8081/app/auth"; - - private StateParamProvider state = () -> { - return KeycloakModelUtils.generateId(); - }; - - private String scope; - - private String uiLocales = null; - - private PublicKey realmPublicKey; - - private String clientSessionState; - - private String clientSessionHost; - - public OAuthClient(WebDriver driver) { - this.driver = driver; - - try { - JSONObject realmJson = new JSONObject(IOUtils.toString(getClass().getResourceAsStream("/testrealm.json"))); - realmPublicKey = PemUtils.decodePublicKey(realmJson.getString("publicKey")); - } catch (Exception e) { - throw new RuntimeException("Failed to retrieve realm public key", e); - } - } - - public AuthorizationCodeResponse doLogin(String username, String password) { - openLoginForm(); - String src = driver.getPageSource(); - driver.findElement(By.id("username")).sendKeys(username); - driver.findElement(By.id("password")).sendKeys(password); - driver.findElement(By.name("login")).click(); - - return new AuthorizationCodeResponse(this); - } - - public void doLoginGrant(String username, String password) { - openLoginForm(); - - driver.findElement(By.id("username")).sendKeys(username); - driver.findElement(By.id("password")).sendKeys(password); - driver.findElement(By.name("login")).click(); - } - - public AccessTokenResponse doAccessTokenRequest(String code, String password) { - CloseableHttpClient client = new DefaultHttpClient(); - try { - HttpPost post = new HttpPost(getAccessTokenUrl()); - - List parameters = new LinkedList(); - parameters.add(new BasicNameValuePair(OAuth2Constants.GRANT_TYPE, OAuth2Constants.AUTHORIZATION_CODE)); - - if (code != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.CODE, code)); - } - if (redirectUri != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.REDIRECT_URI, redirectUri)); - } - if (clientId != null && password != null) { - String authorization = BasicAuthHelper.createHeader(clientId, password); - post.setHeader("Authorization", authorization); - } else if (clientId != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.CLIENT_ID, clientId)); - } - - if (clientSessionState != null) { - parameters.add(new BasicNameValuePair(AdapterConstants.CLIENT_SESSION_STATE, clientSessionState)); - } - - if (clientSessionHost != null) { - parameters.add(new BasicNameValuePair(AdapterConstants.CLIENT_SESSION_HOST, clientSessionHost)); - } - - UrlEncodedFormEntity formEntity = null; - try { - formEntity = new UrlEncodedFormEntity(parameters, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - post.setEntity(formEntity); - - try { - return new AccessTokenResponse(client.execute(post)); - } catch (Exception e) { - throw new RuntimeException("Failed to retrieve access token", e); - } - } finally { - closeClient(client); - } - } - - public String introspectAccessTokenWithClientCredential(String clientId, String clientSecret, String tokenToIntrospect) { - return introspectTokenWithClientCredential(clientId, clientSecret, "access_token", tokenToIntrospect); - } - - public String introspectRefreshTokenWithClientCredential(String clientId, String clientSecret, String tokenToIntrospect) { - return introspectTokenWithClientCredential(clientId, clientSecret, "refresh_token", tokenToIntrospect); - } - - public String introspectTokenWithClientCredential(String clientId, String clientSecret, String tokenType, String tokenToIntrospect) { - CloseableHttpClient client = new DefaultHttpClient(); - try { - HttpPost post = new HttpPost(getTokenIntrospectionUrl()); - - String authorization = BasicAuthHelper.createHeader(clientId, clientSecret); - post.setHeader("Authorization", authorization); - - List parameters = new LinkedList<>(); - - parameters.add(new BasicNameValuePair("token", tokenToIntrospect)); - parameters.add(new BasicNameValuePair("token_type_hint", tokenType)); - - UrlEncodedFormEntity formEntity; - - try { - formEntity = new UrlEncodedFormEntity(parameters, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - - post.setEntity(formEntity); - - try { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - - client.execute(post).getEntity().writeTo(out); - - return new String(out.toByteArray()); - } catch (Exception e) { - throw new RuntimeException("Failed to retrieve access token", e); - } - } finally { - closeClient(client); - } - } - - public AccessTokenResponse doGrantAccessTokenRequest(String clientSecret, String username, String password) throws Exception { - return doGrantAccessTokenRequest(realm, username, password, null, clientId, clientSecret); - } - - public AccessTokenResponse doGrantAccessTokenRequest(String clientSecret, String username, String password, String otp) throws Exception { - return doGrantAccessTokenRequest(realm, username, password, otp, clientId, clientSecret); - } - - public AccessTokenResponse doGrantAccessTokenRequest(String realm, String username, String password, String totp, - String clientId, String clientSecret) throws Exception { - CloseableHttpClient client = new DefaultHttpClient(); - try { - HttpPost post = new HttpPost(getResourceOwnerPasswordCredentialGrantUrl(realm)); - - List parameters = new LinkedList(); - parameters.add(new BasicNameValuePair(OAuth2Constants.GRANT_TYPE, OAuth2Constants.PASSWORD)); - parameters.add(new BasicNameValuePair("username", username)); - parameters.add(new BasicNameValuePair("password", password)); - if (totp != null) { - parameters.add(new BasicNameValuePair("totp", totp)); - - } - if (clientSecret != null) { - String authorization = BasicAuthHelper.createHeader(clientId, clientSecret); - post.setHeader("Authorization", authorization); - } else { - parameters.add(new BasicNameValuePair("client_id", clientId)); - - } - - if (clientSessionState != null) { - parameters.add(new BasicNameValuePair(AdapterConstants.CLIENT_SESSION_STATE, clientSessionState)); - } - if (clientSessionHost != null) { - parameters.add(new BasicNameValuePair(AdapterConstants.CLIENT_SESSION_HOST, clientSessionHost)); - } - if (scope != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.SCOPE, scope)); - } - - UrlEncodedFormEntity formEntity; - try { - formEntity = new UrlEncodedFormEntity(parameters, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - post.setEntity(formEntity); - - return new AccessTokenResponse(client.execute(post)); - } finally { - closeClient(client); - } - } - - public AccessTokenResponse doClientCredentialsGrantAccessTokenRequest(String clientSecret) throws Exception { - CloseableHttpClient client = new DefaultHttpClient(); - try { - HttpPost post = new HttpPost(getServiceAccountUrl()); - - String authorization = BasicAuthHelper.createHeader(clientId, clientSecret); - post.setHeader("Authorization", authorization); - - List parameters = new LinkedList(); - parameters.add(new BasicNameValuePair(OAuth2Constants.GRANT_TYPE, OAuth2Constants.CLIENT_CREDENTIALS)); - - if (scope != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.SCOPE, scope)); - } - - UrlEncodedFormEntity formEntity; - try { - formEntity = new UrlEncodedFormEntity(parameters, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - post.setEntity(formEntity); - - return new AccessTokenResponse(client.execute(post)); - } finally { - closeClient(client); - } - } - - - public HttpResponse doLogout(String refreshToken, String clientSecret) throws IOException { - CloseableHttpClient client = new DefaultHttpClient(); - try { - HttpPost post = new HttpPost(getLogoutUrl(null, null)); - - List parameters = new LinkedList(); - if (refreshToken != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.REFRESH_TOKEN, refreshToken)); - } - if (clientId != null && clientSecret != null) { - String authorization = BasicAuthHelper.createHeader(clientId, clientSecret); - post.setHeader("Authorization", authorization); - } else if (clientId != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.CLIENT_ID, clientId)); - } - - UrlEncodedFormEntity formEntity; - try { - formEntity = new UrlEncodedFormEntity(parameters, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - post.setEntity(formEntity); - - return client.execute(post); - } finally { - closeClient(client); - } - } - - public AccessTokenResponse doRefreshTokenRequest(String refreshToken, String password) { - CloseableHttpClient client = new DefaultHttpClient(); - try { - HttpPost post = new HttpPost(getRefreshTokenUrl()); - - List parameters = new LinkedList(); - parameters.add(new BasicNameValuePair(OAuth2Constants.GRANT_TYPE, OAuth2Constants.REFRESH_TOKEN)); - - if (refreshToken != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.REFRESH_TOKEN, refreshToken)); - } - if (clientId != null && password != null) { - String authorization = BasicAuthHelper.createHeader(clientId, password); - post.setHeader("Authorization", authorization); - } else if (clientId != null) { - parameters.add(new BasicNameValuePair(OAuth2Constants.CLIENT_ID, clientId)); - } - - if (clientSessionState != null) { - parameters.add(new BasicNameValuePair(AdapterConstants.CLIENT_SESSION_STATE, clientSessionState)); - } - if (clientSessionHost != null) { - parameters.add(new BasicNameValuePair(AdapterConstants.CLIENT_SESSION_HOST, clientSessionHost)); - } - - UrlEncodedFormEntity formEntity; - try { - formEntity = new UrlEncodedFormEntity(parameters, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - post.setEntity(formEntity); - - try { - return new AccessTokenResponse(client.execute(post)); - } catch (Exception e) { - throw new RuntimeException("Failed to retrieve access token", e); - } - } finally { - closeClient(client); - } - } - - public void closeClient(CloseableHttpClient client) { - try { - client.close(); - } catch (IOException ioe) { - throw new RuntimeException(ioe); - } - } - - public AccessToken verifyToken(String token) { - try { - return RSATokenVerifier.verifyToken(token, realmPublicKey, baseUrl + "/realms/" + realm); - } catch (VerificationException e) { - throw new RuntimeException("Failed to verify token", e); - } - } - - public RefreshToken parseRefreshToken(String refreshToken) { - try { - JWSInput jws = new JWSInput(refreshToken); - return jws.readJsonContent(RefreshToken.class); - } catch (Exception e) { - throw new RuntimeException("Invalid refresh token", e); - } - } - - public String getClientId() { - return clientId; - } - - public String getCurrentRequest() { - return driver.getCurrentUrl().substring(0, driver.getCurrentUrl().indexOf('?')); - } - - public URI getCurrentUri() { - try { - return new URI(driver.getCurrentUrl()); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - } - - public Map getCurrentQuery() { - Map m = new HashMap(); - List pairs = URLEncodedUtils.parse(getCurrentUri(), "UTF-8"); - for (NameValuePair p : pairs) { - m.put(p.getName(), p.getValue()); - } - return m; - } - - public void openLoginForm() { - driver.navigate().to(getLoginFormUrl()); - } - - public void openLogout() { - UriBuilder b = OIDCLoginProtocolService.logoutUrl(UriBuilder.fromUri(baseUrl)); - if (redirectUri != null) { - b.queryParam(OAuth2Constants.REDIRECT_URI, redirectUri); - } - driver.navigate().to(b.build(realm).toString()); - } - - public String getRedirectUri() { - return redirectUri; - } - - public String getLoginFormUrl() { - UriBuilder b = OIDCLoginProtocolService.authUrl(UriBuilder.fromUri(baseUrl)); - b.queryParam(OAuth2Constants.RESPONSE_TYPE, OAuth2Constants.CODE); - if (clientId != null) { - b.queryParam(OAuth2Constants.CLIENT_ID, clientId); - } - if (redirectUri != null) { - b.queryParam(OAuth2Constants.REDIRECT_URI, redirectUri); - } - if (state != null) { - b.queryParam(OAuth2Constants.STATE, state.getState()); - } - if(uiLocales != null){ - b.queryParam(OAuth2Constants.UI_LOCALES_PARAM, uiLocales); - } - - String scopeParam = TokenUtil.attachOIDCScope(scope); - b.queryParam(OAuth2Constants.SCOPE, scopeParam); - - return b.build(realm).toString(); - } - - public String getAccessTokenUrl() { - UriBuilder b = OIDCLoginProtocolService.tokenUrl(UriBuilder.fromUri(baseUrl)); - return b.build(realm).toString(); - } - - public String getTokenIntrospectionUrl() { - UriBuilder b = OIDCLoginProtocolService.tokenIntrospectionUrl(UriBuilder.fromUri(baseUrl)); - return b.build(realm).toString(); - } - - public String getLogoutUrl(String redirectUri, String sessionState) { - UriBuilder b = OIDCLoginProtocolService.logoutUrl(UriBuilder.fromUri(baseUrl)); - if (redirectUri != null) { - b.queryParam(OAuth2Constants.REDIRECT_URI, redirectUri); - } - if (sessionState != null) { - b.queryParam("session_state", sessionState); - } - return b.build(realm).toString(); - } - - public String getResourceOwnerPasswordCredentialGrantUrl() { - UriBuilder b = OIDCLoginProtocolService.tokenUrl(UriBuilder.fromUri(baseUrl)); - return b.build(realm).toString(); - } - - public String getResourceOwnerPasswordCredentialGrantUrl(String realm) { - UriBuilder b = OIDCLoginProtocolService.tokenUrl(UriBuilder.fromUri(baseUrl)); - return b.build(realm).toString(); - } - - public String getServiceAccountUrl() { - return getResourceOwnerPasswordCredentialGrantUrl(); - } - - public String getRefreshTokenUrl() { - UriBuilder b = OIDCLoginProtocolService.tokenUrl(UriBuilder.fromUri(baseUrl)); - return b.build(realm).toString(); - } - - public OAuthClient realm(String realm) { - this.realm = realm; - return this; - } - public OAuthClient realmPublicKey(PublicKey key) { - this.realmPublicKey = key; - return this; - } - - public OAuthClient clientId(String clientId) { - this.clientId = clientId; - return this; - } - - public OAuthClient redirectUri(String redirectUri) { - this.redirectUri = redirectUri; - return this; - } - - public OAuthClient stateParamHardcoded(String value) { - this.state = () -> { - return value; - }; - return this; - } - - public OAuthClient stateParamRandom() { - this.state = () -> { - return KeycloakModelUtils.generateId(); - }; - return this; - } - - public OAuthClient scope(String scope) { - this.scope = scope; - return this; - } - - public OAuthClient uiLocales(String uiLocales){ - this.uiLocales = uiLocales; - return this; - } - - public OAuthClient clientSessionState(String client_session_state) { - this.clientSessionState = client_session_state; - return this; - } - - public OAuthClient clientSessionHost(String client_session_host) { - this.clientSessionHost = client_session_host; - return this; - } - - public String getRealm() { - return realm; - } - - public static class AuthorizationCodeResponse { - - private boolean isRedirected; - private String code; - private String state; - private String error; - - public AuthorizationCodeResponse(OAuthClient client) { - isRedirected = client.getCurrentRequest().equals(client.getRedirectUri()); - code = client.getCurrentQuery().get(OAuth2Constants.CODE); - state = client.getCurrentQuery().get(OAuth2Constants.STATE); - error = client.getCurrentQuery().get(OAuth2Constants.ERROR); - } - - public boolean isRedirected() { - return isRedirected; - } - - public String getCode() { - return code; - } - - public String getState() { - return state; - } - - public String getError() { - return error; - } - - } - - public static class AccessTokenResponse { - private int statusCode; - - private String accessToken; - private String tokenType; - private int expiresIn; - private int refreshExpiresIn; - private String refreshToken; - - private String error; - private String errorDescription; - - public AccessTokenResponse(HttpResponse response) throws Exception { - statusCode = response.getStatusLine().getStatusCode(); - if (!"application/json".equals(response.getHeaders("Content-Type")[0].getValue())) { - Assert.fail("Invalid content type"); - } - - String s = IOUtils.toString(response.getEntity().getContent()); - JSONObject responseJson = new JSONObject(s); - - if (statusCode == 200) { - accessToken = responseJson.getString("access_token"); - tokenType = responseJson.getString("token_type"); - expiresIn = responseJson.getInt("expires_in"); - refreshExpiresIn = responseJson.getInt("refresh_expires_in"); - - if (responseJson.has(OAuth2Constants.REFRESH_TOKEN)) { - refreshToken = responseJson.getString(OAuth2Constants.REFRESH_TOKEN); - } - } else { - error = responseJson.getString(OAuth2Constants.ERROR); - errorDescription = responseJson.has(OAuth2Constants.ERROR_DESCRIPTION) ? responseJson.getString(OAuth2Constants.ERROR_DESCRIPTION) : null; - } - } - - public String getAccessToken() { - return accessToken; - } - - public String getError() { - return error; - } - - public String getErrorDescription() { - return errorDescription; - } - - public int getExpiresIn() { - return expiresIn; - } - - public int getRefreshExpiresIn() { - return refreshExpiresIn; - } - - public int getStatusCode() { - return statusCode; - } - - public String getRefreshToken() { - return refreshToken; - } - - public String getTokenType() { - return tokenType; - } - } - - private interface StateParamProvider { - - String getState(); - - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/PageUtils.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/PageUtils.java deleted file mode 100644 index f5157ca4c4..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/PageUtils.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; - -public class PageUtils { - - public static String getPageTitle(WebDriver driver) { - return driver.findElement(By.id("kc-page-title")).getText(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/model/AbstractModelTest.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/model/AbstractModelTest.java deleted file mode 100755 index c126124bc7..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/model/AbstractModelTest.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.model; - -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.keycloak.Config; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.models.RealmProvider; -import org.keycloak.models.RoleModel; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.rule.KeycloakRule; -import org.keycloak.util.JsonSerialization; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Set; - -/** - * @author Marek Posolda - */ -public class AbstractModelTest { - - @ClassRule - public static KeycloakRule kc = new KeycloakRule(); - - protected KeycloakSession session; - - protected RealmManager realmManager; - protected RealmProvider model; - - @Before - public void before() throws Exception { - session = kc.startSession(); - model = session.realms(); - realmManager = new RealmManager(session); - } - - @After - public void after() throws Exception { - kc.stopSession(session, true); - - session = kc.startSession(); - try { - model = session.realms(); - - RealmManager rm = new RealmManager(session); - for (RealmModel realm : model.getRealms()) { - if (!realm.getName().equals(Config.getAdminRealm())) { - rm.removeRealm(realm); - } - } - } finally { - kc.stopSession(session, true); - } - } - - protected void commit() { - commit(false); - } - - protected void commit(boolean rollback) { - if (rollback) { - session.getTransactionManager().rollback(); - } else { - session.getTransactionManager().commit(); - } - resetSession(); - } - - protected void resetSession() { - if (session.getTransactionManager().isActive()) { - session.getTransactionManager().rollback(); - } - kc.stopSession(session, false); - session = kc.startSession(); - model = session.realms(); - realmManager = new RealmManager(session); - } - - public static RealmRepresentation loadJson(String path) throws IOException { - InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path); - ByteArrayOutputStream os = new ByteArrayOutputStream(); - int c; - while ((c = is.read()) != -1) { - os.write(c); - } - byte[] bytes = os.toByteArray(); - return JsonSerialization.readValue(bytes, RealmRepresentation.class); - } - - - // Helper methods for role equality - - public static void assertRolesEquals(Set expected, Set actual) { - Assert.assertEquals(expected.size(), actual.size()); - for (RoleModel current : actual) { - assertRolesContains(current, expected); - } - } - - public static void assertRolesContains(RoleModel expected, Set actual) { - for (RoleModel current : actual) { - if (current.getId().equals(expected.getId())) { - assertRolesEquals(current, expected); - return; - } - } - - Assert.fail("Role with id=" + expected.getId() + " name=" + expected.getName() + " not in set " + actual); - } - - public static void assertRolesEquals(RoleModel expected, RoleModel actual) { - Assert.assertEquals(expected.getId(), actual.getId()); - Assert.assertEquals(expected.getName(), actual.getName()); - Assert.assertEquals(expected.getDescription(), actual.getDescription()); - Assert.assertEquals(expected.getContainer(), actual.getContainer()); - Assert.assertEquals(expected.getComposites().size(), actual.getComposites().size()); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AbstractAccountPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AbstractAccountPage.java deleted file mode 100755 index 11577be18d..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AbstractAccountPage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public abstract class AbstractAccountPage extends AbstractPage { - - @FindBy(linkText = "Sign Out") - private WebElement logoutLink; - - @FindBy(id = "kc-current-locale-link") - private WebElement languageText; - - @FindBy(id = "kc-locale-dropdown") - private WebElement localeDropdown; - - public void logout() { - logoutLink.click(); - } - - public String getLanguageDropdownText() { - return languageText.getText(); - } - - public void openLanguage(String language){ - localeDropdown.findElement(By.linkText(language)).click(); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AbstractPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AbstractPage.java deleted file mode 100755 index 7f9d4d47e1..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AbstractPage.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.junit.Assert; -import org.keycloak.testsuite.PageUtils; -import org.keycloak.testsuite.rule.WebResource; -import org.openqa.selenium.WebDriver; - -/** - * @author Stian Thorgersen - */ -public abstract class AbstractPage { - - @WebResource - protected WebDriver driver; - - public void assertCurrent() { - String name = getClass().getSimpleName(); - Assert.assertTrue("Expected " + name + " but was " + driver.getTitle() + " (" + driver.getCurrentUrl() + ")", - isCurrent()); - } - - abstract public boolean isCurrent(); - - abstract public void open() throws Exception; - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountApplicationsPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountApplicationsPage.java deleted file mode 100644 index 2f97e92061..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountApplicationsPage.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.pages; - -import org.keycloak.services.Urls; -import org.keycloak.testsuite.Constants; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import javax.ws.rs.core.UriBuilder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author Marek Posolda - */ -public class AccountApplicationsPage extends AbstractAccountPage { - - private String path = Urls.accountApplicationsPage(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT).build(), "test").toString(); - - @Override - public boolean isCurrent() { - return driver.getTitle().contains("Account Management") && driver.getCurrentUrl().endsWith("/account/applications"); - } - - @Override - public void open() { - driver.navigate().to(path); - } - - public void setPath(String path) { - this.path = path; - } - - public void revokeGrant(String clientId) { - driver.findElement(By.id("revoke-" + clientId)).click(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountFederatedIdentityPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountFederatedIdentityPage.java deleted file mode 100644 index 5b4898bb8c..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountFederatedIdentityPage.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.pages; - -import org.keycloak.services.Urls; -import org.keycloak.testsuite.Constants; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import javax.ws.rs.core.UriBuilder; - -/** - * @author Marek Posolda - */ -public class AccountFederatedIdentityPage extends AbstractAccountPage { - - @FindBy(className = "alert-error") - private WebElement errorMessage; - - public AccountFederatedIdentityPage() {}; - - private String realmName = "test"; - - public void open() { - driver.navigate().to(getPath()); - } - - public void realm(String realmName) { - this.realmName = realmName; - } - - public String getPath() { - return Urls.accountFederatedIdentityPage(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT).build(), realmName).toString(); - } - - @Override - public boolean isCurrent() { - return driver.getTitle().contains("Account Management") && driver.getPageSource().contains("Federated Identities"); - } - - public void clickAddProvider(String providerId) { - driver.findElement(By.id("add-link-" + providerId)).click(); - } - - public void clickRemoveProvider(String providerId) { - driver.findElement(By.id("remove-link-" + providerId)).click(); - } - - public String getError() { - return errorMessage.getText(); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountLogPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountLogPage.java deleted file mode 100755 index fefa3b1444..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountLogPage.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.services.Urls; -import org.keycloak.testsuite.Constants; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import javax.ws.rs.core.UriBuilder; -import java.util.LinkedList; -import java.util.List; - -/** - * @author Stian Thorgersen - */ -public class AccountLogPage extends AbstractAccountPage { - - private static String PATH = Urls.accountLogPage(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT).build(), "test").toString(); - - public boolean isCurrent() { - return driver.getTitle().contains("Account Management") && driver.getCurrentUrl().endsWith("/account/log"); - } - - public void open() { - driver.navigate().to(PATH); - } - - public List> getEvents() { - List> table = new LinkedList>(); - for (WebElement r : driver.findElements(By.tagName("tr"))) { - List row = new LinkedList(); - for (WebElement col : r.findElements(By.tagName("td"))) { - row.add(col.getText()); - } - table.add(row); - } - table.remove(0); - return table; - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountPasswordPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountPasswordPage.java deleted file mode 100755 index c334074149..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountPasswordPage.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.services.resources.account.AccountFormService; -import org.keycloak.testsuite.Constants; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import javax.ws.rs.core.UriBuilder; - -/** - * @author Stian Thorgersen - */ -public class AccountPasswordPage extends AbstractAccountPage { - - @FindBy(id = "password") - private WebElement passwordInput; - - @FindBy(id = "password-new") - private WebElement newPasswordInput; - - @FindBy(id = "password-confirm") - private WebElement passwordConfirmInput; - - @FindBy(className = "btn-primary") - private WebElement submitButton; - - private String realmName = "test"; - - public void changePassword(String password, String newPassword, String passwordConfirm) { - passwordInput.sendKeys(password); - newPasswordInput.sendKeys(newPassword); - passwordConfirmInput.sendKeys(passwordConfirm); - - submitButton.click(); - } - - public void changePassword(String newPassword, String passwordConfirm) { - newPasswordInput.sendKeys(newPassword); - passwordConfirmInput.sendKeys(passwordConfirm); - - submitButton.click(); - } - - public boolean isCurrent() { - return driver.getTitle().contains("Account Management") && driver.getCurrentUrl().split("\\?")[0].endsWith("/account/password"); - } - - public void open() { - driver.navigate().to(getPath()); - } - - public void realm(String realmName) { - this.realmName = realmName; - } - - public String getPath() { - return AccountFormService.passwordUrl(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT)).build(this.realmName).toString(); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountTotpPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountTotpPage.java deleted file mode 100755 index 8d1dfacb41..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountTotpPage.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.services.resources.account.AccountFormService; -import org.keycloak.testsuite.Constants; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import javax.ws.rs.core.UriBuilder; - -/** - * @author Stian Thorgersen - */ -public class AccountTotpPage extends AbstractAccountPage { - - private static String PATH = AccountFormService.totpUrl(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT)).build("test").toString(); - - @FindBy(id = "totpSecret") - private WebElement totpSecret; - - @FindBy(id = "totp") - private WebElement totpInput; - - @FindBy(css = "button[type=\"submit\"]") - private WebElement submitButton; - - @FindBy(id = "remove-mobile") - private WebElement removeLink; - - public void configure(String totp) { - totpInput.sendKeys(totp); - submitButton.click(); - } - - public String getTotpSecret() { - return totpSecret.getAttribute("value"); - } - - public boolean isCurrent() { - return driver.getTitle().contains("Account Management") && driver.getCurrentUrl().split("\\?")[0].endsWith("/account/totp"); - } - - public void open() { - driver.navigate().to(PATH); - } - - public void removeTotp() { - removeLink.click(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountUpdateProfilePage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountUpdateProfilePage.java deleted file mode 100755 index 4e7ef3c900..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountUpdateProfilePage.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.services.resources.RealmsResource; -import org.keycloak.testsuite.Constants; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import javax.ws.rs.core.UriBuilder; - -/** - * @author Stian Thorgersen - */ -public class AccountUpdateProfilePage extends AbstractAccountPage { - - public static String PATH = RealmsResource.accountUrl(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT)).build("test").toString(); - - @FindBy(id = "username") - private WebElement usernameInput; - - @FindBy(id = "firstName") - private WebElement firstNameInput; - - @FindBy(id = "lastName") - private WebElement lastNameInput; - - @FindBy(id = "email") - private WebElement emailInput; - - - @FindBy(id = "referrer") - private WebElement backToApplicationLink; - - @FindBy(css = "button[type=\"submit\"][value=\"Save\"]") - private WebElement submitButton; - - @FindBy(css = "button[type=\"submit\"][value=\"Cancel\"]") - private WebElement cancelButton; - - @FindBy(className = "alert-success") - private WebElement successMessage; - - @FindBy(className = "alert-error") - private WebElement errorMessage; - - public void updateProfile(String firstName, String lastName, String email) { - firstNameInput.clear(); - firstNameInput.sendKeys(firstName); - lastNameInput.clear(); - lastNameInput.sendKeys(lastName); - emailInput.clear(); - emailInput.sendKeys(email); - - submitButton.click(); - } - - public void updateProfile(String username, String firstName, String lastName, String email) { - usernameInput.clear(); - usernameInput.sendKeys(username); - firstNameInput.clear(); - firstNameInput.sendKeys(firstName); - lastNameInput.clear(); - lastNameInput.sendKeys(lastName); - emailInput.clear(); - emailInput.sendKeys(email); - - submitButton.click(); - } - - public void updateUsername(String username) { - usernameInput.clear(); - usernameInput.sendKeys(username); - submitButton.click(); - } - - public void updateEmail(String email) { - emailInput.clear(); - emailInput.sendKeys(email); - submitButton.click(); - } - - public void clickCancel() { - cancelButton.click(); - } - - - public String getUsername() { - return usernameInput.getAttribute("value"); - } - - public String getFirstName() { - return firstNameInput.getAttribute("value"); - } - - public String getLastName() { - return lastNameInput.getAttribute("value"); - } - - public String getEmail() { - return emailInput.getAttribute("value"); - } - - public boolean isCurrent() { - return driver.getTitle().contains("Account Management") && driver.getPageSource().contains("Edit Account"); - } - - public void open() { - driver.navigate().to(PATH); - } - - public void backToApplication() { - backToApplicationLink.click(); - } - - public String getSuccess(){ - return successMessage.getText(); - } - - public String getError() { - return errorMessage.getText(); - } - - public boolean isPasswordUpdateSupported() { - return driver.getPageSource().contains(PATH + "/password"); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AppPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AppPage.java deleted file mode 100755 index 97ca54bc5c..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AppPage.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - - -import org.keycloak.OAuth2Constants; -import org.keycloak.protocol.oidc.OIDCLoginProtocolService; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import javax.ws.rs.core.UriBuilder; - -/** - * @author Stian Thorgersen - */ -public class AppPage extends AbstractPage { - - public static final String AUTH_SERVER_URL = "http://localhost:8081/auth"; - public static final String baseUrl = "http://localhost:8081/app"; - - @FindBy(id = "account") - private WebElement accountLink; - - @Override - public void open() { - driver.navigate().to(baseUrl); - } - - @Override - public boolean isCurrent() { - return driver.getCurrentUrl().startsWith(baseUrl); - } - - public RequestType getRequestType() { - return RequestType.valueOf(driver.getTitle()); - } - - public void openAccount() { - accountLink.click(); - } - - public enum RequestType { - AUTH_RESPONSE, LOGOUT_REQUEST, APP_REQUEST - } - - public void logout() { - String logoutUri = OIDCLoginProtocolService.logoutUrl(UriBuilder.fromUri(AUTH_SERVER_URL)) - .queryParam(OAuth2Constants.REDIRECT_URI,baseUrl).build("test").toString(); - driver.navigate().to(logoutUri); - - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/BypassKerberosPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/BypassKerberosPage.java deleted file mode 100755 index 2c7f697e51..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/BypassKerberosPage.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class BypassKerberosPage extends AbstractPage { - - @FindBy(name = "continue") - private WebElement continueButton; - - public boolean isCurrent() { - return driver.getTitle().equals("Log in to test") || driver.getTitle().equals("Anmeldung bei test"); - } - - public void clickContinue() { - continueButton.click(); - } - - @Override - public void open() throws Exception { - - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ErrorPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ErrorPage.java deleted file mode 100644 index 0def01b7f9..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ErrorPage.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.OAuthClient; -import org.keycloak.testsuite.PageUtils; -import org.keycloak.testsuite.rule.WebResource; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class ErrorPage extends AbstractPage { - - @WebResource - protected OAuthClient oauth; - - @FindBy(className = "instruction") - private WebElement errorMessage; - - @FindBy(id = "backToApplication") - private WebElement backToApplicationLink; - - public String getError() { - return errorMessage.getText(); - } - - public void clickBackToApplication() { - backToApplicationLink.click(); - } - - public boolean isCurrent() { - return driver.getTitle() != null && PageUtils.getPageTitle(driver).equals("We're sorry..."); - } - - @Override - public void open() { - throw new UnsupportedOperationException(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/IdpConfirmLinkPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/IdpConfirmLinkPage.java deleted file mode 100644 index 5912bf41b2..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/IdpConfirmLinkPage.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Marek Posolda - */ -public class IdpConfirmLinkPage extends AbstractPage { - - @FindBy(id = "updateProfile") - private WebElement updateProfileButton; - - @FindBy(id = "linkAccount") - private WebElement linkAccountButton; - - @FindBy(className = "alert-error") - private WebElement message; - - @Override - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Account already exists"); - } - - public String getMessage() { - return message.getText(); - } - - public void clickReviewProfile() { - updateProfileButton.click(); - } - - public void clickLinkAccount() { - linkAccountButton.click(); - } - - @Override - public void open() throws Exception { - throw new UnsupportedOperationException(); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/IdpLinkEmailPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/IdpLinkEmailPage.java deleted file mode 100644 index 3d03b3524c..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/IdpLinkEmailPage.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Marek Posolda - */ -public class IdpLinkEmailPage extends AbstractPage { - - @FindBy(id = "instruction1") - private WebElement message; - - @FindBy(linkText = "Click here") - private WebElement resendEmailLink; - - @FindBy(linkText = "Click here") // Actually same link like "resendEmailLink" - private WebElement continueFlowLink; - - @Override - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).startsWith("Link "); - } - - public void clickResendEmail() { - resendEmailLink.click(); - } - - public void clickContinueFlowLink() { - continueFlowLink.click(); - } - - @Override - public void open() throws Exception { - throw new UnsupportedOperationException(); - } - - public String getMessage() { - return message.getText(); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/InfoPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/InfoPage.java deleted file mode 100644 index 0427f2e34e..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/InfoPage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.OAuthClient; -import org.keycloak.testsuite.rule.WebResource; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class InfoPage extends AbstractPage { - - @WebResource - protected OAuthClient oauth; - - @FindBy(className = "instruction") - private WebElement infoMessage; - - public String getInfo() { - return infoMessage.getText(); - } - - public boolean isCurrent() { - return driver.getPageSource().contains("kc-info-message"); - } - - @Override - public void open() { - throw new UnsupportedOperationException(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginConfigTotpPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginConfigTotpPage.java deleted file mode 100755 index e11fcab77a..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginConfigTotpPage.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class LoginConfigTotpPage extends AbstractPage { - - @FindBy(id = "totpSecret") - private WebElement totpSecret; - - @FindBy(id = "totp") - private WebElement totpInput; - - @FindBy(css = "input[type=\"submit\"]") - private WebElement submitButton; - - public void configure(String totp) { - totpInput.sendKeys(totp); - submitButton.click(); - } - - public String getTotpSecret() { - return totpSecret.getAttribute("value"); - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Mobile Authenticator Setup"); - } - - public void open() { - throw new UnsupportedOperationException(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginExpiredPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginExpiredPage.java deleted file mode 100644 index 0d5b5b4883..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginExpiredPage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Marek Posolda - */ -public class LoginExpiredPage extends AbstractPage { - - @FindBy(id = "loginRestartLink") - private WebElement loginRestartLink; - - @FindBy(id = "loginContinueLink") - private WebElement loginContinueLink; - - - public void clickLoginRestartLink() { - loginRestartLink.click(); - } - - public void clickLoginContinueLink() { - loginContinueLink.click(); - } - - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Page has expired"); - } - - public void open() { - throw new UnsupportedOperationException(); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPage.java deleted file mode 100755 index 2fe160ecd7..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPage.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.OAuthClient; -import org.keycloak.testsuite.rule.WebResource; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class LoginPage extends AbstractPage { - - @WebResource - protected OAuthClient oauth; - - @FindBy(id = "username") - private WebElement usernameInput; - - @FindBy(id = "password") - private WebElement passwordInput; - - @FindBy(id = "totp") - private WebElement totp; - - @FindBy(id = "rememberMe") - private WebElement rememberMe; - - @FindBy(name = "login") - private WebElement submitButton; - - @FindBy(name = "cancel") - private WebElement cancelButton; - - @FindBy(linkText = "Register") - private WebElement registerLink; - - @FindBy(linkText = "Forgot Password?") - private WebElement resetPasswordLink; - - @FindBy(linkText = "Username") - private WebElement recoverUsernameLink; - - @FindBy(className = "alert-error") - private WebElement loginErrorMessage; - - @FindBy(className = "alert-warning") - private WebElement loginWarningMessage; - - @FindBy(className = "alert-success") - private WebElement loginSuccessMessage; - - - @FindBy(className = "alert-info") - private WebElement loginInfoMessage; - - - @FindBy(id = "kc-current-locale-link") - private WebElement languageText; - - @FindBy(id = "kc-locale-dropdown") - private WebElement localeDropdown; - - public void login(String username, String password) { - usernameInput.clear(); - usernameInput.sendKeys(username); - - passwordInput.clear(); - passwordInput.sendKeys(password); - - submitButton.click(); - } - - public void login(String password) { - passwordInput.clear(); - passwordInput.sendKeys(password); - - submitButton.click(); - } - - public void missingPassword(String username) { - usernameInput.clear(); - usernameInput.sendKeys(username); - passwordInput.clear(); - submitButton.click(); - - } - public void missingUsername() { - usernameInput.clear(); - submitButton.click(); - - } - - public String getUsername() { - return usernameInput.getAttribute("value"); - } - - public boolean isUsernameInputEnabled() { - return usernameInput.isEnabled(); - } - - public String getPassword() { - return passwordInput.getAttribute("value"); - } - - public void cancel() { - cancelButton.click(); - } - - public String getError() { - return loginErrorMessage != null ? loginErrorMessage.getText() : null; - } - - public String getSuccessMessage() { - return loginSuccessMessage != null ? loginSuccessMessage.getText() : null; - } - public String getInfoMessage() { - return loginInfoMessage != null ? loginInfoMessage.getText() : null; - } - - - public boolean isCurrent() { - return driver.getTitle().equals("Log in to test") || driver.getTitle().equals("Anmeldung bei test"); - } - - public void clickRegister() { - registerLink.click(); - } - - public void clickSocial(String alias) { - WebElement socialButton = findSocialButton(alias); - socialButton.click(); - } - - public WebElement findSocialButton(String alias) { - String id = "zocial-" + alias; - return this.driver.findElement(By.id(id)); - } - - public void resetPassword() { - resetPasswordLink.click(); - } - - public void recoverUsername() { - recoverUsernameLink.click(); - } - - public void setRememberMe(boolean enable) { - boolean current = rememberMe.isSelected(); - if (current != enable) { - rememberMe.click(); - } - } - - public boolean isRememberMeChecked() { - return rememberMe.isSelected(); - } - - @Override - public void open() { - oauth.openLoginForm(); - assertCurrent(); - } - - public String getLanguageDropdownText() { - return languageText.getText(); - } - - public void openLanguage(String language){ - localeDropdown.findElement(By.linkText(language)).click(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPasswordResetPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPasswordResetPage.java deleted file mode 100644 index 0fbb945811..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPasswordResetPage.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class LoginPasswordResetPage extends AbstractPage { - - @FindBy(id = "username") - private WebElement usernameInput; - - @FindBy(css = "input[type=\"submit\"]") - private WebElement submitButton; - - @FindBy(className = "alert-success") - private WebElement emailSuccessMessage; - - @FindBy(className = "alert-error") - private WebElement emailErrorMessage; - - @FindBy(partialLinkText = "Back to Login") - private WebElement backToLogin; - - public void changePassword(String username) { - usernameInput.sendKeys(username); - - submitButton.click(); - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Forgot Your Password?"); - } - - public void open() { - throw new UnsupportedOperationException(); - } - - public String getSuccessMessage() { - return emailSuccessMessage != null ? emailSuccessMessage.getText() : null; - } - - public String getErrorMessage() { - return emailErrorMessage != null ? emailErrorMessage.getText() : null; - } - - public void backToLogin() { - backToLogin.click(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPasswordUpdatePage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPasswordUpdatePage.java deleted file mode 100644 index 871186ffd5..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginPasswordUpdatePage.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class LoginPasswordUpdatePage extends AbstractPage { - - @FindBy(id = "password-new") - private WebElement newPasswordInput; - - @FindBy(id = "password-confirm") - private WebElement passwordConfirmInput; - - @FindBy(css = "input[type=\"submit\"]") - private WebElement submitButton; - - @FindBy(className = "alert-error") - private WebElement loginErrorMessage; - - public void changePassword(String newPassword, String passwordConfirm) { - newPasswordInput.sendKeys(newPassword); - passwordConfirmInput.sendKeys(passwordConfirm); - - submitButton.click(); - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Update password"); - } - - public void open() { - throw new UnsupportedOperationException(); - } - - public String getError() { - return loginErrorMessage != null ? loginErrorMessage.getText() : null; - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginRecoverUsernamePage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginRecoverUsernamePage.java deleted file mode 100644 index a02a3a60d5..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginRecoverUsernamePage.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class LoginRecoverUsernamePage extends AbstractPage { - - @FindBy(id = "email") - private WebElement emailInput; - - @FindBy(css = "input[type=\"submit\"]") - private WebElement submitButton; - - @FindBy(className = "alert-error") - private WebElement emailErrorMessage; - - public void recoverUsername(String email) { - emailInput.sendKeys(email); - - submitButton.click(); - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Forgot Your Username?"); - } - - public void open() { - throw new UnsupportedOperationException(); - } - - public String getMessage() { - return emailErrorMessage != null ? emailErrorMessage.getText() : null; - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginTotpPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginTotpPage.java deleted file mode 100755 index cddcf29333..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginTotpPage.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class LoginTotpPage extends AbstractPage { - - @FindBy(id = "totp") - private WebElement totpInput; - - @FindBy(id = "password-token") - private WebElement passwordToken; - - @FindBy(css = "input[type=\"submit\"]") - private WebElement submitButton; - - @FindBy(id = "kc-cancel") - private WebElement cancelButton; - - @FindBy(className = "alert-error") - private WebElement loginErrorMessage; - - public void login(String totp) { - totpInput.clear(); - if (totp != null) totpInput.sendKeys(totp); - - submitButton.click(); - } - - public void cancel() { - cancelButton.click(); - } - - public String getError() { - return loginErrorMessage != null ? loginErrorMessage.getText() : null; - } - - public boolean isCurrent() { - try { - driver.findElement(By.id("totp")); - return true; - } catch (Throwable t) { - return false; - } - } - - @Override - public void open() { - throw new UnsupportedOperationException(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginUpdateProfileEditUsernameAllowedPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginUpdateProfileEditUsernameAllowedPage.java deleted file mode 100644 index d32b1b0184..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginUpdateProfileEditUsernameAllowedPage.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -public class LoginUpdateProfileEditUsernameAllowedPage extends LoginUpdateProfilePage { - - @FindBy(id = "username") - private WebElement usernameInput; - - public void update(String firstName, String lastName, String email, String username) { - usernameInput.clear(); - usernameInput.sendKeys(username); - update(firstName, lastName, email); - } - - public String getUsername() { - return usernameInput.getAttribute("value"); - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Update Account Information"); - } - - @Override - public void open() { - throw new UnsupportedOperationException(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginUpdateProfilePage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginUpdateProfilePage.java deleted file mode 100644 index 5faf48a0b8..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/LoginUpdateProfilePage.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class LoginUpdateProfilePage extends AbstractPage { - - @FindBy(id = "firstName") - private WebElement firstNameInput; - - @FindBy(id = "lastName") - private WebElement lastNameInput; - - @FindBy(id = "email") - private WebElement emailInput; - - @FindBy(css = "input[type=\"submit\"]") - private WebElement submitButton; - - @FindBy(className = "alert-error") - private WebElement loginErrorMessage; - - public void update(String firstName, String lastName, String email) { - firstNameInput.clear(); - firstNameInput.sendKeys(firstName); - lastNameInput.clear(); - lastNameInput.sendKeys(lastName); - emailInput.clear(); - emailInput.sendKeys(email); - submitButton.click(); - } - - public String getError() { - return loginErrorMessage != null ? loginErrorMessage.getText() : null; - } - - public String getFirstName() { - return firstNameInput.getAttribute("value"); - } - - public String getLastName() { - return lastNameInput.getAttribute("value"); - } - - public String getEmail() { - return emailInput.getAttribute("value"); - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Update Account Information"); - } - - @Override - public void open() { - throw new UnsupportedOperationException(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/OAuthGrantPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/OAuthGrantPage.java deleted file mode 100755 index ca6819ca74..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/OAuthGrantPage.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class OAuthGrantPage extends AbstractPage { - - @FindBy(css = "input[name=\"accept\"]") - private WebElement acceptButton; - @FindBy(css = "input[name=\"cancel\"]") - private WebElement cancelButton; - - - public void accept(){ - acceptButton.click(); - } - - public void cancel(){ - cancelButton.click(); - } - - @Override - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).startsWith("Grant Access to "); - } - - @Override - public void open() { - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ProceedPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ProceedPage.java deleted file mode 100644 index 97d7c289e0..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ProceedPage.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2017 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * - * @author hmlnarik - */ -public class ProceedPage extends AbstractPage { - - @FindBy(className = "instruction") - private WebElement infoMessage; - - @FindBy(linkText = "» Click here to proceed") - private WebElement proceedLink; - - public String getInfo() { - return infoMessage.getText(); - } - - public boolean isCurrent() { - return driver.getPageSource().contains("kc-info-message") && proceedLink.isDisplayed(); - } - - @Override - public void open() { - throw new UnsupportedOperationException(); - } - - public void clickProceedLink() { - proceedLink.click(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/RegisterPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/RegisterPage.java deleted file mode 100644 index b6bfba1cee..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/RegisterPage.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.junit.Assert; -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class RegisterPage extends AbstractPage { - - @FindBy(id = "firstName") - private WebElement firstNameInput; - - @FindBy(id = "lastName") - private WebElement lastNameInput; - - @FindBy(id = "email") - private WebElement emailInput; - - @FindBy(id = "username") - private WebElement usernameInput; - - @FindBy(id = "password") - private WebElement passwordInput; - - @FindBy(id = "password-confirm") - private WebElement passwordConfirmInput; - - @FindBy(css = "input[type=\"submit\"]") - private WebElement submitButton; - - @FindBy(className = "alert-error") - private WebElement loginErrorMessage; - - @FindBy(className = "instruction") - private WebElement loginInstructionMessage; - - - public void register(String firstName, String lastName, String email, String username, String password, String passwordConfirm) { - firstNameInput.clear(); - if (firstName != null) { - firstNameInput.sendKeys(firstName); - } - - lastNameInput.clear(); - if (lastName != null) { - lastNameInput.sendKeys(lastName); - } - - emailInput.clear(); - if (email != null) { - emailInput.sendKeys(email); - } - - usernameInput.clear(); - if (username != null) { - usernameInput.sendKeys(username); - } - - passwordInput.clear(); - if (password != null) { - passwordInput.sendKeys(password); - } - - passwordConfirmInput.clear(); - if (passwordConfirm != null) { - passwordConfirmInput.sendKeys(passwordConfirm); - } - - submitButton.click(); - } - - public void registerWithEmailAsUsername(String firstName, String lastName, String email, String password, String passwordConfirm) { - firstNameInput.clear(); - if (firstName != null) { - firstNameInput.sendKeys(firstName); - } - - lastNameInput.clear(); - if (lastName != null) { - lastNameInput.sendKeys(lastName); - } - - emailInput.clear(); - if (email != null) { - emailInput.sendKeys(email); - } - - try { - usernameInput.clear(); - Assert.fail("Form must be without username field"); - } catch (NoSuchElementException e) { - // OK - } - - passwordInput.clear(); - if (password != null) { - passwordInput.sendKeys(password); - } - - passwordConfirmInput.clear(); - if (passwordConfirm != null) { - passwordConfirmInput.sendKeys(passwordConfirm); - } - - submitButton.click(); - } - - public String getError() { - return loginErrorMessage != null ? loginErrorMessage.getText() : null; - } - - public String getInstruction() { - try { - return loginInstructionMessage != null ? loginInstructionMessage.getText() : null; - } catch (NoSuchElementException e){ - // OK - } - return null; - } - - public String getFirstName() { - return firstNameInput.getAttribute("value"); - } - - public String getLastName() { - return lastNameInput.getAttribute("value"); - } - - public String getEmail() { - return emailInput.getAttribute("value"); - } - - public String getUsername() { - return usernameInput.getAttribute("value"); - } - - public String getPassword() { - return passwordInput.getAttribute("value"); - } - - public String getPasswordConfirm() { - return passwordConfirmInput.getAttribute("value"); - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Register"); - } - - @Override - public void open() { - throw new UnsupportedOperationException(); - } - -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/TermsAndConditionsPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/TermsAndConditionsPage.java deleted file mode 100755 index 22712c9fa1..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/TermsAndConditionsPage.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class TermsAndConditionsPage extends AbstractPage { - - @FindBy(id = "kc-accept") - private WebElement submitButton; - - @FindBy(id = "kc-decline") - private WebElement cancelButton; - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Terms and Conditions"); - } - - public void acceptTerms() { - submitButton.click(); - } - public void declineTerms() { - cancelButton.click(); - } - - @Override - public void open() { - throw new UnsupportedOperationException(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ValidatePassworrdEmailResetPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ValidatePassworrdEmailResetPage.java deleted file mode 100755 index 99660b9b2b..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/ValidatePassworrdEmailResetPage.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.PageUtils; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Stian Thorgersen - */ -public class ValidatePassworrdEmailResetPage extends AbstractPage { - - @FindBy(id = "key") - private WebElement keyInput; - - @FindBy(id="kc-submit") - private WebElement submitButton; - - @FindBy(id="kc-cancel") - private WebElement cancelButton; - - @FindBy(className = "alert-success") - private WebElement emailSuccessMessage; - - @FindBy(className = "alert-error") - private WebElement emailErrorMessage; - - public void submitCode(String code) { - keyInput.sendKeys(code); - - submitButton.click(); - } - - public void cancel() { - cancelButton.click(); - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Forgot Your Password?"); - } - - public void open() { - throw new UnsupportedOperationException(); - } - - public String getSuccessMessage() { - return emailSuccessMessage != null ? emailSuccessMessage.getText() : null; - } - - public String getErrorMessage() { - return emailErrorMessage != null ? emailErrorMessage.getText() : null; - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/VerifyEmailPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/VerifyEmailPage.java deleted file mode 100644 index ccf603e66b..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/VerifyEmailPage.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.OAuthClient; -import org.keycloak.testsuite.PageUtils; -import org.keycloak.testsuite.rule.WebResource; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Viliam Rockai - */ -public class VerifyEmailPage extends AbstractPage { - - @WebResource - protected OAuthClient oauth; - - @FindBy(linkText = "Click here") - private WebElement resendEmailLink; - - @Override - public void open() { - - } - - public boolean isCurrent() { - return PageUtils.getPageTitle(driver).equals("Email verification"); - } - - public void clickResendEmail() { - resendEmailLink.click(); - } - - public String getResendEmailLink() { - return resendEmailLink.getAttribute("href"); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java deleted file mode 100755 index 4a936fe30c..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.rule; - -import io.undertow.servlet.api.DeploymentInfo; -import io.undertow.servlet.api.ErrorPage; -import io.undertow.servlet.api.FilterInfo; -import io.undertow.servlet.api.LoginConfig; -import io.undertow.servlet.api.SecurityConstraint; -import io.undertow.servlet.api.SecurityInfo; -import io.undertow.servlet.api.ServletInfo; -import io.undertow.servlet.api.WebResourceCollection; -import org.jboss.resteasy.spi.ResteasyDeployment; -import org.junit.rules.ExternalResource; -import org.junit.rules.TemporaryFolder; -import org.keycloak.Config; -import org.keycloak.adapters.KeycloakConfigResolver; -import org.keycloak.adapters.servlet.KeycloakOIDCFilter; -import org.keycloak.common.util.Retry; -import org.keycloak.common.util.Time; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakTransaction; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; -import org.keycloak.models.utils.ModelToRepresentation; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.representations.idm.UserRepresentation; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.KeycloakServer; -import org.keycloak.util.JsonSerialization; - -import javax.servlet.DispatcherType; -import javax.servlet.Servlet; -import javax.ws.rs.core.Application; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.Socket; -import java.util.Map; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public abstract class AbstractKeycloakRule extends ExternalResource { - - protected TemporaryFolder temporaryFolder; - - protected KeycloakServer server; - - protected void before() throws Throwable { - temporaryFolder = new TemporaryFolder(); - temporaryFolder.create(); - System.setProperty("keycloak.tmp.dir", temporaryFolder.newFolder().getAbsolutePath()); - - server = new KeycloakServer(); - - configureServer(server); - - server.start(); - - removeTestRealms(); - - setupKeycloak(); - } - - protected void configureServer(KeycloakServer server) { - - } - - public UserRepresentation getUser(String realm, String name) { - KeycloakSession session = server.getSessionFactory().create(); - session.getTransactionManager().begin(); - try { - RealmModel realmByName = session.realms().getRealmByName(realm); - UserModel user = session.users().getUserByUsername(name, realmByName); - UserRepresentation userRep = user != null ? ModelToRepresentation.toRepresentation(session, realmByName, user) : null; - session.getTransactionManager().commit(); - return userRep; - } finally { - session.close(); - } - } - - public UserRepresentation getUserById(String realm, String id) { - KeycloakSession session = server.getSessionFactory().create(); - session.getTransactionManager().begin(); - try { - RealmModel realmByName = session.realms().getRealmByName(realm); - UserRepresentation userRep = ModelToRepresentation.toRepresentation(session, realmByName, session.users().getUserById(id, realmByName)); - session.getTransactionManager().commit(); - return userRep; - } finally { - session.close(); - } - } - - protected void setupKeycloak() { - KeycloakSession session = server.getSessionFactory().create(); - session.getTransactionManager().begin(); - - try { - RealmManager manager = new RealmManager(session); - - RealmModel adminstrationRealm = manager.getRealm(Config.getAdminRealm()); - - configure(session, manager, adminstrationRealm); - - session.getTransactionManager().commit(); - } finally { - session.close(); - } - } - - public void update(KeycloakRule.KeycloakSetup configurer, String realmId) { - KeycloakSession session = server.getSessionFactory().create(); - session.getTransactionManager().begin(); - - try { - RealmManager manager = new RealmManager(session); - manager.setContextPath("/auth"); - - RealmModel adminstrationRealm = manager.getRealm(Config.getAdminRealm()); - RealmModel appRealm = manager.getRealm(realmId); - - configurer.session = session; - configurer.config(manager, adminstrationRealm, appRealm); - - session.getTransactionManager().commit(); - } finally { - session.close(); - } - } - - protected void configure(KeycloakSession session, RealmManager manager, RealmModel adminRealm) { - - } - - public void deployServlet(String name, String contextPath, Class servletClass) { - DeploymentInfo deploymentInfo = createDeploymentInfo(name, contextPath, servletClass); - server.getServer().deploy(deploymentInfo); - } - - - public DeploymentInfo createDeploymentInfo(String name, String contextPath, Class servletClass) { - DeploymentInfo deploymentInfo = new DeploymentInfo(); - deploymentInfo.setClassLoader(getClass().getClassLoader()); - deploymentInfo.setDeploymentName(name); - deploymentInfo.setContextPath(contextPath); - - ServletInfo servlet = new ServletInfo(servletClass.getSimpleName(), servletClass); - servlet.addMapping("/*"); - - deploymentInfo.addServlet(servlet); - return deploymentInfo; - } - - - public DeploymentBuilder createApplicationDeployment() { - return new DeploymentBuilder(); - } - - public void addErrorPage(String errorPage, DeploymentInfo di) { - ServletInfo servlet = new ServletInfo("Error Page", ErrorServlet.class); - servlet.addMapping("/error.html"); - SecurityConstraint constraint = new SecurityConstraint(); - WebResourceCollection collection = new WebResourceCollection(); - collection.addUrlPattern("/error.html"); - constraint.addWebResourceCollection(collection); - constraint.setEmptyRoleSemantic(SecurityInfo.EmptyRoleSemantic.PERMIT); - di.addSecurityConstraint(constraint); - di.addServlet(servlet); - di - .addErrorPage(new ErrorPage(errorPage, 400)) - .addErrorPage(new ErrorPage(errorPage, 401)) - .addErrorPage(new ErrorPage(errorPage, 403)) - .addErrorPage(new ErrorPage(errorPage, 500)); - } - - public void deployJaxrsApplication(String name, String contextPath, Class applicationClass, Map initParams) { - ResteasyDeployment deployment = new ResteasyDeployment(); - deployment.setApplicationClass(applicationClass.getName()); - - DeploymentInfo di = server.getServer().undertowDeployment(deployment, ""); - di.setClassLoader(getClass().getClassLoader()); - di.setContextPath(contextPath); - di.setDeploymentName(name); - - for (Map.Entry param : initParams.entrySet()) { - di.addInitParameter(param.getKey(), param.getValue()); - } - - server.getServer().deploy(di); - } - - @Override - protected void after() { - removeTestRealms(); - stopServer(); - Time.setOffset(0); - - temporaryFolder.delete(); - System.getProperties().remove("keycloak.tmp.dir"); - } - - protected void removeTestRealms() { - KeycloakSession session = server.getSessionFactory().create(); - try { - session.getTransactionManager().begin(); - RealmManager realmManager = new RealmManager(session); - for (String realmName : getTestRealms()) { - RealmModel realm = realmManager.getRealmByName(realmName); - if (realm != null) { - realmManager.removeRealm(realm); - } - } - session.getTransactionManager().commit(); - } finally { - session.close(); - } - } - - public RealmRepresentation loadJson(String path) throws IOException { - InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path); - ByteArrayOutputStream os = new ByteArrayOutputStream(); - int c; - while ((c = is.read()) != -1) { - os.write(c); - } - byte[] bytes = os.toByteArray(); - return JsonSerialization.readValue(bytes, RealmRepresentation.class); - } - - public KeycloakSession startSession() { - KeycloakSession session = server.getSessionFactory().create(); - session.getTransactionManager().begin(); - return session; - } - - public void stopSession(KeycloakSession session, boolean commit) { - KeycloakTransaction transaction = session.getTransactionManager(); - if (commit && !transaction.getRollbackOnly()) { - transaction.commit(); - } else { - transaction.rollback(); - } - session.close(); - } - - public void restartServer() { - try { - stopServer(); - server.start(); - } catch (Throwable t) { - throw new RuntimeException(t); - } - } - - private void stopServer() { - server.stop(); - - // Add some variable delay (Some windows envs have issues as server is not stopped immediately after server.stop) - try { - Retry.execute(new Runnable() { - - @Override - public void run() { - try { - Socket s = new Socket(server.getConfig().getHost(), server.getConfig().getPort()); - s.close(); - throw new IllegalStateException("Server still running"); - } catch (IOException expected) { - } - } - - }, 10, 500); - Thread.sleep(100); - } catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - } - } - - protected String[] getTestRealms() { - return new String[]{"test", "demo"}; - } - - public class DeploymentBuilder { - - private String name; - private String contextPath; - private Class servletClass; - private String adapterConfigPath; - private String role; - private boolean isConstrained = true; - private Class keycloakConfigResolver; - private String constraintUrl = "/*"; - private String errorPage = "/error.html"; - - public DeploymentBuilder name(String name) { - this.name = name; - return this; - } - - public DeploymentBuilder contextPath(String contextPath) { - this.contextPath = contextPath; - return this; - } - - public DeploymentBuilder servletClass(Class servletClass) { - this.servletClass = servletClass; - return this; - } - - public DeploymentBuilder adapterConfigPath(String adapterConfigPath) { - this.adapterConfigPath = adapterConfigPath; - return this; - } - - public DeploymentBuilder role(String role) { - this.role = role; - return this; - } - - public DeploymentBuilder isConstrained(boolean isConstrained) { - this.isConstrained = isConstrained; - return this; - } - - public DeploymentBuilder keycloakConfigResolver(Class keycloakConfigResolver) { - this.keycloakConfigResolver = keycloakConfigResolver; - return this; - } - - public DeploymentBuilder constraintUrl(String constraintUrl) { - this.constraintUrl = constraintUrl; - return this; - } - - public DeploymentBuilder errorPage(String errorPage) { - this.errorPage = errorPage; - return this; - } - - public void deployApplication() { - DeploymentInfo di = createDeploymentInfo(name, contextPath, servletClass); - if (null == keycloakConfigResolver) { - di.addInitParameter("keycloak.config.file", adapterConfigPath); - } else { - di.addInitParameter("keycloak.config.resolver", keycloakConfigResolver.getCanonicalName()); - } - if (isConstrained) { - SecurityConstraint constraint = new SecurityConstraint(); - WebResourceCollection collection = new WebResourceCollection(); - collection.addUrlPattern(constraintUrl); - constraint.addWebResourceCollection(collection); - constraint.addRoleAllowed(role); - di.addSecurityConstraint(constraint); - } - LoginConfig loginConfig = new LoginConfig("KEYCLOAK", "demo", null, null); - di.setLoginConfig(loginConfig); - addErrorPage(errorPage, di); - - server.getServer().deploy(di); - } - - public void deployApplicationWithFilter() { - DeploymentInfo di = createDeploymentInfo(name, contextPath, servletClass); - FilterInfo filter = new FilterInfo("keycloak-filter", KeycloakOIDCFilter.class); - if (null == keycloakConfigResolver) { - filter.addInitParam("keycloak.config.file", adapterConfigPath); - } else { - filter.addInitParam("keycloak.config.resolver", keycloakConfigResolver.getCanonicalName()); - } - di.addFilter(filter); - di.addFilterUrlMapping("keycloak-filter", constraintUrl, DispatcherType.REQUEST); - server.getServer().deploy(di); - - - - } - - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/ErrorServlet.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/ErrorServlet.java deleted file mode 100755 index 5b9eaec650..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/ErrorServlet.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.rule; - -import org.keycloak.adapters.spi.AuthenticationError; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * @author Marek Posolda - */ -public class ErrorServlet extends HttpServlet { - public static AuthenticationError authError; - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - authError = (AuthenticationError)req.getAttribute(AuthenticationError.class.getName()); - - Integer statusCode = (Integer) req.getAttribute("javax.servlet.error.status_code"); - - resp.setContentType("text/html"); - PrintWriter pw = resp.getWriter(); - pw.printf("%s", "Error Page"); - pw.print("

There was an error

"); - if (statusCode != null) - pw.print("
HTTP status code: " + statusCode); - if (authError != null) - pw.print("
Error info: " + authError.toString()); - pw.print(""); - pw.flush(); - - - } - - @Override - protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - doGet(req, resp); - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/GreenMailRule.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/GreenMailRule.java deleted file mode 100755 index a56ce36ed8..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/GreenMailRule.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.rule; - -import com.icegreen.greenmail.util.GreenMail; -import com.icegreen.greenmail.util.ServerSetup; -import org.junit.rules.ExternalResource; -import org.keycloak.models.RealmModel; - -import javax.mail.internet.MimeMessage; -import java.lang.Thread.UncaughtExceptionHandler; -import java.net.SocketException; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Stian Thorgersen - */ -public class GreenMailRule extends ExternalResource { - - private GreenMail greenMail; - - @Override - protected void before() throws Throwable { - ServerSetup setup = new ServerSetup(3025, "localhost", "smtp"); - - greenMail = new GreenMail(setup); - greenMail.start(); - } - - @Override - protected void after() { - if (greenMail != null) { - // Suppress error from GreenMail on shutdown - Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() { - @Override - public void uncaughtException(Thread t, Throwable e) { - if (!(e.getCause() instanceof SocketException && t.getClass().getName() - .equals("com.icegreen.greenmail.smtp.SmtpHandler"))) { - System.err.print("Exception in thread \"" + t.getName() + "\" "); - e.printStackTrace(System.err); - } - } - }); - - greenMail.stop(); - } - } - - public void configureRealm(RealmModel realm) { - Map config = new HashMap<>(); - config.put("from", "auto@keycloak.org"); - config.put("host", "localhost"); - config.put("port", "3025"); - realm.setSmtpConfig(config); - } - - public MimeMessage[] getReceivedMessages() { - return greenMail.getReceivedMessages(); - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/KeycloakRule.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/KeycloakRule.java deleted file mode 100755 index 2904ef854e..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/KeycloakRule.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.rule; - -import org.junit.Assert; -import org.keycloak.Config; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserSessionModel; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.ApplicationServlet; - -import static org.junit.Assert.assertNotNull; - -/** - * @author Stian Thorgersen - */ -public class KeycloakRule extends AbstractKeycloakRule { - - private KeycloakSetup setup; - - public KeycloakRule() { - } - - public KeycloakRule(KeycloakSetup setup) { - this.setup = setup; - } - - @Override - protected void setupKeycloak() { - importRealm(); - - if (setup != null) { - configure(setup); - } - - deployServlet("app", "/app", ApplicationServlet.class); - } - - protected void importRealm() { - server.importRealm(getClass().getResourceAsStream("/testrealm.json")); - } - - public void configure(KeycloakSetup configurer) { - KeycloakSession session = server.getSessionFactory().create(); - session.getTransactionManager().begin(); - - try { - RealmManager manager = new RealmManager(session); - manager.setContextPath("/auth"); - - RealmModel adminstrationRealm = manager.getRealm(Config.getAdminRealm()); - RealmModel appRealm = manager.getRealm("test"); - - configurer.session = session; - configurer.config(manager, adminstrationRealm, appRealm); - - session.getTransactionManager().commit(); - } finally { - session.close(); - } - } - - public void update(KeycloakSetup configurer) { - update(configurer, "test"); - } - - - public void removeUserSession(String sessionId) { - KeycloakSession session = startSession(); - RealmModel realm = session.realms().getRealm("test"); - UserSessionModel userSession = session.sessions().getUserSession(realm, sessionId); - assertNotNull(userSession); - session.sessions().removeUserSession(realm, userSession); - stopSession(session, true); - } - - public abstract static class KeycloakSetup { - - protected KeycloakSession session; - - public abstract void config(RealmManager manager, RealmModel adminstrationRealm, RealmModel appRealm); - - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/LoggingRule.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/LoggingRule.java deleted file mode 100644 index a17ced41a3..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/LoggingRule.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.rule; - -import org.jboss.logging.Logger; -import org.junit.rules.TestRule; -import org.junit.runner.Description; -import org.junit.runners.model.Statement; - -/** - * @author Marek Posolda - */ -public class LoggingRule implements TestRule { - - private final Logger log; - - public LoggingRule(Object test) { - log = Logger.getLogger(test.getClass()); - } - - @Override - public Statement apply(final Statement base, final Description description) { - return new Statement() { - - @Override - public void evaluate() throws Throwable { - log.debugf("Before %s", description.getMethodName()); - - try { - base.evaluate(); - } finally { - log.debugf("After %s", description.getMethodName()); - } - - } - - }; - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/WebResource.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/WebResource.java deleted file mode 100644 index 172a07d2de..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/WebResource.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.rule; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * @author Stian Thorgersen - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface WebResource { -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/WebRule.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/WebRule.java deleted file mode 100755 index 0d93d19a21..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/WebRule.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.rule; - -import com.gargoylesoftware.htmlunit.WebClient; -import org.junit.rules.ExternalResource; -import org.keycloak.testsuite.OAuthClient; -import org.keycloak.testsuite.pages.AbstractPage; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.firefox.FirefoxDriver; -import org.openqa.selenium.support.PageFactory; - -import java.lang.reflect.Field; - -/** - * @author Stian Thorgersen - */ -public class WebRule extends ExternalResource { - - private WebDriver driver; - private OAuthClient oauth; - private Object test; - - public WebRule(Object test) { - this.test = test; - } - - public void initProperties() { - driver = createWebDriver(); - oauth = new OAuthClient(driver); - } - - @Override - public void before() throws Throwable { - initProperties(); - initWebResources(test); - } - - public static WebDriver createWebDriver() { - WebDriver driver; - String browser = "htmlunit"; - if (System.getProperty("browser") != null) { - browser = System.getProperty("browser"); - } - - if (browser.equals("htmlunit")) { - HtmlUnitDriver d = new HtmlUnitDriver(); - d.getWebClient().getOptions().setJavaScriptEnabled(true); - d.getWebClient().getOptions().setCssEnabled(false); - d.getWebClient().getOptions().setTimeout(1000000); - driver = d; - } else if (browser.equals("chrome")) { - driver = new ChromeDriver(); - } else if (browser.equals("firefox")) { - driver = new FirefoxDriver(); - } else { - throw new RuntimeException("Unsupported browser " + browser); - } - return driver; - } - - protected void initWebResources(Object o) { - Class c = o.getClass(); - while (c != null) { - for (Field f : c.getDeclaredFields()) { - if (f.getAnnotation(WebResource.class) != null) { - Class type = f.getType(); - if (type.equals(WebDriver.class)) { - set(f, o, driver); - } else if (AbstractPage.class.isAssignableFrom(type)) { - set(f, o, getPage(f.getType())); - } else if (type.equals(OAuthClient.class)) { - set(f, o, oauth); - } else { - throw new RuntimeException("Unsupported type " + f); - } - } - } - - c = c.getSuperclass(); - } - } - - protected void set(Field f, Object o, Object v) { - f.setAccessible(true); - try { - f.set(o, v); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - public WebDriver getDriver() { - return driver; - } - - public T getPage(Class pageClass) { - try { - T instance = pageClass.newInstance(); - initWebResources(instance); - PageFactory.initElements(driver, instance); - return instance; - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - @Override - public void after() { - driver.manage().deleteAllCookies(); - driver.close(); - } - - public static class HtmlUnitDriver extends org.openqa.selenium.htmlunit.HtmlUnitDriver { - - @Override - public WebClient getWebClient() { - return super.getWebClient(); - } - - } - -} diff --git a/testsuite/integration-deprecated/src/test/resources/META-INF/services/org.keycloak.events.EventListenerProviderFactory b/testsuite/integration-deprecated/src/test/resources/META-INF/services/org.keycloak.events.EventListenerProviderFactory deleted file mode 100644 index bf29a14fd9..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/META-INF/services/org.keycloak.events.EventListenerProviderFactory +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -org.keycloak.testsuite.AssertEvents \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-cookie-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-cookie-keycloak.json deleted file mode 100644 index 92fe860ae7..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-cookie-keycloak.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "realm": "demo", - "resource": "customer-cookie-portal", - "realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "expose-token": true, - "token-store": "cookie", - "credentials": { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-keycloak-relative.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-keycloak-relative.json deleted file mode 100755 index a796d1a2fc..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-keycloak-relative.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "customer-portal", - "auth-server-url": "/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-keycloak.json deleted file mode 100755 index e9ad98722c..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/cust-app-keycloak.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "realm": "demo", - "resource": "customer-portal", - "realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "expose-token": true, - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/customer-db-keycloak-relative.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/customer-db-keycloak-relative.json deleted file mode 100755 index c457468ace..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/customer-db-keycloak-relative.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "demo", - "resource" : "customer-db", - "auth-server-url": "/auth", - "ssl-required" : "external", - "bearer-only" : true, - "enable-cors" : true - -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/customer-db-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/customer-db-keycloak.json deleted file mode 100755 index 3df2760b48..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/customer-db-keycloak.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "realm" : "demo", - "resource" : "customer-db", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "bearer-only" : true, - "enable-basic-auth": true, - "enable-cors" : true - -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/demorealm-relative.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/demorealm-relative.json deleted file mode 100755 index 76886beba3..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/demorealm-relative.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "realm": "demo", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "account": [ "manage-account" ] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "third-party", - "roles": ["user"] - }, - { - "client": "customer-portal", - "roles": ["user"] - }, - { - "client": "product-portal", - "roles": ["user"] - } - - ], - "applications": [ - { - "name": "customer-portal", - "enabled": true, - "adminUrl": "/customer-portal", - "baseUrl": "/customer-portal", - "redirectUris": [ - "/customer-portal/*" - ], - "secret": "password" - }, - { - "name": "customer-portal-js", - "enabled": true, - "publicClient": true, - "baseUrl": "/customer-portal-js", - "redirectUris": [ - "/customer-portal-js/*" - ] - }, - { - "name": "customer-portal-cli", - "enabled": true, - "publicClient": true, - "redirectUris": [ - "urn:ietf:wg:oauth:2.0:oob", - "http://localhost" - ] - }, - { - "name": "product-portal", - "enabled": true, - "adminUrl": "/product-portal", - "baseUrl": "/product-portal", - "redirectUris": [ - "/product-portal/*" - ], - "secret": "password" - } - ], - "oauthClients": [ - { - "name": "third-party", - "enabled": true, - "redirectUris": [ - "/oauth-client/*", - "/oauth-client-cdi/*" - ], - "secret": "password" - } - ] -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/demorealm.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/demorealm.json deleted file mode 100755 index aaac871bd2..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/demorealm.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "id": "demo", - "realm": "demo", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "account": [ "manage-account" ] - } - }, - { - "username" : "mposolda", - "enabled": true, - "email" : "mposolda@redhat.com", - "firstName": "Marek", - "lastName": "Posolda", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "account": [ "manage-account" ] - } - }, - { - "username" : "topGroupUser", - "enabled": true, - "email" : "top@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "groups": [ - "/top" - ] - }, - { - "username" : "level2GroupUser", - "enabled": true, - "email" : "level2@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "groups": [ - "/top/level2" - ] - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "groups" : [ - { - "name": "top", - "attributes": { - "topAttribute": ["true"] - - }, - "realmRoles": ["user"], - "clientRoles": { - "account": ["manage-account"] - }, - "subGroups": [ - { - "name": "level2", - "realmRoles": ["admin"], - "attributes": { - "level2Attribute": ["true"] - - } - } - ] - } - ], - "scopeMappings": [ - { - "client": "third-party", - "roles": ["user"] - }, - { - "client": "customer-portal", - "roles": ["user"] - }, - { - "client": "product-portal", - "roles": ["user"] - } - - ], - "applications": [ - { - "name": "customer-portal", - "enabled": true, - "directAccessGrantsEnabled": true, - "adminUrl": "http://localhost:8081/customer-portal", - "baseUrl": "http://localhost:8081/customer-portal", - "redirectUris": [ - "http://localhost:8081/customer-portal/*" - ], - "secret": "password" - }, - { - "name": "customer-cookie-portal", - "enabled": true, - "baseUrl": "http://localhost:8081/customer-cookie-portal", - "redirectUris": [ - "http://localhost:8081/customer-cookie-portal/*" - ], - "secret": "password" - }, - { - "name": "customer-portal-js", - "enabled": true, - "publicClient": true, - "adminUrl": "http://localhost:8081/customer-portal-js", - "baseUrl": "http://localhost:8081/customer-portal-js", - "redirectUris": [ - "http://localhost:8080/customer-portal-js/*" - ] - }, - { - "name": "customer-portal-cli", - "enabled": true, - "publicClient": true, - "redirectUris": [ - "urn:ietf:wg:oauth:2.0:oob", - "http://localhost" - ] - }, - { - "name": "customer-portal-public", - "enabled": true, - "publicClient": true, - "directAccessGrantsEnabled": true - }, - { - "name": "product-portal", - "enabled": true, - "adminUrl": "http://localhost:8081/product-portal", - "baseUrl": "http://localhost:8081/product-portal", - "redirectUris": [ - "http://localhost:8081/product-portal/*" - ], - "secret": "password" - }, - { - "name": "secure-portal", - "enabled": true, - "adminUrl": "http://localhost:8081/secure-portal", - "baseUrl": "http://localhost:8081/secure-portal", - "clientAuthenticatorType": "client-jwt", - "redirectUris": [ - "http://localhost:8081/secure-portal/*" - ], - "attributes": { - "jwt.credential.certificate": "MIICnTCCAYUCBgFPPLDaTzANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdjbGllbnQxMB4XDTE1MDgxNzE3MjI0N1oXDTI1MDgxNzE3MjQyN1owEjEQMA4GA1UEAwwHY2xpZW50MTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIUjjgv+V3s96O+Za9002Lp/trtGuHBeaeVL9dFKMKzO2MPqdRmHB4PqNlDdd28Rwf5Xn6iWdFpyUKOnI/yXDLhdcuFpR0sMNK/C9Lt+hSpPFLuzDqgtPgDotlMxiHIWDOZ7g9/gPYNXbNvjv8nSiyqoguoCQiiafW90bPHsiVLdP7ZIUwCcfi1qQm7FhxRJ1NiW5dvUkuCnnWEf0XR+Wzc5eC9EgB0taLFiPsSEIlWMm5xlahYyXkPdNOqZjiRnrTWm5Y4uk8ZcsD/KbPTf/7t7cQXipVaswgjdYi1kK2/zRwOhg1QwWFX/qmvdd+fLxV0R6VqRDhn7Qep2cxwMxLsCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAKE6OA46sf20bz8LZPoiNsqRwBUDkaMGXfnob7s/hJZIIwDEx0IAQ3uKsG7q9wb+aA6s+v7S340zb2k3IxuhFaHaZpAd4CyR5cn1FHylbzoZ7rI/3ASqHDqpljdJaFqPH+m7nZWtyDvtZf+gkZ8OjsndwsSBK1d/jMZPp29qYbl1+XfO7RCp/jDqro/R3saYFaIFiEZPeKn1hUJn6BO48vxH1xspSu9FmlvDOEAOz4AuM58z4zRMP49GcFdCWr1wkonJUHaSptJaQwmBwLFUkCbE5I1ixGMb7mjEud6Y5jhfzJiZMo2U8RfcjNbrN0diZl3jB6LQIwESnhYSghaTjNQ==" - } - }, - { - "name": "session-portal", - "enabled": true, - "adminUrl": "http://localhost:8081/session-portal", - "baseUrl": "http://localhost:8081/session-portal", - "redirectUris": [ - "http://localhost:8081/session-portal/*" - ], - "secret": "password" - }, - { - "name": "input-portal", - "enabled": true, - "adminUrl": "http://localhost:8081/input-portal", - "baseUrl": "http://localhost:8081/input-portal", - "redirectUris": [ - "http://localhost:8081/input-portal/*" - ], - "secret": "password" - } - ], - "oauthClients": [ - { - "name": "third-party", - "enabled": true, - "redirectUris": [ - "http://localhost:8081/oauth-client/*", - "http://localhost:8081/oauth-client-cdi/*" - ], - "secret": "password" - } - ] -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/input-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/input-keycloak.json deleted file mode 100755 index 0b4b165302..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/input-keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "input-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://${my.host.name}:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/no-access-token.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/no-access-token.json deleted file mode 100644 index 9c8cb7ea43..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/no-access-token.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "realm" : "demo", - "resource" : "no-access-token", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://${my.host.name}:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - }, - "ignore-oauth-query-parameter": true -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/product-autodetect-bearer-only-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/product-autodetect-bearer-only-keycloak.json deleted file mode 100644 index b92abc6dc4..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/product-autodetect-bearer-only-keycloak.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "realm" : "demo", - "resource" : "product-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - }, - "autodetect-bearer-only" : true -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/product-keycloak-relative.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/product-keycloak-relative.json deleted file mode 100755 index 9ef62ff67a..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/product-keycloak-relative.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "demo", - "resource" : "product-portal", - "auth-server-url" : "/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/product-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/product-keycloak.json deleted file mode 100755 index 3cfd478157..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/product-keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "product-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/secure-portal-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/secure-portal-keycloak.json deleted file mode 100755 index 3500790725..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/secure-portal-keycloak.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "realm" : "demo", - "resource" : "secure-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials" : { - "jwt": { - "client-keystore-file": "classpath:adapter-test/secure-portal-keystore.jks", - "client-keystore-type": "JKS", - "client-keystore-password": "storepass", - "client-key-password": "keypass", - "client-key-alias": "clientkey", - "token-expiration": 10 - } - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/secure-portal-keystore.jks b/testsuite/integration-deprecated/src/test/resources/adapter-test/secure-portal-keystore.jks deleted file mode 100644 index 9b2a4d6753..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/adapter-test/secure-portal-keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/session-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/session-keycloak.json deleted file mode 100644 index 6a7f60b45c..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/session-keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "session-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://${my.host.name}:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant1-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant1-keycloak.json deleted file mode 100644 index 80bff8eaac..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant1-keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "tenant1", - "resource" : "multi-tenant", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant1-realm.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant1-realm.json deleted file mode 100644 index 06a5f411cb..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant1-realm.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "id": "tenant1", - "realm": "tenant1", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "multi-tenant": [ "user" ] - } - }, - { - "username" : "user-tenant1", - "enabled": true, - "email" : "user-tenant1@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "user-tenant1" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "multi-tenant": [ "user" ] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "multi-tenant", - "roles": ["user"] - } - - ], - "applications": [ - { - "name": "multi-tenant", - "enabled": true, - "adminUrl": "http://localhost:8081/multi-tenant", - "baseUrl": "http://localhost:8081/multi-tenant", - "redirectUris": [ - "http://localhost:8081/multi-tenant/*" - ], - "secret": "password" - } - ] -} diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant2-keycloak.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant2-keycloak.json deleted file mode 100644 index deb538d2b8..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant2-keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "tenant2", - "resource" : "multi-tenant", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant2-realm.json b/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant2-realm.json deleted file mode 100644 index 4f03b5c1c1..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/adapter-test/tenant2-realm.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "id": "tenant2", - "realm": "tenant2", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "multi-tenant": [ "user" ] - } - }, - { - "username" : "user-tenant2", - "enabled": true, - "email" : "user-tenant2@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "user-tenant2" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "multi-tenant": [ "user" ] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "multi-tenant", - "roles": ["user"] - } - - ], - "applications": [ - { - "name": "multi-tenant", - "enabled": true, - "adminUrl": "http://localhost:8081/multi-tenant", - "baseUrl": "http://localhost:8081/multi-tenant", - "redirectUris": [ - "http://localhost:8081/multi-tenant/*" - ], - "secret": "password" - } - ] -} diff --git a/testsuite/integration-deprecated/src/test/resources/broker-test/realm-with-oidc-property-mappers.json b/testsuite/integration-deprecated/src/test/resources/broker-test/realm-with-oidc-property-mappers.json deleted file mode 100755 index dbe824ddbe..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/broker-test/realm-with-oidc-property-mappers.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "id": "realm-with-oidc-idp-property-mappers", - "realm": "realm-with-oidc-idp-property-mappers", - "enabled": true, - "requiredCredentials": [ "password" ], - "defaultRoles": [ "foo", "bar" ], - "privateKey": "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCCPyvTTb14vSMkpe/pds2P5Cqxk7bkeFnQiNMS1vyZ+HS2O79fxzp1eAguHnBTs4XTRT7SZJhIT/6utgqZjmDigKV5N7X5ptq8BM/W1qa1cYBRip261pc+tWf3IywJYQ9yFI9mUQarmIEl0D7GH16NSZklheaWfbodRVarvX+ML0amNtGYVDft/RftYmgbKKrK218qQp9R4GZFtf/Q/RmboNXN7weMINU8GWVkTRrccKBIXSunT6zXGfuj3Wp1YpVq20BWwY2OMM/P+yDAc7LKEO1LJqPBdT4r9BRn2lXiaga3AL24gTKZPKU/tu7uqfFciF+i4Rr58SMDNOzQcnklAgMBAAECggEAc0eibJYEO5d8QXW1kPgcHV2gBChv2mxDYnWYDLbIQSdNdfYP/qABt/MTmm5KkWr16fcCEYoD1w0mqFBrtVn1msSusUmEAYGTXJMNumOmjjX1kzaTQMmqeFBrwqwYz/xehWR5P+A7fSmwNV3KEeW19GvN5w5K96w0TLAQdFV3TQVPSytusDunwuR1yltMe1voaEDZ9z0Pi08YiEk2f6xhj5CMkoiw3mNImzfruphHullxU4FD05fH6tDeJ381527ILpAzDsgYZh4aFLKjUHem96bX4EL7FIzBJ6okgN78AZnUC/EaVfgFTw0qfhoWvZV4ruVXXiMhCg4CMMRDq/k9iQKBgQDBNWsJMT84OnnWmQoJmZogkFV+tsGrSK6Re+aJxLWpishh7dwAnT2OcagZvVdUb0FwNWu1D0B9/SKDDMRnnHBhOGDpH57m/eQdRU0oX1BD27xvffk0lLcfD4BTxnR5e9jss8K4twc9jf0P1rxC/loGJ2NtCH0BrPHgz54Ea+96ewKBgQCsk3JDaaPnFwzVYm2BXlhxOxLPsF4wvD2rIRAswZV4C5xebjand8nwiMmVpNd0PRLkEnkI+waURGv2EY/P3JsssoiY8Xqe8f/1G+SQKre7lbqOas8rFoALepC0BYDiZDFy0Z9ZnRAFzRI5sgIt7jpoMRD4xDNlmiV8X+yBxc3Y3wKBgQChDQsU1YUyNKQ8+sLAL9anEEkD4Ald4q8JPHN2IY+gLLxNzT0XEfsu0pTiJ8805axxgUYv3e/PVYNAJBNPnrqaf6lgiegl+jr9Hzhqz9CTUAYqFaL2boSakoxQyNtsLI0s+cb1vDN/3uy0GDZDzcty18BsMagqDmRtFgNNAj/UIwKBgQCahbeFBv0cOPZjxisY8Bou4N8aGehsqNBq/0LVYExuXa8YmoTTdJ3bgw9Er4G/ccQNdUDsuqAMeCtW/CiRzQ0ge4d1sprB4Rv3I4+HSsiS7SFKzfZLtWzXWlpg5qCdlWr1TR7qhYjIOPO9t1beO3YOvwhcRoliyyAPenBxTmTfbwKBgDtm2WJ5VlQgNpIdOs1CCiqd0DFmWOmvBPspPC1kySiy+Ndr9jNohRZkR7pEjgqA5E8rdzc88LirUN7bY5HFHRWN9KXrs5/o3O1K3GFCp64N6nvnPEYZ2zSJalcMC2fjSsJg26z8Dg1H+gfTIDUMoGiEAAnJXuqk+WayPU+fZMLn", - "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQAB", - "clients" : [ - { - "clientId": "broker-app", - "consentRequired": "false", - "enabled": true, - "fullScopeAllowed": true, - "secret": "secret", - "defaultClientScopes": [ "roles", "web-origins" ], - "redirectUris": [ - "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-oidc-idp-property-mappers/endpoint/*" - ], - "protocolMappers": [ - { - "name": "tenantid", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "user.attribute": "tenantid", - "claim.name": "tenantid", - "Claim JSON Type": "String", - "access.token.claim": "false", - "id.token.claim": "false", - "userinfo.token.claim": "true" - } - }, - { - "name": "mobile", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "user.attribute": "mobile", - "claim.name": "mobile", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true" - - } - }, - { - "name": "username", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "username", - "claim.name": "preferred_username", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true" - - } - }, - { - "name": "email", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "email", - "claim.name": "email", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true" - - } - }, - { - "name": "given name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "firstName", - "claim.name": "given_name", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true" - - } - }, - { - "name": "family name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "lastName", - "claim.name": "family_name", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true" - - } - } - ] - } - ], - "scopeMappings": [ - { - "client": "broker-app", - "roles": ["manager"] - } - ], - "users": [ - { - "username" : "test-user", - "enabled": true, - "email" : "test-user@localhost", - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"], - "attributes": { - "mobile": "617-666-7777", - "tenantid": "A00" - } - }, - { - "username" : "test-user-noemail", - "enabled": true, - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - }, - { - "username" : "pedroigor", - "enabled": true, - "email" : "psilva@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - } - ] - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/broker-test/realm-with-saml-property-mappers.json b/testsuite/integration-deprecated/src/test/resources/broker-test/realm-with-saml-property-mappers.json deleted file mode 100755 index 3703c7b2f1..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/broker-test/realm-with-saml-property-mappers.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "id": "realm-with-saml-idp-property-mappers", - "realm": "realm-with-saml-idp-property-mappers", - "enabled": true, - "requiredCredentials": [ "password" ], - "defaultRoles": [ "foo", "bar" ], - "privateKey": "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCCPyvTTb14vSMkpe/pds2P5Cqxk7bkeFnQiNMS1vyZ+HS2O79fxzp1eAguHnBTs4XTRT7SZJhIT/6utgqZjmDigKV5N7X5ptq8BM/W1qa1cYBRip261pc+tWf3IywJYQ9yFI9mUQarmIEl0D7GH16NSZklheaWfbodRVarvX+ML0amNtGYVDft/RftYmgbKKrK218qQp9R4GZFtf/Q/RmboNXN7weMINU8GWVkTRrccKBIXSunT6zXGfuj3Wp1YpVq20BWwY2OMM/P+yDAc7LKEO1LJqPBdT4r9BRn2lXiaga3AL24gTKZPKU/tu7uqfFciF+i4Rr58SMDNOzQcnklAgMBAAECggEAc0eibJYEO5d8QXW1kPgcHV2gBChv2mxDYnWYDLbIQSdNdfYP/qABt/MTmm5KkWr16fcCEYoD1w0mqFBrtVn1msSusUmEAYGTXJMNumOmjjX1kzaTQMmqeFBrwqwYz/xehWR5P+A7fSmwNV3KEeW19GvN5w5K96w0TLAQdFV3TQVPSytusDunwuR1yltMe1voaEDZ9z0Pi08YiEk2f6xhj5CMkoiw3mNImzfruphHullxU4FD05fH6tDeJ381527ILpAzDsgYZh4aFLKjUHem96bX4EL7FIzBJ6okgN78AZnUC/EaVfgFTw0qfhoWvZV4ruVXXiMhCg4CMMRDq/k9iQKBgQDBNWsJMT84OnnWmQoJmZogkFV+tsGrSK6Re+aJxLWpishh7dwAnT2OcagZvVdUb0FwNWu1D0B9/SKDDMRnnHBhOGDpH57m/eQdRU0oX1BD27xvffk0lLcfD4BTxnR5e9jss8K4twc9jf0P1rxC/loGJ2NtCH0BrPHgz54Ea+96ewKBgQCsk3JDaaPnFwzVYm2BXlhxOxLPsF4wvD2rIRAswZV4C5xebjand8nwiMmVpNd0PRLkEnkI+waURGv2EY/P3JsssoiY8Xqe8f/1G+SQKre7lbqOas8rFoALepC0BYDiZDFy0Z9ZnRAFzRI5sgIt7jpoMRD4xDNlmiV8X+yBxc3Y3wKBgQChDQsU1YUyNKQ8+sLAL9anEEkD4Ald4q8JPHN2IY+gLLxNzT0XEfsu0pTiJ8805axxgUYv3e/PVYNAJBNPnrqaf6lgiegl+jr9Hzhqz9CTUAYqFaL2boSakoxQyNtsLI0s+cb1vDN/3uy0GDZDzcty18BsMagqDmRtFgNNAj/UIwKBgQCahbeFBv0cOPZjxisY8Bou4N8aGehsqNBq/0LVYExuXa8YmoTTdJ3bgw9Er4G/ccQNdUDsuqAMeCtW/CiRzQ0ge4d1sprB4Rv3I4+HSsiS7SFKzfZLtWzXWlpg5qCdlWr1TR7qhYjIOPO9t1beO3YOvwhcRoliyyAPenBxTmTfbwKBgDtm2WJ5VlQgNpIdOs1CCiqd0DFmWOmvBPspPC1kySiy+Ndr9jNohRZkR7pEjgqA5E8rdzc88LirUN7bY5HFHRWN9KXrs5/o3O1K3GFCp64N6nvnPEYZ2zSJalcMC2fjSsJg26z8Dg1H+gfTIDUMoGiEAAnJXuqk+WayPU+fZMLn", - "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQAB", - "clients": [ - { - "clientId": "http://localhost:8081/auth/realms/realm-with-broker", - "enabled": true, - "protocol": "saml", - "redirectUris": [ - "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-idp-property-mappers/endpoint" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_single_logout_service_url_post": "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-idp-property-mappers/endpoint", - "saml_assertion_consumer_url_post": "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-idp-property-mappers/endpoint", - "saml_force_name_id_format": "true", - "saml_name_id_format": "username" - - }, - "protocolMappers": [ - { - "name": "role list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "attribute.name": "Role", - "attribute.nameformat": "Basic", - "single": "false" - - } - }, - { - "name": "email", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "email", - "attribute.name": "email", - "attribute.nameformat": "urn:oasis:names:tc:SAML:2.0:attrname-format:uri" - } - }, - { - "name": "firstName", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "firstName", - "attribute.name": "firstName", - "attribute.nameformat": "urn:oasis:names:tc:SAML:2.0:attrname-format:uri", - "friendly.name": "firstName" - } - }, - { - "name": "lastName", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "lastName", - "attribute.name": "lastName", - "attribute.nameformat": "urn:oasis:names:tc:SAML:2.0:attrname-format:uri", - "friendly.name": "lastName" - } - } - - ] - - } - ], - "users": [ - { - "username" : "test-user", - "enabled": true, - "email" : "test-user@localhost", - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"], - "attributes": { - "mobile": "617-666-7777" - } - }, - { - "username" : "test-user-noemail", - "enabled": true, - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - }, - { - "username" : "pedroigor", - "enabled": true, - "email" : "psilva@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - } - ] - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/broker-test/test-app-keycloak.json b/testsuite/integration-deprecated/src/test/resources/broker-test/test-app-keycloak.json deleted file mode 100755 index 439e271eae..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/broker-test/test-app-keycloak.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "realm": "realm-with-broker", - "resource": "test-app", - "realm-public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "expose-token": true, - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-kc-oidc.json b/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-kc-oidc.json deleted file mode 100755 index 05cb0e9340..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-kc-oidc.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "id": "realm-with-oidc-identity-provider", - "realm": "realm-with-oidc-identity-provider", - "enabled": true, - "requiredCredentials": [ "password" ], - "defaultRoles": [ "foo", "bar" ], - "privateKey": "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCCPyvTTb14vSMkpe/pds2P5Cqxk7bkeFnQiNMS1vyZ+HS2O79fxzp1eAguHnBTs4XTRT7SZJhIT/6utgqZjmDigKV5N7X5ptq8BM/W1qa1cYBRip261pc+tWf3IywJYQ9yFI9mUQarmIEl0D7GH16NSZklheaWfbodRVarvX+ML0amNtGYVDft/RftYmgbKKrK218qQp9R4GZFtf/Q/RmboNXN7weMINU8GWVkTRrccKBIXSunT6zXGfuj3Wp1YpVq20BWwY2OMM/P+yDAc7LKEO1LJqPBdT4r9BRn2lXiaga3AL24gTKZPKU/tu7uqfFciF+i4Rr58SMDNOzQcnklAgMBAAECggEAc0eibJYEO5d8QXW1kPgcHV2gBChv2mxDYnWYDLbIQSdNdfYP/qABt/MTmm5KkWr16fcCEYoD1w0mqFBrtVn1msSusUmEAYGTXJMNumOmjjX1kzaTQMmqeFBrwqwYz/xehWR5P+A7fSmwNV3KEeW19GvN5w5K96w0TLAQdFV3TQVPSytusDunwuR1yltMe1voaEDZ9z0Pi08YiEk2f6xhj5CMkoiw3mNImzfruphHullxU4FD05fH6tDeJ381527ILpAzDsgYZh4aFLKjUHem96bX4EL7FIzBJ6okgN78AZnUC/EaVfgFTw0qfhoWvZV4ruVXXiMhCg4CMMRDq/k9iQKBgQDBNWsJMT84OnnWmQoJmZogkFV+tsGrSK6Re+aJxLWpishh7dwAnT2OcagZvVdUb0FwNWu1D0B9/SKDDMRnnHBhOGDpH57m/eQdRU0oX1BD27xvffk0lLcfD4BTxnR5e9jss8K4twc9jf0P1rxC/loGJ2NtCH0BrPHgz54Ea+96ewKBgQCsk3JDaaPnFwzVYm2BXlhxOxLPsF4wvD2rIRAswZV4C5xebjand8nwiMmVpNd0PRLkEnkI+waURGv2EY/P3JsssoiY8Xqe8f/1G+SQKre7lbqOas8rFoALepC0BYDiZDFy0Z9ZnRAFzRI5sgIt7jpoMRD4xDNlmiV8X+yBxc3Y3wKBgQChDQsU1YUyNKQ8+sLAL9anEEkD4Ald4q8JPHN2IY+gLLxNzT0XEfsu0pTiJ8805axxgUYv3e/PVYNAJBNPnrqaf6lgiegl+jr9Hzhqz9CTUAYqFaL2boSakoxQyNtsLI0s+cb1vDN/3uy0GDZDzcty18BsMagqDmRtFgNNAj/UIwKBgQCahbeFBv0cOPZjxisY8Bou4N8aGehsqNBq/0LVYExuXa8YmoTTdJ3bgw9Er4G/ccQNdUDsuqAMeCtW/CiRzQ0ge4d1sprB4Rv3I4+HSsiS7SFKzfZLtWzXWlpg5qCdlWr1TR7qhYjIOPO9t1beO3YOvwhcRoliyyAPenBxTmTfbwKBgDtm2WJ5VlQgNpIdOs1CCiqd0DFmWOmvBPspPC1kySiy+Ndr9jNohRZkR7pEjgqA5E8rdzc88LirUN7bY5HFHRWN9KXrs5/o3O1K3GFCp64N6nvnPEYZ2zSJalcMC2fjSsJg26z8Dg1H+gfTIDUMoGiEAAnJXuqk+WayPU+fZMLn", - "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQAB", - "clients" : [ - { - "clientId": "broker-app", - "consentRequired": "false", - "enabled": true, - "secret": "secret", - "redirectUris": [ - "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-oidc-idp/endpoint/*" - ], - "protocolMappers": [ - { - "name": "mobile", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "user.attribute": "mobile", - "claim.name": "mobile", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "username", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "username", - "claim.name": "preferred_username", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "email", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "email", - "claim.name": "email", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "given name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "firstName", - "claim.name": "given_name", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "family name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "lastName", - "claim.name": "family_name", - "Claim JSON Type": "String", - "access.token.claim": "true", - "id.token.claim": "true" - } - }, - { - "name": "full name", - "protocol": "openid-connect", - "protocolMapper": "oidc-full-name-mapper", - "consentRequired": false, - "config": { - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - } - - ] - } - ], - "scopeMappings": [ - { - "client": "broker-app", - "roles": ["manager"] - } - ], - "users": [ - { - "username" : "test-user", - "enabled": true, - "email" : "test-user@localhost", - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"], - "applicationRoles": { - "account": [ "manage-account" ] - }, - "attributes": { - "mobile": "617-666-7777" - } - }, - { - "username" : "test-user-noemail", - "enabled": true, - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"], - "applicationRoles": { - "account": [ "manage-account" ] - } - }, - { - "username" : "pedroigor", - "enabled": true, - "email" : "psilva@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"], - "applicationRoles": { - "account": [ "manage-account" ] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - } - ] - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-saml-with-signature.json b/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-saml-with-signature.json deleted file mode 100755 index b31e3437b0..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-saml-with-signature.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "id": "realm-with-saml-signed-idp", - "realm": "realm-with-saml-signed-idp", - "enabled": true, - "requiredCredentials": [ "password" ], - "defaultRoles": [ "foo", "bar" ], - "privateKey": "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCCPyvTTb14vSMkpe/pds2P5Cqxk7bkeFnQiNMS1vyZ+HS2O79fxzp1eAguHnBTs4XTRT7SZJhIT/6utgqZjmDigKV5N7X5ptq8BM/W1qa1cYBRip261pc+tWf3IywJYQ9yFI9mUQarmIEl0D7GH16NSZklheaWfbodRVarvX+ML0amNtGYVDft/RftYmgbKKrK218qQp9R4GZFtf/Q/RmboNXN7weMINU8GWVkTRrccKBIXSunT6zXGfuj3Wp1YpVq20BWwY2OMM/P+yDAc7LKEO1LJqPBdT4r9BRn2lXiaga3AL24gTKZPKU/tu7uqfFciF+i4Rr58SMDNOzQcnklAgMBAAECggEAc0eibJYEO5d8QXW1kPgcHV2gBChv2mxDYnWYDLbIQSdNdfYP/qABt/MTmm5KkWr16fcCEYoD1w0mqFBrtVn1msSusUmEAYGTXJMNumOmjjX1kzaTQMmqeFBrwqwYz/xehWR5P+A7fSmwNV3KEeW19GvN5w5K96w0TLAQdFV3TQVPSytusDunwuR1yltMe1voaEDZ9z0Pi08YiEk2f6xhj5CMkoiw3mNImzfruphHullxU4FD05fH6tDeJ381527ILpAzDsgYZh4aFLKjUHem96bX4EL7FIzBJ6okgN78AZnUC/EaVfgFTw0qfhoWvZV4ruVXXiMhCg4CMMRDq/k9iQKBgQDBNWsJMT84OnnWmQoJmZogkFV+tsGrSK6Re+aJxLWpishh7dwAnT2OcagZvVdUb0FwNWu1D0B9/SKDDMRnnHBhOGDpH57m/eQdRU0oX1BD27xvffk0lLcfD4BTxnR5e9jss8K4twc9jf0P1rxC/loGJ2NtCH0BrPHgz54Ea+96ewKBgQCsk3JDaaPnFwzVYm2BXlhxOxLPsF4wvD2rIRAswZV4C5xebjand8nwiMmVpNd0PRLkEnkI+waURGv2EY/P3JsssoiY8Xqe8f/1G+SQKre7lbqOas8rFoALepC0BYDiZDFy0Z9ZnRAFzRI5sgIt7jpoMRD4xDNlmiV8X+yBxc3Y3wKBgQChDQsU1YUyNKQ8+sLAL9anEEkD4Ald4q8JPHN2IY+gLLxNzT0XEfsu0pTiJ8805axxgUYv3e/PVYNAJBNPnrqaf6lgiegl+jr9Hzhqz9CTUAYqFaL2boSakoxQyNtsLI0s+cb1vDN/3uy0GDZDzcty18BsMagqDmRtFgNNAj/UIwKBgQCahbeFBv0cOPZjxisY8Bou4N8aGehsqNBq/0LVYExuXa8YmoTTdJ3bgw9Er4G/ccQNdUDsuqAMeCtW/CiRzQ0ge4d1sprB4Rv3I4+HSsiS7SFKzfZLtWzXWlpg5qCdlWr1TR7qhYjIOPO9t1beO3YOvwhcRoliyyAPenBxTmTfbwKBgDtm2WJ5VlQgNpIdOs1CCiqd0DFmWOmvBPspPC1kySiy+Ndr9jNohRZkR7pEjgqA5E8rdzc88LirUN7bY5HFHRWN9KXrs5/o3O1K3GFCp64N6nvnPEYZ2zSJalcMC2fjSsJg26z8Dg1H+gfTIDUMoGiEAAnJXuqk+WayPU+fZMLn", - "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQAB", - "clients": [ - { - "clientId": "http://localhost:8081/auth/realms/realm-with-broker", - "protocol": "saml", - "enabled": true, - "redirectUris": [ - "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-signed-idp/endpoint" - ], - "attributes": { - "saml_single_logout_service_url_post": "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-signed-idp/endpoint", - "saml_assertion_consumer_url_post": "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-signed-idp/endpoint", - "saml_force_name_id_format": "true", - "saml_name_id_format": "username", - "saml.assertion.signature": "true", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.private.key": "MIIEogIBAAKCAQEAhknmzvSMWpiwKb9+eLtFB8ImIAu9tyN7xUTntdeoKEbWiihQWJh1xPSXZnNCtgQLbNfiZDB3ribUXcqtLaejRsCMpt7aLk0uPlocXm9HnJ6JQB+ytAG+DghFxuoun955z6uRgcv93+dkvUUwUJp+I/rFnV+DgiVkxojCeYnJEoeYJpjV2lQnum1RfqdCV2qWXUELEy2FXS22M3olYN0sUOqv7kPOIRjMxrRrg8p19NLL5qMrdAX/SQBef2wmbnCabqT5ziffxATrFkvOca9oAO4tu3IPAui6vYaayxxGSLOIwCJZcA9RMniRji9d7zClZqUW78sLW43tTLiiYHjkkQIDAQABAoIBAHpCOgJdHpM0w92eW/Rq+pPvrGoshlJ/2aVl8FbbulrA833g6hVe6Imh7Vz2vtubnxM/EPwKLEu/SkUBytzv7HTzxJn/9j+FQP6/Z2iKg3YR1/8rXLUJiRCZc31/o2clU11AZD75i28X6d1vamdX4FO9ccCvPrl0deVSiUvBp/BXcpzvv2OCPbXFheFid8tfA4TcGn/F7we8ysO8NkEfGV9xDnmcA62gHrH1m784KdGF1Tf+UugMN5sLxlQMxqOvz81pjclskK53v7Yvs/O0kS4ikU1liHCbrvOVbOz7qUtLg9jCSbYH+AZisl2WmcBP1w35WVt5NwQ/KABtnaEKwakCgYEA0SHZ44g/6WQG92zzb8/6IRiE35arC+Q+E5us+vaVv3OTsHk4Dt5RGhZBwBd58BS875H8fG3VJawskmrzRXzHnBqkFFOJ3UTnD3eiI0TrJXiRk1Bz6v1Y27mTUWHk4M3J1/bHv31yqg7gI7MLE7k+vh2iMzacBUdp0cCkm/xf1tMCgYEApGIxSdEUujbXgPRuSN8pEW2MYmxQtZE4qq7E0yyIPHcCI8UC1ZuLOcFk8O0tZWN9Qn99bAESWIEn65/2Onxc9WGiD77K5aR349ltvNZaS/FwOwfTcR0d2O0N6WdlCcCsegeDzBXxEtJfSMsDg04yZtgVDwC/Y90k3slDW6rLwIsCgYBM2NWKCH0DtB/jN4PUqGXPV4Ur6996hSpSZjgQGCA6s6ung0OYIxVGMruCbJ4AHH64wbo3ttxF9ZiDTQ2LkSiAMkHsvi3Awxrs0hcgQqjtofpMWZne1a2bP/vkQcaq3LO4yhPoR56k4sZ2F8qQOtfVYGpDy2NVhUJbMyDJuNk2xQKBgE08md4OMEgChqVftAXnXPuEVobUT+PP9Sk1buOuM+D9JfM6mUdWi0c62DvfpQnTgkJhdsPtiPouzVwH0ADQ+DiPhD8TrW/TJEXZnpcwvEKckdgaqD2oqaKIV5YIb8/ySNgZedLFqHzofb7NLLxgXIw4EUT4W/UHLlDDjjOe/5dbAoGAEYT4MN1lU2Qg8s3r0MCckj4YN41w+d9/Bxm8HTNffofKQf5k8QGlCx/UwcUO03sMq9/nHE7AmLi1QboQgfJxb3NAKG1YTjG9vtKhrS7wYuGh/mnZIOpgymNrAZJ1IpboGGKjefcpmmpIXO1QIH7RrAoofPsJerom2F841WGcSfo=", - "saml.signing.certificate": "MIICwzCCAasCBgFlqZ1FNTANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpyZWFsbS13aXRoLXNhbWwtc2lnbmVkLWlkcDAeFw0xODA5MDUxMjAxMjFaFw0yODA5MDUxMjAzMDFaMCUxIzAhBgNVBAMMGnJlYWxtLXdpdGgtc2FtbC1zaWduZWQtaWRwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBRiW8PXdVr1aGaLrlVIJHvqQiPXh2/ZB+An0Ed7gH03mWGMiC63O3kisrhFGD8uS7YVlIxOfINyB1IT0XJ51Vxo0lWimcKTXzA7MjWlHoWnR9ZmvPiWZpjjAvyxl0nSqJWk2gtRD/PHNgJpqmISnyFqLIJqbr2Zk3Jv87j0CyPoUKMnSOXZYI+HQhgUJyY9CyyIVGrWTs21dkuG4Z9bYzcDYW3zPwt7zWgCd4wr/Gg2ZJeIpdlcfg30Dn2nkkDDpnEIEq/MtLam9Q1/f6T/XyaIEOyWDMDs62bvNtFlt0d4q2oOWJNyEYDAoSnx7x+/ac0Y8EYGRrNpmpiXwUxt2th" - }, - "protocolMappers": [ - { - "name": "role list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "attribute.name": "Role", - "attribute.nameformat": "Basic", - "single": "false" - - } - }, - { - "name": "mobile", - "protocol": "saml", - "protocolMapper": "saml-user-attribute-mapper", - "consentRequired": false, - "config": { - "user.attribute": "mobile", - "attribute.name": "mobile", - "attribute.nameformat": "Basic" - } - }, - { - "name": "email", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "email", - "attribute.name": "urn:oid:1.2.840.113549.1.9.1", - "attribute.nameformat": "urn:oasis:names:tc:SAML:2.0:attrname-format:uri", - "friendly.name": "email" - } - } - - ] - } - ], - "users": [ - { - "username" : "test-user", - "enabled": true, - "email" : "test-user@localhost", - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"], - "attributes": { - "mobile": "617-666-7777" - } - }, - { - "username" : "test-user-noemail", - "enabled": true, - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - }, - { - "username" : "pedroigor", - "enabled": true, - "email" : "psilva@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - } - ] - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-saml.json b/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-saml.json deleted file mode 100755 index 00236b6d00..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/broker-test/test-broker-realm-with-saml.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "id": "realm-with-saml-idp-basic", - "realm": "realm-with-saml-idp-basic", - "enabled": true, - "requiredCredentials": [ "password" ], - "defaultRoles": [ "foo", "bar" ], - "privateKey": "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCCPyvTTb14vSMkpe/pds2P5Cqxk7bkeFnQiNMS1vyZ+HS2O79fxzp1eAguHnBTs4XTRT7SZJhIT/6utgqZjmDigKV5N7X5ptq8BM/W1qa1cYBRip261pc+tWf3IywJYQ9yFI9mUQarmIEl0D7GH16NSZklheaWfbodRVarvX+ML0amNtGYVDft/RftYmgbKKrK218qQp9R4GZFtf/Q/RmboNXN7weMINU8GWVkTRrccKBIXSunT6zXGfuj3Wp1YpVq20BWwY2OMM/P+yDAc7LKEO1LJqPBdT4r9BRn2lXiaga3AL24gTKZPKU/tu7uqfFciF+i4Rr58SMDNOzQcnklAgMBAAECggEAc0eibJYEO5d8QXW1kPgcHV2gBChv2mxDYnWYDLbIQSdNdfYP/qABt/MTmm5KkWr16fcCEYoD1w0mqFBrtVn1msSusUmEAYGTXJMNumOmjjX1kzaTQMmqeFBrwqwYz/xehWR5P+A7fSmwNV3KEeW19GvN5w5K96w0TLAQdFV3TQVPSytusDunwuR1yltMe1voaEDZ9z0Pi08YiEk2f6xhj5CMkoiw3mNImzfruphHullxU4FD05fH6tDeJ381527ILpAzDsgYZh4aFLKjUHem96bX4EL7FIzBJ6okgN78AZnUC/EaVfgFTw0qfhoWvZV4ruVXXiMhCg4CMMRDq/k9iQKBgQDBNWsJMT84OnnWmQoJmZogkFV+tsGrSK6Re+aJxLWpishh7dwAnT2OcagZvVdUb0FwNWu1D0B9/SKDDMRnnHBhOGDpH57m/eQdRU0oX1BD27xvffk0lLcfD4BTxnR5e9jss8K4twc9jf0P1rxC/loGJ2NtCH0BrPHgz54Ea+96ewKBgQCsk3JDaaPnFwzVYm2BXlhxOxLPsF4wvD2rIRAswZV4C5xebjand8nwiMmVpNd0PRLkEnkI+waURGv2EY/P3JsssoiY8Xqe8f/1G+SQKre7lbqOas8rFoALepC0BYDiZDFy0Z9ZnRAFzRI5sgIt7jpoMRD4xDNlmiV8X+yBxc3Y3wKBgQChDQsU1YUyNKQ8+sLAL9anEEkD4Ald4q8JPHN2IY+gLLxNzT0XEfsu0pTiJ8805axxgUYv3e/PVYNAJBNPnrqaf6lgiegl+jr9Hzhqz9CTUAYqFaL2boSakoxQyNtsLI0s+cb1vDN/3uy0GDZDzcty18BsMagqDmRtFgNNAj/UIwKBgQCahbeFBv0cOPZjxisY8Bou4N8aGehsqNBq/0LVYExuXa8YmoTTdJ3bgw9Er4G/ccQNdUDsuqAMeCtW/CiRzQ0ge4d1sprB4Rv3I4+HSsiS7SFKzfZLtWzXWlpg5qCdlWr1TR7qhYjIOPO9t1beO3YOvwhcRoliyyAPenBxTmTfbwKBgDtm2WJ5VlQgNpIdOs1CCiqd0DFmWOmvBPspPC1kySiy+Ndr9jNohRZkR7pEjgqA5E8rdzc88LirUN7bY5HFHRWN9KXrs5/o3O1K3GFCp64N6nvnPEYZ2zSJalcMC2fjSsJg26z8Dg1H+gfTIDUMoGiEAAnJXuqk+WayPU+fZMLn", - "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQAB", - "clients": [ - { - "clientId": "http://localhost:8081/auth/realms/realm-with-broker", - "enabled": true, - "protocol": "saml", - "redirectUris": [ - "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-idp-basic/endpoint" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_single_logout_service_url_post": "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-idp-basic/endpoint", - "saml_assertion_consumer_url_post": "http://localhost:8081/auth/realms/realm-with-broker/broker/kc-saml-idp-basic/endpoint", - "saml_force_name_id_format": "true", - "saml_name_id_format": "username" - - }, - "protocolMappers": [ - { - "name": "role list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "config": { - "attribute.name": "Role", - "attribute.nameformat": "Basic", - "single": "false" - - } - }, - { - "name": "mobile", - "protocol": "saml", - "protocolMapper": "saml-user-attribute-mapper", - "config": { - "user.attribute": "mobile", - "attribute.name": "mobile", - "attribute.nameformat": "Basic" - } - }, - { - "name": "email", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "config": { - "user.attribute": "email", - "attribute.name": "urn:oid:1.2.840.113549.1.9.1", - "attribute.nameformat": "urn:oasis:names:tc:SAML:2.0:attrname-format:uri", - "friendly.name": "email" - } - } - - ] - - } - ], - "users": [ - { - "username" : "test-user", - "enabled": true, - "email" : "test-user@localhost", - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"], - "attributes": { - "mobile": "617-666-7777" - } - }, - { - "username" : "test-user-noemail", - "enabled": true, - "firstName" : "Test", - "lastName" : "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - }, - { - "username" : "pedroigor", - "enabled": true, - "email" : "psilva@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - } - ] - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/broker-test/test-realm-with-broker.json b/testsuite/integration-deprecated/src/test/resources/broker-test/test-realm-with-broker.json deleted file mode 100755 index f819b8c72c..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/broker-test/test-realm-with-broker.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "id": "realm-with-broker", - "realm": "realm-with-broker", - "enabled": true, - "requiredCredentials": [ "password" ], - "resetPasswordAllowed": true, - "registrationAllowed": true, - "privateKey": "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCCPyvTTb14vSMkpe/pds2P5Cqxk7bkeFnQiNMS1vyZ+HS2O79fxzp1eAguHnBTs4XTRT7SZJhIT/6utgqZjmDigKV5N7X5ptq8BM/W1qa1cYBRip261pc+tWf3IywJYQ9yFI9mUQarmIEl0D7GH16NSZklheaWfbodRVarvX+ML0amNtGYVDft/RftYmgbKKrK218qQp9R4GZFtf/Q/RmboNXN7weMINU8GWVkTRrccKBIXSunT6zXGfuj3Wp1YpVq20BWwY2OMM/P+yDAc7LKEO1LJqPBdT4r9BRn2lXiaga3AL24gTKZPKU/tu7uqfFciF+i4Rr58SMDNOzQcnklAgMBAAECggEAc0eibJYEO5d8QXW1kPgcHV2gBChv2mxDYnWYDLbIQSdNdfYP/qABt/MTmm5KkWr16fcCEYoD1w0mqFBrtVn1msSusUmEAYGTXJMNumOmjjX1kzaTQMmqeFBrwqwYz/xehWR5P+A7fSmwNV3KEeW19GvN5w5K96w0TLAQdFV3TQVPSytusDunwuR1yltMe1voaEDZ9z0Pi08YiEk2f6xhj5CMkoiw3mNImzfruphHullxU4FD05fH6tDeJ381527ILpAzDsgYZh4aFLKjUHem96bX4EL7FIzBJ6okgN78AZnUC/EaVfgFTw0qfhoWvZV4ruVXXiMhCg4CMMRDq/k9iQKBgQDBNWsJMT84OnnWmQoJmZogkFV+tsGrSK6Re+aJxLWpishh7dwAnT2OcagZvVdUb0FwNWu1D0B9/SKDDMRnnHBhOGDpH57m/eQdRU0oX1BD27xvffk0lLcfD4BTxnR5e9jss8K4twc9jf0P1rxC/loGJ2NtCH0BrPHgz54Ea+96ewKBgQCsk3JDaaPnFwzVYm2BXlhxOxLPsF4wvD2rIRAswZV4C5xebjand8nwiMmVpNd0PRLkEnkI+waURGv2EY/P3JsssoiY8Xqe8f/1G+SQKre7lbqOas8rFoALepC0BYDiZDFy0Z9ZnRAFzRI5sgIt7jpoMRD4xDNlmiV8X+yBxc3Y3wKBgQChDQsU1YUyNKQ8+sLAL9anEEkD4Ald4q8JPHN2IY+gLLxNzT0XEfsu0pTiJ8805axxgUYv3e/PVYNAJBNPnrqaf6lgiegl+jr9Hzhqz9CTUAYqFaL2boSakoxQyNtsLI0s+cb1vDN/3uy0GDZDzcty18BsMagqDmRtFgNNAj/UIwKBgQCahbeFBv0cOPZjxisY8Bou4N8aGehsqNBq/0LVYExuXa8YmoTTdJ3bgw9Er4G/ccQNdUDsuqAMeCtW/CiRzQ0ge4d1sprB4Rv3I4+HSsiS7SFKzfZLtWzXWlpg5qCdlWr1TR7qhYjIOPO9t1beO3YOvwhcRoliyyAPenBxTmTfbwKBgDtm2WJ5VlQgNpIdOs1CCiqd0DFmWOmvBPspPC1kySiy+Ndr9jNohRZkR7pEjgqA5E8rdzc88LirUN7bY5HFHRWN9KXrs5/o3O1K3GFCp64N6nvnPEYZ2zSJalcMC2fjSsJg26z8Dg1H+gfTIDUMoGiEAAnJXuqk+WayPU+fZMLn", - "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQAB", - "smtpServer": { - "from": "auto@keycloak.org", - "host": "localhost", - "port":"3025" - }, - "identityProviders" : [ - { - "alias" : "model-google", - "providerId" : "google", - "enabled": true, - "trustEmail" : "true", - "storeToken": "true", - "config": { - "clientId": "clientId", - "clientSecret": "clientSecret" - } - }, - { - "alias" : "model-facebook", - "providerId" : "facebook", - "enabled": true, - "firstBrokerLoginFlowAlias" : "browser", - "config": { - "authorizationUrl": "authorizationUrl", - "tokenUrl": "tokenUrl", - "userInfoUrl": "userInfoUrl", - "clientId": "clientId", - "clientSecret": "clientSecret" - } - }, - { - "alias" : "model-github", - "providerId" : "github", - "enabled": true, - "storeToken": "false", - "postBrokerLoginFlowAlias" : "browser", - "config": { - "authorizationUrl": "authorizationUrl", - "tokenUrl": "tokenUrl", - "userInfoUrl": "userInfoUrl", - "clientId": "clientId", - "clientSecret": "clientSecret" - } - }, - { - "alias" : "model-paypal", - "providerId" : "paypal", - "enabled": true, - "storeToken": false, - "postBrokerLoginFlowAlias" : "browser", - "config": { - "sandbox": false, - "authorizationUrl": "authorizationUrl", - "tokenUrl": "tokenUrl", - "userInfoUrl": "userInfoUrl", - "clientId": "clientId", - "clientSecret": "clientSecret" - } - }, - { - "alias" : "model-twitter", - "providerId" : "twitter", - "enabled": true, - "storeToken": true, - "config": { - "authorizationUrl": "authorizationUrl", - "tokenUrl": "tokenUrl", - "userInfoUrl": "userInfoUrl", - "clientId": "clientId", - "clientSecret": "clientSecret" - } - }, - { - "alias" : "model-linkedin", - "providerId" : "linkedin", - "enabled": true, - "storeToken": false, - "config": { - "authorizationUrl": "authorizationUrl", - "tokenUrl": "tokenUrl", - "userInfoUrl": "userInfoUrl", - "clientId": "clientId", - "clientSecret": "clientSecret" - } - }, - { - "alias" : "model-stackoverflow", - "providerId" : "stackoverflow", - "enabled": true, - "storeToken": false, - "config": { - "key": "keyValue", - "authorizationUrl": "authorizationUrl", - "tokenUrl": "tokenUrl", - "userInfoUrl": "userInfoUrl", - "clientId": "clientId", - "clientSecret": "clientSecret" - } - }, - { - "alias" : "model-openshift-v3", - "providerId" : "openshift-v3", - "enabled": true, - "storeToken": true, - "config": { - "baseUrl": "https://api.preview.openshift.com", - "authorizationUrl": "authorizationUrl", - "tokenUrl": "tokenUrl", - "userInfoUrl": "userInfoUrl", - "clientId": "clientId", - "clientSecret": "clientSecret" - } - }, - { - "alias" : "model-saml-signed-idp", - "providerId" : "saml", - "displayName": "My SAML", - "enabled": true, - "config": { - "singleSignOnServiceUrl": "http://localhost:8082/auth/realms/realm-with-saml-identity-provider/protocol/saml", - "nameIDPolicyFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "signingCertificate": "MIICwzCCAasCBgFlqZ1FNTANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpyZWFsbS13aXRoLXNhbWwtc2lnbmVkLWlkcDAeFw0xODA5MDUxMjAxMjFaFw0yODA5MDUxMjAzMDFaMCUxIzAhBgNVBAMMGnJlYWxtLXdpdGgtc2FtbC1zaWduZWQtaWRwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBRiW8PXdVr1aGaLrlVIJHvqQiPXh2/ZB+An0Ed7gH03mWGMiC63O3kisrhFGD8uS7YVlIxOfINyB1IT0XJ51Vxo0lWimcKTXzA7MjWlHoWnR9ZmvPiWZpjjAvyxl0nSqJWk2gtRD/PHNgJpqmISnyFqLIJqbr2Zk3Jv87j0CyPoUKMnSOXZYI+HQhgUJyY9CyyIVGrWTs21dkuG4Z9bYzcDYW3zPwt7zWgCd4wr/Gg2ZJeIpdlcfg30Dn2nkkDDpnEIEq/MtLam9Q1/f6T/XyaIEOyWDMDs62bvNtFlt0d4q2oOWJNyEYDAoSnx7x+/ac0Y8EYGRrNpmpiXwUxt2th", - "wantAuthnRequestsSigned": true, - "forceAuthn": true, - "validateSignature": true, - "postBindingResponse": true, - "postBindingAuthnRequest": true - } - }, - { - "alias" : "kc-saml-signed-idp", - "providerId" : "saml", - "enabled": true, - "addReadTokenRoleOnCreate": true, - "config": { - "singleSignOnServiceUrl": "http://localhost:8082/auth/realms/realm-with-saml-signed-idp/protocol/saml", - "singleLogoutServiceUrl": "http://localhost:8082/auth/realms/realm-with-saml-signed-idp/protocol/saml", - "nameIDPolicyFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "signingCertificate": "MIICwzCCAasCBgFlqZ1FNTANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpyZWFsbS13aXRoLXNhbWwtc2lnbmVkLWlkcDAeFw0xODA5MDUxMjAxMjFaFw0yODA5MDUxMjAzMDFaMCUxIzAhBgNVBAMMGnJlYWxtLXdpdGgtc2FtbC1zaWduZWQtaWRwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBRiW8PXdVr1aGaLrlVIJHvqQiPXh2/ZB+An0Ed7gH03mWGMiC63O3kisrhFGD8uS7YVlIxOfINyB1IT0XJ51Vxo0lWimcKTXzA7MjWlHoWnR9ZmvPiWZpjjAvyxl0nSqJWk2gtRD/PHNgJpqmISnyFqLIJqbr2Zk3Jv87j0CyPoUKMnSOXZYI+HQhgUJyY9CyyIVGrWTs21dkuG4Z9bYzcDYW3zPwt7zWgCd4wr/Gg2ZJeIpdlcfg30Dn2nkkDDpnEIEq/MtLam9Q1/f6T/XyaIEOyWDMDs62bvNtFlt0d4q2oOWJNyEYDAoSnx7x+/ac0Y8EYGRrNpmpiXwUxt2th", - "wantAuthnRequestsSigned": true, - "forceAuthn": true, - "validateSignature": true, - "postBindingResponse": true, - "postBindingAuthnRequest": true, - "backchannelSupported": true - } - }, - { - "alias" : "kc-saml-idp-basic", - "providerId" : "saml", - "enabled": true, - "trustEmail" : false, - "addReadTokenRoleOnCreate": true, - "config": { - "singleSignOnServiceUrl": "http://localhost:8082/auth/realms/realm-with-saml-idp-basic/protocol/saml", - "singleLogoutServiceUrl": "http://localhost:8082/auth/realms/realm-with-saml-idp-basic/protocol/saml", - "nameIDPolicyFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "forceAuthn": true, - "postBindingResponse": true, - "postBindingAuthnRequest": true - } - }, - { - "alias" : "kc-saml-idp-property-mappers", - "providerId" : "saml", - "enabled": true, - "trustEmail" : false, - "addReadTokenRoleOnCreate": true, - "config": { - "singleSignOnServiceUrl": "http://localhost:8082/auth/realms/realm-with-saml-idp-property-mappers/protocol/saml", - "singleLogoutServiceUrl": "http://localhost:8082/auth/realms/realm-with-saml-idp-property-mappers/protocol/saml", - "nameIDPolicyFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "forceAuthn": true, - "postBindingResponse": true, - "postBindingAuthnRequest": true - } - }, - { - "alias" : "model-oidc-idp", - "providerId" : "oidc", - "displayName": "My OIDC", - "enabled": false, - "authenticateByDefault" : "false", - "config": { - "clientId": "clientId", - "clientSecret": "clientSecret", - "prompt": "prompt", - "authorizationUrl": "http://localhost:8081/auth/realms/realm-with-oidc-identity-provider/protocol/openid-connect/auth", - "tokenUrl": "http://localhost:8081/auth/realms/realm-with-oidc-identity-provider/protocol/openid-connect/token", - "userInfoUrl": "http://localhost:8081/auth/realms/realm-with-oidc-identity-provider/protocol/openid-connect/userinfo", - "defaultScope": "email profile" - } - }, - { - "alias" : "kc-oidc-idp", - "providerId" : "keycloak-oidc", - "displayName": "My Keycloak OIDC", - "enabled": true, - "storeToken" : true, - "addReadTokenRoleOnCreate": true, - "config": { - "clientId": "broker-app", - "clientSecret": "secret", - "authorizationUrl": "http://localhost:8082/auth/realms/realm-with-oidc-identity-provider/protocol/openid-connect/auth", - "tokenUrl": "http://localhost:8082/auth/realms/realm-with-oidc-identity-provider/protocol/openid-connect/token", - "userInfoUrl": "http://localhost:8082/auth/realms/realm-with-oidc-identity-provider/protocol/openid-connect/userinfo", - "logoutUrl": "http://localhost:8082/auth/realms/realm-with-oidc-identity-provider/protocol/openid-connect/logout", - "defaultScope": "email profile", - "backchannelSupported": "true" - } - }, - { - "alias" : "kc-oidc-idp-property-mappers", - "providerId" : "keycloak-oidc", - "enabled": true, - "storeToken" : true, - "addReadTokenRoleOnCreate": true, - "config": { - "clientId": "broker-app", - "clientSecret": "secret", - "authorizationUrl": "http://localhost:8082/auth/realms/realm-with-oidc-idp-property-mappers/protocol/openid-connect/auth", - "tokenUrl": "http://localhost:8082/auth/realms/realm-with-oidc-idp-property-mappers/protocol/openid-connect/token", - "userInfoUrl": "http://localhost:8082/auth/realms/realm-with-oidc-idp-property-mappers/protocol/openid-connect/userinfo", - "logoutUrl": "http://localhost:8082/auth/realms/realm-with-oidc-idp-property-mappers/protocol/openid-connect/logout", - "defaultScope": "email profile", - "backchannelSupported": "true" - } - }, - { - "alias" : "kc-oidc-idp-hidden", - "providerId" : "keycloak-oidc", - "enabled": true, - "storeToken" : true, - "addReadTokenRoleOnCreate": true, - "config": { - "clientId": "broker-app", - "clientSecret": "secret", - "authorizationUrl": "http://localhost:8082/auth/realms/realm-with-oidc-idp-hidden/protocol/openid-connect/auth", - "tokenUrl": "http://localhost:8082/auth/realms/realm-with-oidc-idp-hidden/protocol/openid-connect/token", - "userInfoUrl": "http://localhost:8082/auth/realms/realm-with-oidc-idp-hidden/protocol/openid-connect/userinfo", - "logoutUrl": "http://localhost:8082/auth/realms/realm-with-oidc-idp-hidden/protocol/openid-connect/logout", - "defaultScope": "email profile", - "backchannelSupported": "true", - "hideOnLoginPage": true - } - } - ], - "identityProviderMappers": [ - { - "name": "manager-mapper", - "identityProviderAlias": "kc-oidc-idp-property-mappers", - "identityProviderMapper": "oidc-role-idp-mapper", - "config": { - "role": "manager", - "claim": "realm_access.roles", - "claim.value": "manager" - } - - }, - { - "name": "email-mapper", - "identityProviderAlias": "kc-oidc-idp-property-mappers", - "identityProviderMapper": "oidc-user-attribute-idp-mapper", - "config": { - "user.attribute": "email", - "claim": "email" - } - }, - { - "name": "first-mapper", - "identityProviderAlias": "kc-oidc-idp-property-mappers", - "identityProviderMapper": "oidc-user-attribute-idp-mapper", - "config": { - "user.attribute": "firstName", - "claim": "given_name" - } - }, - { - "name": "last-mapper", - "identityProviderAlias": "kc-oidc-idp-property-mappers", - "identityProviderMapper": "oidc-user-attribute-idp-mapper", - "config": { - "user.attribute": "lastName", - "claim": "family_name" - } - }, - { - "name": "kc-tenantid-mapper", - "identityProviderAlias": "kc-oidc-idp-property-mappers", - "identityProviderMapper": "oidc-user-attribute-idp-mapper", - "config": { - "user.attribute": "tenantid", - "claim": "tenantid" - } - }, - { - "name": "manager-mapper", - "identityProviderAlias": "kc-oidc-idp", - "identityProviderMapper": "oidc-role-idp-mapper", - "config": { - "role": "manager", - "claim": "realm_access.roles", - "claim.value": "manager" - } - - }, - { - "name": "hardcoded-user-session", - "identityProviderAlias": "kc-oidc-idp", - "identityProviderMapper": "hardcoded-user-session-attribute-idp-mapper", - "config": { - "attribute.value": "sessionvalue", - "attribute": "user-session-attr" - } - }, - { - "name": "mobile-mapper", - "identityProviderAlias": "kc-oidc-idp", - "identityProviderMapper": "oidc-user-attribute-idp-mapper", - "config": { - "user.attribute": "mobile", - "claim": "mobile" - } - }, - { - "name": "manager-mapper", - "identityProviderAlias": "kc-saml-idp-basic", - "identityProviderMapper": "saml-role-idp-mapper", - "config": { - "role": "manager", - "attribute.name": "Role", - "attribute.value": "manager" - } - - }, - { - "name": "mobile-mapper", - "identityProviderAlias": "kc-saml-idp-basic", - "identityProviderMapper": "saml-user-attribute-idp-mapper", - "config": { - "user.attribute": "mobile", - "attribute.name": "mobile" - } - }, - { - "name": "hardcoded-user-session", - "identityProviderAlias": "kc-saml-idp-basic", - "identityProviderMapper": "hardcoded-user-session-attribute-idp-mapper", - "config": { - "attribute.value": "sessionvalue", - "attribute": "user-session-attr" - } - }, - { - "name": "manager-mapper", - "identityProviderAlias": "kc-saml-signed-idp", - "identityProviderMapper": "saml-role-idp-mapper", - "config": { - "role": "manager", - "attribute.name": "Role", - "attribute.value": "manager" - } - - }, - { - "name": "mobile-mapper", - "identityProviderAlias": "kc-saml-signed-idp", - "identityProviderMapper": "saml-user-attribute-idp-mapper", - "config": { - "user.attribute": "mobile", - "attribute.name": "mobile" - } - }, - { - "name": "email-mapper", - "identityProviderAlias": "kc-saml-idp-property-mappers", - "identityProviderMapper": "saml-user-attribute-idp-mapper", - "config": { - "user.attribute": "email", - "attribute.name": "email" - } - }, - { - "name": "firstName-mapper", - "identityProviderAlias": "kc-saml-idp-property-mappers", - "identityProviderMapper": "saml-user-attribute-idp-mapper", - "config": { - "user.attribute": "firstName", - "attribute.name": "firstName" - } - }, - { - "name": "lastName-mapper", - "identityProviderAlias": "kc-saml-idp-property-mappers", - "identityProviderMapper": "saml-user-attribute-idp-mapper", - "config": { - "user.attribute": "lastName", - "attribute.name": "lastName" - } - }, - { - "name": "manager-mapper", - "identityProviderAlias": "kc-saml-idp-property-mappers", - "identityProviderMapper": "saml-role-idp-mapper", - "config": { - "role": "manager", - "attribute.name": "Role", - "attribute.value": "manager" - } - - } - - ], - "users": [ - { - "username" : "pedroigor", - "enabled": true, - "email" : "psilva@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"], - "applicationRoles": { - "account": [ "manage-account" ] - } - } - ], - "applications": [ - { - "name": "test-app", - "enabled": true, - "publicClient": true, - "adminUrl": "http://localhost:8081/test-app", - "baseUrl": "http://localhost:8081/test-app", - "redirectUris": [ - "/test-app/*" - ], - "webOrigins": [] - }, - { - "name": "test-app-with-allowed-providers", - "enabled": true, - "publicClient": true, - "adminUrl": "http://localhost:8081/auth", - "baseUrl": "http://localhost:8081/auth", - "redirectUris": [ - "/test-app/*" - ], - "webOrigins": [] - } - ], - "oauthClients" : [ - { - "name" : "third-party", - "enabled": true, - "redirectUris": [ - "http://localhost:8081/third-party/*" - ], - "secret": "password" - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - } - ] - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client1.jks b/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client1.jks deleted file mode 100644 index 9b2a4d6753..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client1.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client2.jks b/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client2.jks deleted file mode 100644 index 03aa2819e4..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client2.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client2.p12 b/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client2.p12 deleted file mode 100644 index b7af880224..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/client-auth-test/keystore-client2.p12 and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/model/testcomposites.json b/testsuite/integration-deprecated/src/test/resources/model/testcomposites.json deleted file mode 100755 index d9e9bb16db..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/model/testcomposites.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "id": "TestComposites", - "realm": "TestComposites", - "enabled": true, - "accessTokenLifespan": 600, - "accessCodeLifespan": 600, - "accessCodeLifespanUserAction": 600, - "sslRequired": "external", - "registrationAllowed": true, - "resetPasswordAllowed": true, - "requiredCredentials": [ "password" ], - "smtpServer": { - "from": "auto@keycloak.org", - "host": "localhost", - "port":"3025" - }, - "users" : [ - { - "username" : "REALM_COMPOSITE_1_USER", - "enabled": true, - "email" : "test-user1@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "REALM_COMPOSITE_1" ] - }, - { - "username" : "REALM_ROLE_1_USER", - "enabled": true, - "email" : "test-user2@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "REALM_ROLE_1"] - }, - { - "username" : "REALM_APP_COMPOSITE_USER", - "enabled": true, - "email" : "test-user3@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "REALM_APP_COMPOSITE_ROLE" ] - }, - { - "username" : "REALM_APP_ROLE_USER", - "enabled": true, - "email" : "test-user4@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "applicationRoles": { - "APP_ROLE_APPLICATION": [ "APP_ROLE_2" ] - } - }, - { - "username" : "APP_COMPOSITE_USER", - "enabled": true, - "email" : "test-user5@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["REALM_APP_COMPOSITE_ROLE", "REALM_COMPOSITE_1"] - } - ], - "oauthClients" : [ - { - "name" : "third-party", - "enabled": true, - "secret": "password" - } - ], - "scopeMappings": [ - { - "client": "REALM_COMPOSITE_1_APPLICATION", - "roles": ["REALM_COMPOSITE_1"] - }, - { - "client": "REALM_COMPOSITE_2_APPLICATION", - "roles": ["REALM_COMPOSITE_1", "REALM_COMPOSITE_CHILD", "REALM_ROLE_4"] - }, - { - "client": "REALM_ROLE_1_APPLICATION", - "roles": ["REALM_ROLE_1"] - } - ], - "applications": [ - { - "name": "REALM_COMPOSITE_1_APPLICATION", - "fullScopeAllowed": false, - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "secret": "password" - }, - { - "name": "REALM_COMPOSITE_2_APPLICATION", - "fullScopeAllowed": false, - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "secret": "password" - }, - { - "name": "REALM_ROLE_1_APPLICATION", - "fullScopeAllowed": false, - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "secret": "password" - }, - { - "name": "APP_ROLE_APPLICATION", - "fullScopeAllowed": false, - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "secret": "password" - }, - { - "name": "APP_COMPOSITE_APPLICATION", - "fullScopeAllowed": false, - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "secret": "password" - } - ], - "roles" : { - "realm" : [ - { - "name": "REALM_ROLE_1" - }, - { - "name": "REALM_ROLE_2" - }, - { - "name": "REALM_ROLE_3" - }, - { - "name": "REALM_ROLE_4" - }, - { - "name": "REALM_COMPOSITE_1", - "composites": { - "realm": ["REALM_ROLE_1", "REALM_COMPOSITE_CHILD"] - } - }, - { - "name": "REALM_COMPOSITE_CHILD", - "composites": { - "realm": ["REALM_ROLE_4"] - } - }, - { - "name": "REALM_APP_COMPOSITE_ROLE", - "composites": { - "application": { - "APP_ROLE_APPLICATION" :[ - "APP_ROLE_1" - ], - "APP_COMPOSITE_APPLICATION" :[ - "APP_COMPOSITE_ROLE" - ] - } - } - } - ], - "application" : { - "APP_ROLE_APPLICATION" : [ - { - "name": "APP_ROLE_1" - }, - { - "name": "APP_ROLE_2" - } - ], - "APP_COMPOSITE_APPLICATION" : [ - { - "name": "APP_COMPOSITE_ROLE", - "composites": { - "realm" : [ - "REALM_ROLE_1", - "REALM_ROLE_2", - "REALM_ROLE_3" - ], - "application": { - "APP_ROLE_APPLICATION" :[ - "APP_ROLE_1" - ], - "APP_COMPOSITE_APPLICATION" :[ - "APP_COMPOSITE_CHILD" - ] - } - } - }, - { - "name": "APP_COMPOSITE_CHILD", - "composites": { - "application": { - "APP_COMPOSITE_APPLICATION" :[ - "APP_ROLE_2" - ] - } - } - }, - { - "name": "APP_ROLE_2" - } - ] - } - - }, - - "applicationScopeMappings": { - "APP_ROLE_APPLICATION": [ - { - "client": "APP_COMPOSITE_APPLICATION", - "roles": ["APP_ROLE_1"] - } - ] - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/model/testrealm-demo.json b/testsuite/integration-deprecated/src/test/resources/model/testrealm-demo.json deleted file mode 100755 index c98bbf7f47..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/model/testrealm-demo.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "realm": "demo", - "enabled": true, - "accessTokenLifespan": 300, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 600, - "sslRequired": "external", - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "credentials" : [ - { "type" : "Password", - "value" : "password" } - ], - "realmRoles": [ "user" ] - } - ], - "oauthClients" : [ - { - "name" : "third-party", - "enabled": true, - "secret": "password" - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "Have User privileges" - }, - { - "name": "admin", - "description": "Have Administrator privileges" - } - ] - }, - - "scopeMappings": [ - { - "client": "third-party", - "roles": ["user"] - } - ], - "applications": [ - { - "name": "customer-portal", - "enabled": true, - "adminUrl": "http://localhost:8080/customer-portal/j_admin_request", - "secret": "password" - }, - { - "name": "product-portal", - "enabled": true, - "adminUrl": "http://localhost:8080/product-portal/j_admin_request", - "secret": "password" - } - ] -} diff --git a/testsuite/integration-deprecated/src/test/resources/model/testrealm-noclient-id.json b/testsuite/integration-deprecated/src/test/resources/model/testrealm-noclient-id.json deleted file mode 100755 index 4751c7f255..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/model/testrealm-noclient-id.json +++ /dev/null @@ -1,57 +0,0 @@ - -{ - "realm": "demo-no-client-id", - "enabled": true, - "accessTokenLifespan": 300, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 600, - "sslRequired": "external", - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "credentials" : [ - { "type" : "Password", - "value" : "password" } - ], - "realmRoles": [ "user" ] - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "Have User privileges" - }, - { - "name": "admin", - "description": "Have Administrator privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "third-party", - "roles": ["user"] - } - ], - "clients": [ - { - "name": "third-party", - "enabled": true, - "bearerOnly": true - } - ], - "clientScopeMappings": { - "realm-management": [ - { - "client": "some-client", - "roles": ["create-client"] - } - ] - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/model/testrealm2.json b/testsuite/integration-deprecated/src/test/resources/model/testrealm2.json deleted file mode 100755 index 4e3d9fb65f..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/model/testrealm2.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "realm": "demo-delete", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["user"], - "applicationRoles": { - "account": [ "manage-account" ] - } - - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "third-party", - "roles": ["user"] - }, - { - "client": "customer-portal", - "roles": ["user"] - }, - { - "client": "product-portal", - "roles": ["user"] - } - - ], - "applications": [ - { - "name": "customer-portal", - "enabled": true, - "adminUrl": "http://localhost:8080/customer-portal", - "redirectUris": [ - "http://localhost:8080/customer-portal/*" - ], - "secret": "password" - }, - { - "name": "product-portal", - "enabled": true, - "adminUrl": "http://localhost:8080/product-portal", - "redirectUris": [ - "http://localhost:8080/product-portal/*" - ], - "secret": "password" - } - ], - "oauthClients": [ - { - "name": "third-party", - "enabled": true, - "redirectUris": [ - "http://localhost:8080/oauth-client/*", - "http://localhost:8080/oauth-client-cdi/*" - ], - "secret": "password" - } - ] - -} diff --git a/testsuite/integration-deprecated/src/test/resources/oidc/offline-client-keycloak.json b/testsuite/integration-deprecated/src/test/resources/oidc/offline-client-keycloak.json deleted file mode 100644 index bc7be17093..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/oidc/offline-client-keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm": "test", - "resource": "offline-client", - "realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials": { - "secret": "secret1" - } -} \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/org/keycloak/testsuite/excluded/keycloak.json b/testsuite/integration-deprecated/src/test/resources/org/keycloak/testsuite/excluded/keycloak.json deleted file mode 100755 index 9b5d568e35..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/org/keycloak/testsuite/excluded/keycloak.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "realm" : "test", - "resource" : "app", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "/auth", - "ssl-required" : "external" -} diff --git a/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 6a3e3ba7d3..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/picketlink.xml deleted file mode 100755 index 3b508989ff..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/picketlink.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${sales-post-sig.url::http://localhost:8081/bad-client-sales-post-sig/} - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 215384cdef..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/picketlink.xml deleted file mode 100755 index b055b11d5c..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/picketlink.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${sales-post-sig.url::http://localhost:8081/bad-realm-sales-post-sig/} - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/keystore.jks deleted file mode 100755 index 822162ceaf..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/picketlink.xml deleted file mode 100755 index adad47d5c7..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/picketlink.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${sales-post-sig.url::http://localhost:8081/sales-post-enc/} - - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/keystore.jks deleted file mode 100755 index 4daad218a3..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/picketlink.xml deleted file mode 100755 index 4f7b9bab06..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/picketlink.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${employee-sig.url::http://localhost:8081/employee-sig-front/} - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/keystore.jks deleted file mode 100755 index 4daad218a3..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/picketlink.xml deleted file mode 100755 index dc0d20899a..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/picketlink.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${employee-sig.url::http://localhost:8081/employee-sig/} - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/picketlink.xml deleted file mode 100755 index 6e6a90e910..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/picketlink.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${sales-post-sig.url::http://localhost:8081/sales-metadata/} - - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/picketlink.xml deleted file mode 100755 index 8c7be9609a..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/picketlink.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${sales-post-sig.url::http://localhost:8081/sales-post-sig-email/} - - - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/picketlink.xml deleted file mode 100755 index 082a786b8d..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/picketlink.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${sales-post-sig.url::http://localhost:8081/sales-post-sig-persistent/} - - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/picketlink.xml deleted file mode 100755 index 2fd59b7da5..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/picketlink.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${sales-post-sig.url::http://localhost:8081/sales-post-sig-transient/} - - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/keystore.jks b/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77..0000000000 Binary files a/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/keystore.jks and /dev/null differ diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/picketlink.xml deleted file mode 100755 index 339030be1f..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/picketlink.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - ${idp-sig.url::http://localhost:8081/auth/realms/demo/protocol/saml} - - ${sales-post-sig.url::http://localhost:8081/sales-post-sig/} - - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-deprecated/src/test/resources/saml/simple-get/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/simple-get/WEB-INF/picketlink.xml deleted file mode 100755 index f16bd14a72..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/simple-get/WEB-INF/picketlink.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - ${idp.url::http://localhost:8081/auth/realms/demo/protocol/saml} - ${employee.url::http://localhost:8081/employee/} - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/saml/simple-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/simple-post/WEB-INF/picketlink.xml deleted file mode 100755 index 95ced9bb07..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/simple-post/WEB-INF/picketlink.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - ${idp.url::http://localhost:8081/auth/realms/demo/protocol/saml} - ${sales-post.url::http://localhost:8081/sales-post/} - - localhost,jboss.com,jboss.org,amazonaws.com - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/saml/sp-metadata.xml b/testsuite/integration-deprecated/src/test/resources/saml/sp-metadata.xml deleted file mode 100755 index c7fb975574..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/sp-metadata.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - - - - - - - - MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw== - - - - - - - JBoss - JBoss by Red Hat - http://localhost:8080/sales-metadata/ - - - The - Admin - admin@mycompany.com - - - \ No newline at end of file diff --git a/testsuite/integration-deprecated/src/test/resources/saml/testsaml.json b/testsuite/integration-deprecated/src/test/resources/saml/testsaml.json deleted file mode 100755 index babfcd4c79..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/saml/testsaml.json +++ /dev/null @@ -1,307 +0,0 @@ -{ - "id": "demo", - "realm": "demo", - "enabled": true, - "sslRequired": "external", - "registrationAllowed": true, - "resetPasswordAllowed": true, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "defaultRoles": [ "user" ], - "smtpServer": { - "from": "auto@keycloak.org", - "host": "localhost", - "port":"3025" - }, - "users" : [ - { - "username" : "bburke", - "enabled": true, - "email" : "bburke@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "attributes" : { - "phone": "617" - }, - "realmRoles": ["manager", "user"], - "applicationRoles": { - "http://localhost:8081/employee/": [ "employee" ] - } - } - ], - "applications": [ - { - "name": "http://localhost:8081/sales-post/", - "enabled": true, - "fullScopeAllowed": true, - "protocol": "saml", - "baseUrl": "http://localhost:8081/sales-post", - "redirectUris": [ - "http://localhost:8081/sales-post/*" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_assertion_consumer_url_post": "http://localhost:8081/sales-post/", - "saml_assertion_consumer_url_redirect": "http://localhost:8081/sales-post/", - "saml_single_logout_service_url_post": "http://localhost:8081/sales-post/", - "saml_single_logout_service_url_redirect": "http://localhost:8081/sales-post/", - "saml_idp_initiated_sso_url_name": "sales-post" - } - }, - { - "name": "http://localhost:8081/sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/sales-post-sig", - "redirectUris": [ - "http://localhost:8081/sales-post-sig/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8081/sales-post-sig/", - "saml_assertion_consumer_url_redirect": "http://localhost:8081/sales-post-sig/", - "saml_single_logout_service_url_post": "http://localhost:8081/sales-post-sig/", - "saml_single_logout_service_url_redirect": "http://localhost:8081/sales-post-sig/", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8081/sales-post-sig-transient/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/sales-post-sig-transient", - "adminUrl": "http://localhost:8081/sales-post-sig-transient", - "redirectUris": [ - "http://localhost:8081/sales-post-sig-transient/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8081/sales-post-sig-transient/", - "saml_assertion_consumer_url_redirect": "http://localhost:8081/sales-post-sig-transient/", - "saml_single_logout_service_url_post": "http://localhost:8081/sales-post-sig-transient/", - "saml_single_logout_service_url_redirect": "http://localhost:8081/sales-post-sig-transient/", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8081/sales-post-sig-persistent/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/sales-post-sig-persistent", - "redirectUris": [ - "http://localhost:8081/sales-post-sig-persistent/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8081/sales-post-sig-persistent/", - "saml_assertion_consumer_url_redirect": "http://localhost:8081/sales-post-sig-persistent/", - "saml_single_logout_service_url_post": "http://localhost:8081/sales-post-sig-persistent/", - "saml_single_logout_service_url_redirect": "http://localhost:8081/sales-post-sig-persistent/", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8081/sales-post-sig-email/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/sales-post-sig-email", - "adminUrl": "http://localhost:8081/sales-post-sig-email", - "redirectUris": [ - "http://localhost:8081/sales-post-sig-email/*" - ], - "attributes": { - "saml_force_name_id_format": "true", - "saml_name_id_format": "email", - "saml_assertion_consumer_url_post": "http://localhost:8081/sales-post-sig-email/", - "saml_assertion_consumer_url_redirect": "http://localhost:8081/sales-post-sig-email/", - "saml_single_logout_service_url_post": "http://localhost:8081/sales-post-sig-email/", - "saml_single_logout_service_url_redirect": "http://localhost:8081/sales-post-sig-email/", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8081/bad-realm-sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/bad-realm-sales-post-sig/", - "adminUrl": "http://localhost:8081/bad-realm-sales-post-sig/", - "redirectUris": [ - "http://localhost:8081/bad-realm-sales-post-sig/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8081/bad-client-sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/bad-client-sales-post-sig/", - "adminUrl": "http://localhost:8081/bad-client-sales-post-sig/", - "redirectUris": [ - "http://localhost:8081/bad-client-sales-post-sig/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==" - } - }, - { - "name": "http://localhost:8081/sales-post-enc/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/sales-post-enc", - "redirectUris": [ - "http://localhost:8081/sales-post-enc/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8081/sales-post-enc/", - "saml_assertion_consumer_url_redirect": "http://localhost:8081/sales-post-enc/", - "saml_single_logout_service_url_post": "http://localhost:8081/sales-post-enc/", - "saml_single_logout_service_url_redirect": "http://localhost:8081/sales-post-enc/", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA512", - "saml.client.signature": "true", - "saml.encrypt": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==", - "saml.encryption.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==" - } - }, - { - "name": "http://localhost:8081/employee-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/employee-sig", - "redirectUris": [ - "http://localhost:8081/employee-sig/*" - ], - "adminUrl": "http://localhost:8081/employee-sig/", - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.signature.algorithm": "RSA_SHA1", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB0DCCATkCBgFJH5u0EDANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNodHRwOi8vbG9jYWxob3N0OjgwODAvZW1wbG95ZWUtc2lnLzAeFw0xNDEwMTcxOTMzNThaFw0yNDEwMTcxOTM1MzhaMC4xLDAqBgNVBAMTI2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9lbXBsb3llZS1zaWcvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+9kVgPFpshjS2aT2g52lqTv2lqb1jgvXZVk7iFF4LAO6SdCXKXRZI4SuzIRkVNpE1a42V1kQRlaozoFklgvX5sje8tkpa9ylq+bxGXM9RRycqRu2B+oWUV7Aqq7Bs0Xud0WeHQYRcEoCjqsFKGy65qkLRDdT70FTJgpSHts+gDwIDAQABMA0GCSqGSIb3DQEBCwUAA4GBACKyPLGqMX8GsIrCfJU8eVnpaqzTXMglLVo/nTcfAnWe9UAdVe8N3a2PXpDBvuqNA/DEAhVcQgxdlOTWnB6s8/yLTRuH0bZgb3qGdySif+lU+E7zZ/SiDzavAvn+ABqemnzHcHyhYO+hNRGHvUbW5OAii9Vdjhm8BI32YF1NwhKp" - } - }, - { - "name": "http://localhost:8081/employee/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8081/employee", - "redirectUris": [ - "http://localhost:8081/employee/*" - ], - "adminUrl": "http://localhost:8081/employee/", - "attributes": { - "saml.authnstatement": "true" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "config": { - "user.attribute": "email", - "friendly.name": "email", - "attribute.name": "urn:oid:1.2.840.113549.1.9.1", - "attribute.nameformat": "URI Reference" - } - }, - { - "name": "phone", - "protocol": "saml", - "protocolMapper": "saml-user-attribute-mapper", - "config": { - "user.attribute": "phone", - "attribute.name": "phone", - "attribute.nameformat": "Basic" - } - }, - { - "name": "role-list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "config": { - "attribute.name": "Role", - "attribute.nameformat": "Basic", - "single": "false" - } - } - ] - }, - { - "name": "http://localhost:8081/employee-sig-front/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "frontchannelLogout": true, - "baseUrl": "http://localhost:8081/employee-sig-front/", - "redirectUris": [ - "http://localhost:8081/employee-sig-front/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8081/employee-sig-front/", - "saml_assertion_consumer_url_redirect": "http://localhost:8081/employee-sig-front/", - "saml_single_logout_service_url_post": "http://localhost:8081/employee-sig-front/", - "saml_single_logout_service_url_redirect": "http://localhost:8081/employee-sig-front/", - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.signature.algorithm": "RSA_SHA1", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB0DCCATkCBgFJH5u0EDANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNodHRwOi8vbG9jYWxob3N0OjgwODAvZW1wbG95ZWUtc2lnLzAeFw0xNDEwMTcxOTMzNThaFw0yNDEwMTcxOTM1MzhaMC4xLDAqBgNVBAMTI2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9lbXBsb3llZS1zaWcvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+9kVgPFpshjS2aT2g52lqTv2lqb1jgvXZVk7iFF4LAO6SdCXKXRZI4SuzIRkVNpE1a42V1kQRlaozoFklgvX5sje8tkpa9ylq+bxGXM9RRycqRu2B+oWUV7Aqq7Bs0Xud0WeHQYRcEoCjqsFKGy65qkLRDdT70FTJgpSHts+gDwIDAQABMA0GCSqGSIb3DQEBCwUAA4GBACKyPLGqMX8GsIrCfJU8eVnpaqzTXMglLVo/nTcfAnWe9UAdVe8N3a2PXpDBvuqNA/DEAhVcQgxdlOTWnB6s8/yLTRuH0bZgb3qGdySif+lU+E7zZ/SiDzavAvn+ABqemnzHcHyhYO+hNRGHvUbW5OAii9Vdjhm8BI32YF1NwhKp" - } - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - }, - { - "name": "user", - "description": "Have User privileges" - } - ], - "application" : { - "http://localhost:8081/employee/" : [ - { - "name": "employee", - "description": "Have Employee privileges" - } - ] - } - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/testcomposite.json b/testsuite/integration-deprecated/src/test/resources/testcomposite.json deleted file mode 100755 index 83d5611910..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/testcomposite.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "id": "test", - "realm": "test", - "enabled": true, - "accessTokenLifespan": 600, - "accessCodeLifespan": 600, - "accessCodeLifespanUserAction": 600, - "sslRequired": "external", - "registrationAllowed": true, - "resetPasswordAllowed": true, - "requiredCredentials": [ "password" ], - "smtpServer": { - "from": "auto@keycloak.org", - "host": "localhost", - "port":"3025" - }, - "users" : [ - { - "username" : "REALM_COMPOSITE_1_USER", - "enabled": true, - "email" : "test-user1@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "REALM_COMPOSITE_1" ] - }, - { - "username" : "REALM_ROLE_1_USER", - "enabled": true, - "email" : "test-user2@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["REALM_ROLE_1"] - }, - { - "username" : "REALM_APP_COMPOSITE_USER", - "enabled": true, - "email" : "test-user3@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["REALM_APP_COMPOSITE_ROLE"] - }, - { - "username" : "REALM_APP_ROLE_USER", - "enabled": true, - "email" : "test-user4@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "applicationRoles": { - "APP_ROLE_APPLICATION": [ "APP_ROLE_2" ] - } - }, - { - "username" : "APP_COMPOSITE_USER", - "enabled": true, - "email" : "test-user5@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["REALM_APP_COMPOSITE_ROLE", "REALM_COMPOSITE_1"] - } - ], - "oauthClients" : [ - { - "name" : "third-party", - "enabled": true, - "secret": "password" - } - ], - "scopeMappings": [ - { - "client": "REALM_COMPOSITE_1_APPLICATION", - "roles": ["REALM_COMPOSITE_1"] - }, - { - "client": "REALM_ROLE_1_APPLICATION", - "roles": ["REALM_ROLE_1"] - } - ], - "applications": [ - { - "name": "REALM_COMPOSITE_1_APPLICATION", - "enabled": true, - "fullScopeAllowed": false, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "redirectUris": [ - "http://localhost:8081/app/*" - ], - "secret": "password" - }, - { - "name": "REALM_ROLE_1_APPLICATION", - "fullScopeAllowed": false, - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "redirectUris": [ - "http://localhost:8081/app/*" - ], - "secret": "password" - }, - { - "name": "APP_ROLE_APPLICATION", - "fullScopeAllowed": false, - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "redirectUris": [ - "http://localhost:8081/app/*" - ], - "secret": "password" - }, - { - "name": "APP_COMPOSITE_APPLICATION", - "fullScopeAllowed": false, - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "adminUrl": "http://localhost:8081/app/logout", - "redirectUris": [ - "http://localhost:8081/app/*" - ], - "secret": "password" - } - ], - "roles" : { - "realm" : [ - { - "name": "REALM_ROLE_1" - }, - { - "name": "REALM_ROLE_2" - }, - { - "name": "REALM_ROLE_3" - }, - { - "name": "REALM_COMPOSITE_1", - "composites": { - "realm": ["REALM_ROLE_1"] - } - }, - { - "name": "REALM_APP_COMPOSITE_ROLE", - "composites": { - "application": { - "APP_ROLE_APPLICATION" :[ - "APP_ROLE_1" - ] - } - } - } - ], - "application" : { - "APP_ROLE_APPLICATION" : [ - { - "name": "APP_ROLE_1" - }, - { - "name": "APP_ROLE_2" - } - ], - "APP_COMPOSITE_APPLICATION" : [ - { - "name": "APP_COMPOSITE_ROLE", - "composites": { - "realm" : [ - "REALM_ROLE_1", - "REALM_ROLE_2", - "REALM_ROLE_3" - ], - "application": { - "APP_ROLE_APPLICATION" :[ - "APP_ROLE_1" - ] - } - } - }, - { - "name": "APP_ROLE_2" - } - ] - } - - }, - - "applicationScopeMappings": { - "APP_ROLE_APPLICATION": [ - { - "client": "APP_COMPOSITE_APPLICATION", - "roles": ["APP_ROLE_2"] - } - ] - } -} diff --git a/testsuite/integration-deprecated/src/test/resources/testrealm.json b/testsuite/integration-deprecated/src/test/resources/testrealm.json deleted file mode 100755 index b4718dde46..0000000000 --- a/testsuite/integration-deprecated/src/test/resources/testrealm.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "id": "test", - "realm": "test", - "enabled": true, - "sslRequired": "external", - "registrationAllowed": true, - "resetPasswordAllowed": true, - "editUsernameAllowed" : true, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "defaultRoles": [ "user" ], - "smtpServer": { - "from": "auto@keycloak.org", - "host": "localhost", - "port":"3025" - }, - "users" : [ - { - "username" : "test-user@localhost", - "enabled": true, - "email" : "test-user@localhost", - "firstName": "Tom", - "lastName": "Brady", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["user", "offline_access"], - "clientRoles": { - "test-app": [ "customer-user" ], - "account": [ "view-profile", "manage-account" ] - } - }, - { - "username" : "john-doh@localhost", - "enabled": true, - "email" : "john-doh@localhost", - "firstName": "John", - "lastName": "Doh", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["user"], - "clientRoles": { - "test-app": [ "customer-user" ], - "account": [ "view-profile", "manage-account" ] - } - }, - { - "username" : "keycloak-user@localhost", - "enabled": true, - "email" : "keycloak-user@localhost", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["user"], - "clientRoles": { - "test-app": [ "customer-user" ], - "account": [ "view-profile", "manage-account" ] - } - }, - { - "username" : "topGroupUser", - "enabled": true, - "email" : "top@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "groups": [ - "/topGroup" - ] - }, - { - "username" : "level2GroupUser", - "enabled": true, - "email" : "level2@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "groups": [ - "/topGroup/level2group" - ] - } - ], - "scopeMappings": [ - { - "client": "third-party", - "roles": ["user"] - }, - { - "client": "test-app", - "roles": ["user"] - } - ], - "clients": [ - { - "clientId": "test-app", - "enabled": true, - "baseUrl": "http://localhost:8081/app", - "redirectUris": [ - "http://localhost:8081/app/*" - ], - "adminUrl": "http://localhost:8081/app/logout", - "secret": "password" - }, - { - "clientId" : "third-party", - "enabled": true, - "consentRequired": true, - - "redirectUris": [ - "http://localhost:8081/app/*" - ], - "secret": "password" - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "Have User privileges" - }, - { - "name": "admin", - "description": "Have Administrator privileges" - } - ], - "client" : { - "test-app" : [ - { - "name": "customer-user", - "description": "Have Customer User privileges" - }, - { - "name": "customer-admin", - "description": "Have Customer Admin privileges" - } - ] - } - - }, - "groups" : [ - { - "name": "topGroup", - "attributes": { - "topAttribute": ["true"] - - }, - "realmRoles": ["user"], - - "subGroups": [ - { - "name": "level2group", - "realmRoles": ["admin"], - "clientRoles": { - "test-app": ["customer-user"] - }, - "attributes": { - "level2Attribute": ["true"] - - } - } - ] - } - ], - - - "clientScopeMappings": { - "test-app": [ - { - "client": "third-party", - "roles": ["customer-user"] - } - ] - }, - - "internationalizationEnabled": true, - "supportedLocales": ["en", "de"], - "defaultLocale": "en" -} diff --git a/testsuite/pom.xml b/testsuite/pom.xml index 289a5546d6..0a406dcc7b 100755 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -43,7 +43,6 @@ - integration-deprecated integration-arquillian utils diff --git a/travis-run-tests.sh b/travis-run-tests.sh index 55278cdf9c..13a98f88d9 100755 --- a/travis-run-tests.sh +++ b/travis-run-tests.sh @@ -49,11 +49,6 @@ fi mvn install -B -nsu -Pdistribution -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -if [ $1 == "old" ]; then - cd testsuite - mvn test -B -nsu -f integration-deprecated -fi - if [ $1 == "unit" ]; then mvn -B test -DskipTestsuite # Generate documentation to catch potential issues earlier than during the release