From 5ed864fbbc854542972620bb16c4e47f3b6aae20 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 21 Apr 2015 10:42:13 +0200 Subject: [PATCH 01/16] KEYCLOAK-1208 Allow same-origin if cors is enabled --- .../org/keycloak/adapters/AuthenticatedActionsHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/AuthenticatedActionsHandler.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/AuthenticatedActionsHandler.java index fcbf1fecdd..98bc5ccdb0 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/AuthenticatedActionsHandler.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/AuthenticatedActionsHandler.java @@ -4,6 +4,7 @@ import org.jboss.logging.Logger; import org.keycloak.KeycloakSecurityContext; import org.keycloak.constants.AdapterConstants; import org.keycloak.representations.AccessToken; +import org.keycloak.util.UriUtils; import java.io.IOException; import java.util.Set; @@ -78,8 +79,9 @@ public class AuthenticatedActionsHandler { if (!deployment.isCors()) return false; KeycloakSecurityContext securityContext = facade.getSecurityContext(); String origin = facade.getRequest().getHeader(CorsHeaders.ORIGIN); + String requestOrigin = UriUtils.getOrigin(facade.getRequest().getURI()); log.debugv("Origin: {0} uri: {1}", origin, facade.getRequest().getURI()); - if (securityContext != null && origin != null) { + if (securityContext != null && origin != null && !origin.equals(requestOrigin)) { AccessToken token = securityContext.getToken(); Set allowedOrigins = token.getAllowedOrigins(); if (log.isDebugEnabled()) { From aef61411e9feca8310c258ec8069844d7b7803ae Mon Sep 17 00:00:00 2001 From: gkfirst8 Date: Tue, 21 Apr 2015 11:46:33 +0200 Subject: [PATCH 02/16] log the right value when keycloak.config.file could not be found or read Fix for [KEYCLOAK-1220] --- .../adapters/tomcat/AbstractKeycloakAuthenticatorValve.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/tomcat/AbstractKeycloakAuthenticatorValve.java b/integration/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/tomcat/AbstractKeycloakAuthenticatorValve.java index ffc5941434..750f6b8be6 100755 --- a/integration/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/tomcat/AbstractKeycloakAuthenticatorValve.java +++ b/integration/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/tomcat/AbstractKeycloakAuthenticatorValve.java @@ -151,7 +151,7 @@ public abstract class AbstractKeycloakAuthenticatorValve extends FormAuthenticat try { is = new FileInputStream(path); } catch (FileNotFoundException e) { - log.severe("NOT FOUND /WEB-INF/keycloak.json"); + log.severe("NOT FOUND {0}", path); throw new RuntimeException(e); } } From 6ce02853156d6c38da0549fac197af7ffafc71d8 Mon Sep 17 00:00:00 2001 From: Leonardo Loch Zanivan Date: Tue, 21 Apr 2015 12:32:17 -0300 Subject: [PATCH 03/16] Basic Auth token fix --- .../org/keycloak/adapters/BearerTokenRequestAuthenticator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java index a1a68dfce9..5730ca6774 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java @@ -64,6 +64,7 @@ public class BearerTokenRequestAuthenticator { protected AuthOutcome authenticateToken(HttpFacade exchange, String tokenString) { try { + this.tokenString = tokenString; token = RSATokenVerifier.verifyToken(tokenString, deployment.getRealmKey(), deployment.getRealmInfoUrl()); } catch (VerificationException e) { log.error("Failed to verify token", e); From 642fc996fb6e8a6fc7862118672032d1cfafc176 Mon Sep 17 00:00:00 2001 From: Leonardo Loch Zanivan Date: Tue, 21 Apr 2015 16:22:14 -0300 Subject: [PATCH 04/16] Basic Auth token fix --- .../org/keycloak/adapters/BasicAuthRequestAuthenticator.java | 1 + .../org/keycloak/adapters/BearerTokenRequestAuthenticator.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/BasicAuthRequestAuthenticator.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/BasicAuthRequestAuthenticator.java index 51ddfd5efd..6f8f64945c 100644 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/BasicAuthRequestAuthenticator.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/BasicAuthRequestAuthenticator.java @@ -53,6 +53,7 @@ public class BasicAuthRequestAuthenticator extends BearerTokenRequestAuthenticat String[] parts=userpw.split(":"); atr = getToken(parts[0], parts[1]); + tokenString = atr.getToken(); } catch (Exception e) { log.debug("Failed to obtain token", e); challenge = challengeResponse(exchange, "no_token", e.getMessage()); diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java index 5730ca6774..a1a68dfce9 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java @@ -64,7 +64,6 @@ public class BearerTokenRequestAuthenticator { protected AuthOutcome authenticateToken(HttpFacade exchange, String tokenString) { try { - this.tokenString = tokenString; token = RSATokenVerifier.verifyToken(tokenString, deployment.getRealmKey(), deployment.getRealmInfoUrl()); } catch (VerificationException e) { log.error("Failed to verify token", e); From b5f3efe27290d99270743526dc8e4849463f6384 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Wed, 22 Apr 2015 08:58:47 +0200 Subject: [PATCH 05/16] KEYCLOAK-1218 Better security for ServerInfoAdminResource --- .../services/resources/admin/AdminRoot.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java b/services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java index 2ece39b9c6..bdde097a6e 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java @@ -9,11 +9,13 @@ import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.jboss.resteasy.spi.UnauthorizedException; import org.keycloak.ClientConnection; import org.keycloak.jose.jws.JWSInput; +import org.keycloak.models.AdminRoles; import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.protocol.oidc.TokenManager; import org.keycloak.representations.AccessToken; +import org.keycloak.services.ForbiddenException; import org.keycloak.services.managers.AppAuthManager; import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.RealmManager; @@ -200,9 +202,14 @@ public class AdminRoot { handlePreflightRequest(); AdminAuth auth = authenticateRealmAdminRequest(headers); + if (!isAdmin(auth)) { + throw new ForbiddenException(); + } + if (auth != null) { logger.debug("authenticated admin access for: " + auth.getUser().getUsername()); } + Cors.add(request).allowedOrigins(auth.getToken()).allowedMethods("GET", "PUT", "POST", "DELETE").auth().build(response); ServerInfoAdminResource adminResource = new ServerInfoAdminResource(); @@ -210,6 +217,26 @@ public class AdminRoot { return adminResource; } + protected boolean isAdmin(AdminAuth auth) { + if (auth.hasOneOfRealmRole(AdminRoles.ADMIN, AdminRoles.CREATE_REALM)) { + return true; + } + + RealmManager realmManager = new RealmManager(session); + if (auth.getRealm().equals(realmManager.getKeycloakAdminstrationRealm())) { + for (RealmModel realm : session.realms().getRealms()) { + ClientModel client = realm.getMasterAdminClient(); + if (auth.hasOneOfAppRole(client, AdminRoles.ALL_REALM_ROLES)) { + return true; + } + } + return false; + } else { + ClientModel client = auth.getRealm().getClientByClientId(realmManager.getRealmAdminClientId(auth.getRealm())); + return auth.hasOneOfAppRole(client, AdminRoles.ALL_REALM_ROLES); + } + } + protected void handlePreflightRequest() { if (request.getHttpMethod().equalsIgnoreCase("OPTIONS")) { logger.debug("Cors admin pre-flight"); From 0b782e9910cd5bb075131e8f33c88d3eb2d31e51 Mon Sep 17 00:00:00 2001 From: gkfirst8 Date: Wed, 22 Apr 2015 10:54:43 +0200 Subject: [PATCH 06/16] Fix logging call --- .../adapters/tomcat/AbstractKeycloakAuthenticatorValve.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/tomcat/AbstractKeycloakAuthenticatorValve.java b/integration/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/tomcat/AbstractKeycloakAuthenticatorValve.java index 750f6b8be6..f415f9f11b 100755 --- a/integration/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/tomcat/AbstractKeycloakAuthenticatorValve.java +++ b/integration/tomcat/tomcat-core/src/main/java/org/keycloak/adapters/tomcat/AbstractKeycloakAuthenticatorValve.java @@ -151,7 +151,7 @@ public abstract class AbstractKeycloakAuthenticatorValve extends FormAuthenticat try { is = new FileInputStream(path); } catch (FileNotFoundException e) { - log.severe("NOT FOUND {0}", path); + log.log(Level.SEVERE, "NOT FOUND {0}", path); throw new RuntimeException(e); } } From 11035dbe1b295dfe22f1845c34378e22bef1e651 Mon Sep 17 00:00:00 2001 From: mposolda Date: Mon, 20 Apr 2015 19:11:49 +0200 Subject: [PATCH 07/16] KEYCLOAK-1070 Rename GrantedConsentModel to UserConsentModel. Mongo support for consents. Mongo fixes --- .../META-INF/jpa-changelog-1.2.0.RC1.xml | 24 ++-- .../main/resources/META-INF/persistence.xml | 6 +- .../updater/impl/updates/Update1_2_0_RC1.java | 1 + ...DefaultMongoConnectionFactoryProvider.java | 3 +- .../connections/mongo/api/MongoStore.java | 33 ++++- .../context/MongoStoreInvocationContext.java | 2 + .../mongo/impl/MongoStoreImpl.java | 48 +++++-- .../SimpleMongoStoreInvocationContext.java | 4 + ...ransactionMongoStoreInvocationContext.java | 22 ++- .../account/freemarker/model/AccessBean.java | 14 +- .../keycloak/models/GrantedConsentModel.java | 47 ------- .../org/keycloak/models/UserConsentModel.java | 69 ++++++++++ .../java/org/keycloak/models/UserModel.java | 8 +- .../models/entities/UserConsentEntity.java | 47 +++++++ .../models/utils/UserModelDelegate.java | 12 +- .../models/file/adapter/UserAdapter.java | 19 ++- .../keycloak/models/cache/UserAdapter.java | 12 +- .../keycloak/models/jpa/JpaUserProvider.java | 22 +-- .../org/keycloak/models/jpa/UserAdapter.java | 98 ++++++------- .../jpa/entities/GrantedConsentEntity.java | 96 ------------- .../GrantedConsentProtocolMapperEntity.java | 115 ---------------- .../entities/GrantedConsentRoleEntity.java | 115 ---------------- .../jpa/entities/UserConsentEntity.java | 91 ++++++++++++ .../UserConsentProtocolMapperEntity.java | 115 ++++++++++++++++ .../jpa/entities/UserConsentRoleEntity.java | 115 ++++++++++++++++ .../keycloak/adapters/MongoUserProvider.java | 46 +++++-- .../mongo/keycloak/adapters/UserAdapter.java | 129 +++++++++++++----- .../keycloak/entities/MongoClientEntity.java | 2 +- .../keycloak/entities/MongoRealmEntity.java | 9 +- .../keycloak/entities/MongoRoleEntity.java | 19 +-- .../entities/MongoUserConsentEntity.java | 17 +++ .../keycloak/entities/MongoUserEntity.java | 10 +- .../models/mongo/utils/MongoModelUtils.java | 21 ++- .../mongo/MongoUserSessionProvider.java | 18 +-- .../entities/MongoUserSessionEntity.java | 2 +- .../managers/AuthenticationManager.java | 14 +- .../resources/LoginActionsService.java | 7 +- .../keycloak/testsuite/model/AdapterTest.java | 4 + ...delTest.java => UserConsentModelTest.java} | 82 +++++------ 39 files changed, 871 insertions(+), 647 deletions(-) delete mode 100644 model/api/src/main/java/org/keycloak/models/GrantedConsentModel.java create mode 100644 model/api/src/main/java/org/keycloak/models/UserConsentModel.java create mode 100644 model/api/src/main/java/org/keycloak/models/entities/UserConsentEntity.java delete mode 100644 model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentEntity.java delete mode 100644 model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentProtocolMapperEntity.java delete mode 100644 model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentRoleEntity.java create mode 100644 model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentEntity.java create mode 100644 model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentProtocolMapperEntity.java create mode 100644 model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentRoleEntity.java create mode 100644 model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoUserConsentEntity.java rename testsuite/integration/src/test/java/org/keycloak/testsuite/model/{GrantedConsentModelTest.java => UserConsentModelTest.java} (76%) diff --git a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.RC1.xml b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.RC1.xml index a1698dcc9d..7b8c877113 100755 --- a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.RC1.xml +++ b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.RC1.xml @@ -35,7 +35,7 @@ - + @@ -46,16 +46,16 @@ - - + + - - + + @@ -64,14 +64,14 @@ - - - + + + - - - + + + @@ -101,7 +101,7 @@ - + diff --git a/connections/jpa/src/main/resources/META-INF/persistence.xml b/connections/jpa/src/main/resources/META-INF/persistence.xml index fbea205511..b4d93a7da9 100755 --- a/connections/jpa/src/main/resources/META-INF/persistence.xml +++ b/connections/jpa/src/main/resources/META-INF/persistence.xml @@ -20,9 +20,9 @@ org.keycloak.models.jpa.entities.IdentityProviderMapperEntity org.keycloak.models.jpa.entities.ClientIdentityProviderMappingEntity org.keycloak.models.jpa.entities.ProtocolMapperEntity - org.keycloak.models.jpa.entities.GrantedConsentEntity - org.keycloak.models.jpa.entities.GrantedConsentRoleEntity - org.keycloak.models.jpa.entities.GrantedConsentProtocolMapperEntity + org.keycloak.models.jpa.entities.UserConsentEntity + org.keycloak.models.jpa.entities.UserConsentRoleEntity + org.keycloak.models.jpa.entities.UserConsentProtocolMapperEntity org.keycloak.models.sessions.jpa.entities.ClientSessionEntity diff --git a/connections/mongo-update/src/main/java/org/keycloak/connections/mongo/updater/impl/updates/Update1_2_0_RC1.java b/connections/mongo-update/src/main/java/org/keycloak/connections/mongo/updater/impl/updates/Update1_2_0_RC1.java index c980067237..8ee4db3c53 100644 --- a/connections/mongo-update/src/main/java/org/keycloak/connections/mongo/updater/impl/updates/Update1_2_0_RC1.java +++ b/connections/mongo-update/src/main/java/org/keycloak/connections/mongo/updater/impl/updates/Update1_2_0_RC1.java @@ -22,6 +22,7 @@ public class Update1_2_0_RC1 extends Update { db.getCollection("realms").update(new BasicDBObject(), new BasicDBObject("$rename", new BasicDBObject("adminAppId", "clientId")), false, true); + ensureIndex("userConsents", new String[]{"clientId", "userId"}, true, false); } private void convertApplicationsToClients() { diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java index 138955bc6c..0ef0069b41 100755 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java @@ -38,7 +38,8 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro "org.keycloak.models.sessions.mongo.entities.MongoUserSessionEntity", "org.keycloak.models.sessions.mongo.entities.MongoClientSessionEntity", "org.keycloak.models.entities.UserFederationProviderEntity", - "org.keycloak.models.entities.ProtocolMapperEntity" + "org.keycloak.models.entities.ProtocolMapperEntity", + "org.keycloak.models.mongo.keycloak.entities.MongoUserConsentEntity" }; private static final Logger logger = Logger.getLogger(DefaultMongoConnectionFactoryProvider.class); diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/api/MongoStore.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/api/MongoStore.java index 36f448cdff..397c307146 100755 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/api/MongoStore.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/api/MongoStore.java @@ -24,13 +24,35 @@ public interface MongoStore { */ void updateEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context); + /** + * Bulk update of more entities of some type + * + * @param type + * @param query + * @param update + * @param context + * @return count of updated entities + */ + int updateEntities(Class type, DBObject query, DBObject update, MongoStoreInvocationContext context); T loadEntity(Class type, String id, MongoStoreInvocationContext context); T loadSingleEntity(Class type, DBObject query, MongoStoreInvocationContext context); + /** + * @param type + * @param query + * @param context + * @return query result or empty list if no results available for the query. Doesn't return null + */ List loadEntities(Class type, DBObject query, MongoStoreInvocationContext context); + /** + * @param type + * @param query + * @param context + * @return query result or empty list if no results available for the query. Doesn't return null + */ List loadEntities(Class type, DBObject query, DBObject sort, int firstResult, int maxResults, MongoStoreInvocationContext context); int countEntities(Class type, DBObject query, MongoStoreInvocationContext context); @@ -39,7 +61,16 @@ public interface MongoStore { boolean removeEntity(Class type, String id, MongoStoreInvocationContext context); - boolean removeEntities(Class type, DBObject query, MongoStoreInvocationContext context); + /** + * + * @param type + * @param query + * @param callback if true, then store will first load all entities, then call "afterRemove" for every entity. If false, the entities are removed directly without load and calling "afterRemove" callback + * false has better performance (especially if we are going to remove big number of entities) + * @param context + * @return count of removed entities + */ + int removeEntities(Class type, DBObject query, boolean callback, MongoStoreInvocationContext context); boolean pushItemToList(MongoIdentifiableEntity entity, String listPropertyName, S itemToPush, boolean skipIfAlreadyPresent, MongoStoreInvocationContext context); diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/api/context/MongoStoreInvocationContext.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/api/context/MongoStoreInvocationContext.java index c542ffe420..272f1c8caa 100644 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/api/context/MongoStoreInvocationContext.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/api/context/MongoStoreInvocationContext.java @@ -22,6 +22,8 @@ public interface MongoStoreInvocationContext { void beforeDBSearch(Class entityType); + void beforeDBBulkUpdateOrRemove(Class entityType); + void begin(); void commit(); diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/MongoStoreImpl.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/MongoStoreImpl.java index aded77e6b0..1696b65129 100755 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/MongoStoreImpl.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/MongoStoreImpl.java @@ -7,6 +7,7 @@ import com.mongodb.DBCollection; import com.mongodb.DBCursor; import com.mongodb.DBObject; import com.mongodb.MongoException; +import com.mongodb.WriteResult; import org.jboss.logging.Logger; import org.keycloak.connections.mongo.api.MongoCollection; import org.keycloak.connections.mongo.api.MongoEntity; @@ -127,7 +128,7 @@ public class MongoStoreImpl implements MongoStore { throw convertException(e); } - // Treat object as created in this transaction (It is already submited to transaction) + // Treat object as created in this transaction (It is already submitted to transaction) context.addCreatedEntity(entity); } @@ -170,6 +171,16 @@ public class MongoStoreImpl implements MongoStore { context.addUpdateTask(entity, fullUpdateTask); } + @Override + public int updateEntities(Class type, DBObject query, DBObject update, MongoStoreInvocationContext context) { + context.beforeDBBulkUpdateOrRemove(type); + + DBCollection collection = getDBCollectionForType(type); + WriteResult wr = collection.update(query, update, false, true); + + logger.debugf("Updated %d collections of type %s", wr.getN(), type); + return wr.getN(); + } @Override public T loadEntity(Class type, String id, MongoStoreInvocationContext context) { @@ -275,19 +286,32 @@ public class MongoStoreImpl implements MongoStore { @Override - public boolean removeEntities(Class type, DBObject query, MongoStoreInvocationContext context) { - List foundObjects = loadEntities(type, query, context); - if (foundObjects.size() == 0) { - return false; - } else { - DBCollection dbCollection = getDBCollectionForType(type); - dbCollection.remove(query); - //logger.debug("Removed %d" + foundObjects.size() + " entities of type: " + type + ", query: " + query); + public int removeEntities(Class type, DBObject query, boolean callback, MongoStoreInvocationContext context) { + if (callback) { + List foundObjects = loadEntities(type, query, context); + if (foundObjects.size() == 0) { + return 0; + } else { + DBCollection dbCollection = getDBCollectionForType(type); + dbCollection.remove(query); - for (MongoIdentifiableEntity found : foundObjects) { - context.addRemovedEntity(found);; + logger.debugf("Removed %d entities of type: %s, query: %s", foundObjects.size(), type, query); + + for (MongoIdentifiableEntity found : foundObjects) { + context.addRemovedEntity(found);; + } + return foundObjects.size(); } - return true; + } else { + + context.beforeDBBulkUpdateOrRemove(type); + + DBCollection dbCollection = getDBCollectionForType(type); + WriteResult writeResult = dbCollection.remove(query); + int removedCount = writeResult.getN(); + + logger.debugf("Removed directly %d entities of type: %s, query: %s", removedCount, type, query); + return removedCount; } } diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/context/SimpleMongoStoreInvocationContext.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/context/SimpleMongoStoreInvocationContext.java index 0ecffc6468..868805b848 100644 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/context/SimpleMongoStoreInvocationContext.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/context/SimpleMongoStoreInvocationContext.java @@ -45,6 +45,10 @@ public class SimpleMongoStoreInvocationContext implements MongoStoreInvocationCo public void beforeDBSearch(Class entityType) { } + @Override + public void beforeDBBulkUpdateOrRemove(Class entityType) { + } + @Override public void begin() { } diff --git a/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/context/TransactionMongoStoreInvocationContext.java b/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/context/TransactionMongoStoreInvocationContext.java index 39cf9eb5b9..117f07f9e0 100644 --- a/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/context/TransactionMongoStoreInvocationContext.java +++ b/connections/mongo/src/main/java/org/keycloak/connections/mongo/impl/context/TransactionMongoStoreInvocationContext.java @@ -50,10 +50,6 @@ public class TransactionMongoStoreInvocationContext implements MongoStoreInvocat @Override public void addUpdateTask(MongoIdentifiableEntity entityToUpdate, MongoTask task) { - if (!loadedObjects.containsValue(entityToUpdate)) { - throw new IllegalStateException("Entity " + entityToUpdate + " not found in loaded objects"); - } - Set currentObjectTasks = pendingUpdateTasks.get(entityToUpdate); if (currentObjectTasks == null) { currentObjectTasks = new LinkedHashSet(); @@ -106,6 +102,24 @@ public class TransactionMongoStoreInvocationContext implements MongoStoreInvocat } } + @Override + public void beforeDBBulkUpdateOrRemove(Class entityType) { + beforeDBSearch(entityType); + Set toRemove = new HashSet(); + + for (Map.Entry entry : loadedObjects.entrySet()) { + MongoIdentifiableEntity entity = entry.getValue(); + if (entity.getClass().equals(entityType)) { + toRemove.add(entry.getKey()); + } + } + + // Now remove all loadedObjects + for (String objectId : toRemove) { + loadedObjects.remove(objectId); + } + } + @Override public void begin() { loadedObjects.clear(); diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java index 58cea2fc0f..959b934a87 100644 --- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java +++ b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java @@ -5,7 +5,7 @@ import java.util.LinkedList; import java.util.List; import org.keycloak.models.ClientModel; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; @@ -20,14 +20,13 @@ public class AccessBean { private List clientGrants = new LinkedList(); public AccessBean(RealmModel realm, UserModel user, URI baseUri, String stateChecker) { - List grantedConsents = user.getGrantedConsents(); - for (GrantedConsentModel consent : grantedConsents) { - ClientModel client = realm.getClientById(consent.getClientId()); + List grantedConsents = user.getGrantedConsents(); + for (UserConsentModel consent : grantedConsents) { + ClientModel client = consent.getClient(); List realmRolesGranted = new LinkedList(); MultivaluedHashMap resourceRolesGranted = new MultivaluedHashMap(); - for (String roleId : consent.getGrantedRoles()) { - RoleModel role = realm.getRoleById(roleId); + for (RoleModel role : consent.getGrantedRoles()) { if (role.getContainer() instanceof RealmModel) { realmRolesGranted.add(role); } else { @@ -36,8 +35,7 @@ public class AccessBean { } List claimsGranted = new LinkedList(); - for (String protocolMapperId : consent.getGrantedProtocolMappers()) { - ProtocolMapperModel protocolMapper = client.getProtocolMapperById(protocolMapperId); + for (ProtocolMapperModel protocolMapper : consent.getGrantedProtocolMappers()) { claimsGranted.add(protocolMapper.getConsentText()); } diff --git a/model/api/src/main/java/org/keycloak/models/GrantedConsentModel.java b/model/api/src/main/java/org/keycloak/models/GrantedConsentModel.java deleted file mode 100644 index e0366559be..0000000000 --- a/model/api/src/main/java/org/keycloak/models/GrantedConsentModel.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.keycloak.models; - -import java.util.HashSet; -import java.util.Set; - -/** - * @author Marek Posolda - */ -public class GrantedConsentModel { - - private final String clientId; - private Set protocolMapperIds = new HashSet(); - private Set roleIds = new HashSet(); - - public GrantedConsentModel(String clientId) { - this.clientId = clientId; - } - - public String getClientId() { - return clientId; - } - - public void addGrantedRole(String roleId) { - roleIds.add(roleId); - } - - public Set getGrantedRoles() { - return roleIds; - } - - public boolean isRoleGranted(String roleId) { - return roleIds.contains(roleId); - } - - public void addGrantedProtocolMapper(String protocolMapperId) { - protocolMapperIds.add(protocolMapperId); - } - - public Set getGrantedProtocolMappers() { - return protocolMapperIds; - } - - public boolean isProtocolMapperGranted(String protocolMapperId) { - return protocolMapperIds.contains(protocolMapperId); - } - -} diff --git a/model/api/src/main/java/org/keycloak/models/UserConsentModel.java b/model/api/src/main/java/org/keycloak/models/UserConsentModel.java new file mode 100644 index 0000000000..11f1034500 --- /dev/null +++ b/model/api/src/main/java/org/keycloak/models/UserConsentModel.java @@ -0,0 +1,69 @@ +package org.keycloak.models; + +import java.util.HashSet; +import java.util.Set; + +/** + * @author Marek Posolda + */ +public class UserConsentModel { + + private final RealmModel realm; + private final ClientModel client; + private Set protocolMappers = new HashSet(); + private Set roles = new HashSet(); + + public UserConsentModel(RealmModel realm, String clientId) { + this.realm = realm; + this.client = realm.getClientById(clientId); + + if (client == null) { + throw new ModelException("Client with id [" + clientId + "] is not available"); + } + } + + public ClientModel getClient() { + return client; + } + + public void addGrantedRole(String roleId) { + RoleModel role = realm.getRoleById(roleId); + + // Chance that role was already deleted by other transaction and is not available anymore + if (role != null) { + roles.add(role); + } + } + + public Set getGrantedRoles() { + return roles; + } + + public boolean isRoleGranted(RoleModel role) { + for (RoleModel currentRole : roles) { + if (currentRole.getId().equals(role.getId())) return true; + } + return false; + } + + public void addGrantedProtocolMapper(String protocolMapperId) { + ProtocolMapperModel protocolMapper = client.getProtocolMapperById(protocolMapperId); + + // Chance that protocolMapper was already deleted by other transaction and is not available anymore + if (protocolMapper != null) { + protocolMappers.add(protocolMapper); + } + } + + public Set getGrantedProtocolMappers() { + return protocolMappers; + } + + public boolean isProtocolMapperGranted(ProtocolMapperModel protocolMapper) { + for (ProtocolMapperModel currentProtMapper : protocolMappers) { + if (currentProtMapper.getId().equals(protocolMapper.getId())) return true; + } + return false; + } + +} diff --git a/model/api/src/main/java/org/keycloak/models/UserModel.java b/model/api/src/main/java/org/keycloak/models/UserModel.java index 6ad716c2ff..09babf8082 100755 --- a/model/api/src/main/java/org/keycloak/models/UserModel.java +++ b/model/api/src/main/java/org/keycloak/models/UserModel.java @@ -75,10 +75,10 @@ public interface UserModel { String getFederationLink(); void setFederationLink(String link); - GrantedConsentModel addGrantedConsent(GrantedConsentModel consent); - GrantedConsentModel getGrantedConsentByClient(String clientId); - List getGrantedConsents(); - void updateGrantedConsent(GrantedConsentModel consent); + void addGrantedConsent(UserConsentModel consent); + UserConsentModel getGrantedConsentByClient(String clientId); + List getGrantedConsents(); + void updateGrantedConsent(UserConsentModel consent); boolean revokeGrantedConsentForClient(String clientId); public static enum RequiredAction { diff --git a/model/api/src/main/java/org/keycloak/models/entities/UserConsentEntity.java b/model/api/src/main/java/org/keycloak/models/entities/UserConsentEntity.java new file mode 100644 index 0000000000..47b76c6ba2 --- /dev/null +++ b/model/api/src/main/java/org/keycloak/models/entities/UserConsentEntity.java @@ -0,0 +1,47 @@ +package org.keycloak.models.entities; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Marek Posolda + */ +public class UserConsentEntity extends AbstractIdentifiableEntity { + + private String userId; + private String clientId; + private List grantedRoles = new ArrayList(); + private List grantedProtocolMappers = new ArrayList(); + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public List getGrantedRoles() { + return grantedRoles; + } + + public void setGrantedRoles(List grantedRoles) { + this.grantedRoles = grantedRoles; + } + + public List getGrantedProtocolMappers() { + return grantedProtocolMappers; + } + + public void setGrantedProtocolMappers(List grantedProtocolMappers) { + this.grantedProtocolMappers = grantedProtocolMappers; + } +} diff --git a/model/api/src/main/java/org/keycloak/models/utils/UserModelDelegate.java b/model/api/src/main/java/org/keycloak/models/utils/UserModelDelegate.java index 83b6add1f0..cd7aebfa71 100755 --- a/model/api/src/main/java/org/keycloak/models/utils/UserModelDelegate.java +++ b/model/api/src/main/java/org/keycloak/models/utils/UserModelDelegate.java @@ -1,7 +1,7 @@ package org.keycloak.models.utils; import org.keycloak.models.ClientModel; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserCredentialValueModel; @@ -188,22 +188,22 @@ public class UserModelDelegate implements UserModel { } @Override - public GrantedConsentModel addGrantedConsent(GrantedConsentModel consent) { - return delegate.addGrantedConsent(consent); + public void addGrantedConsent(UserConsentModel consent) { + delegate.addGrantedConsent(consent); } @Override - public GrantedConsentModel getGrantedConsentByClient(String clientId) { + public UserConsentModel getGrantedConsentByClient(String clientId) { return delegate.getGrantedConsentByClient(clientId); } @Override - public List getGrantedConsents() { + public List getGrantedConsents() { return delegate.getGrantedConsents(); } @Override - public void updateGrantedConsent(GrantedConsentModel consent) { + public void updateGrantedConsent(UserConsentModel consent) { delegate.updateGrantedConsent(consent); } diff --git a/model/file/src/main/java/org/keycloak/models/file/adapter/UserAdapter.java b/model/file/src/main/java/org/keycloak/models/file/adapter/UserAdapter.java index 3033eea720..b9642db59b 100755 --- a/model/file/src/main/java/org/keycloak/models/file/adapter/UserAdapter.java +++ b/model/file/src/main/java/org/keycloak/models/file/adapter/UserAdapter.java @@ -20,7 +20,7 @@ import org.keycloak.models.ClientModel; import static org.keycloak.models.utils.Pbkdf2PasswordEncoder.getSalt; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; @@ -432,25 +432,24 @@ public class UserAdapter implements UserModel, Comparable { } @Override - public GrantedConsentModel addGrantedConsent(GrantedConsentModel consent) { + public void addGrantedConsent(UserConsentModel consent) { + // TODO + } + + @Override + public UserConsentModel getGrantedConsentByClient(String clientId) { // TODO return null; } @Override - public GrantedConsentModel getGrantedConsentByClient(String clientId) { + public List getGrantedConsents() { // TODO return null; } @Override - public List getGrantedConsents() { - // TODO - return null; - } - - @Override - public void updateGrantedConsent(GrantedConsentModel consent) { + public void updateGrantedConsent(UserConsentModel consent) { // TODO } diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/UserAdapter.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/UserAdapter.java index 97b62fc6c1..16b705bfab 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/UserAdapter.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/UserAdapter.java @@ -1,7 +1,7 @@ package org.keycloak.models.cache; import org.keycloak.models.ClientModel; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleContainerModel; @@ -277,27 +277,27 @@ public class UserAdapter implements UserModel { } @Override - public GrantedConsentModel addGrantedConsent(GrantedConsentModel consent) { + public void addGrantedConsent(UserConsentModel consent) { getDelegateForUpdate(); - return updated.addGrantedConsent(consent); + updated.addGrantedConsent(consent); } @Override - public GrantedConsentModel getGrantedConsentByClient(String clientId) { + public UserConsentModel getGrantedConsentByClient(String clientId) { // TODO: caching? getDelegateForUpdate(); return updated.getGrantedConsentByClient(clientId); } @Override - public List getGrantedConsents() { + public List getGrantedConsents() { // TODO: caching? getDelegateForUpdate(); return updated.getGrantedConsents(); } @Override - public void updateGrantedConsent(GrantedConsentModel consent) { + public void updateGrantedConsent(UserConsentModel consent) { getDelegateForUpdate(); updated.updateGrantedConsent(consent); } diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserProvider.java b/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserProvider.java index 15300d013a..d0af512b05 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserProvider.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserProvider.java @@ -88,9 +88,9 @@ public class JpaUserProvider implements UserProvider { private void removeUser(UserEntity user) { em.createNamedQuery("deleteUserRoleMappingsByUser").setParameter("user", user).executeUpdate(); em.createNamedQuery("deleteFederatedIdentityByUser").setParameter("user", user).executeUpdate(); - em.createNamedQuery("deleteGrantedConsentRolesByUser").setParameter("user", user).executeUpdate(); - em.createNamedQuery("deleteGrantedConsentProtMappersByUser").setParameter("user", user).executeUpdate(); - em.createNamedQuery("deleteGrantedConsentsByUser").setParameter("user", user).executeUpdate(); + em.createNamedQuery("deleteUserConsentRolesByUser").setParameter("user", user).executeUpdate(); + em.createNamedQuery("deleteUserConsentProtMappersByUser").setParameter("user", user).executeUpdate(); + em.createNamedQuery("deleteUserConsentsByUser").setParameter("user", user).executeUpdate(); em.remove(user); } @@ -134,11 +134,11 @@ public class JpaUserProvider implements UserProvider { @Override public void preRemove(RealmModel realm) { - int num = em.createNamedQuery("deleteGrantedConsentRolesByRealm") + int num = em.createNamedQuery("deleteUserConsentRolesByRealm") .setParameter("realmId", realm.getId()).executeUpdate(); - num = em.createNamedQuery("deleteGrantedConsentProtMappersByRealm") + num = em.createNamedQuery("deleteUserConsentProtMappersByRealm") .setParameter("realmId", realm.getId()).executeUpdate(); - num = em.createNamedQuery("deleteGrantedConsentsByRealm") + num = em.createNamedQuery("deleteUserConsentsByRealm") .setParameter("realmId", realm.getId()).executeUpdate(); num = em.createNamedQuery("deleteUserRoleMappingsByRealm") .setParameter("realmId", realm.getId()).executeUpdate(); @@ -184,20 +184,20 @@ public class JpaUserProvider implements UserProvider { @Override public void preRemove(RealmModel realm, RoleModel role) { - em.createNamedQuery("deleteGrantedConsentRolesByRole").setParameter("roleId", role.getId()).executeUpdate(); + em.createNamedQuery("deleteUserConsentRolesByRole").setParameter("roleId", role.getId()).executeUpdate(); em.createNamedQuery("deleteUserRoleMappingsByRole").setParameter("roleId", role.getId()).executeUpdate(); } @Override public void preRemove(RealmModel realm, ClientModel client) { - em.createNamedQuery("deleteGrantedConsentProtMappersByClient").setParameter("clientId", client.getId()).executeUpdate(); - em.createNamedQuery("deleteGrantedConsentRolesByClient").setParameter("clientId", client.getId()).executeUpdate(); - em.createNamedQuery("deleteGrantedConsentsByClient").setParameter("clientId", client.getId()).executeUpdate(); + em.createNamedQuery("deleteUserConsentProtMappersByClient").setParameter("clientId", client.getId()).executeUpdate(); + em.createNamedQuery("deleteUserConsentRolesByClient").setParameter("clientId", client.getId()).executeUpdate(); + em.createNamedQuery("deleteUserConsentsByClient").setParameter("clientId", client.getId()).executeUpdate(); } @Override public void preRemove(ClientModel client, ProtocolMapperModel protocolMapper) { - em.createNamedQuery("deleteGrantedConsentProtMappersByProtocolMapper") + em.createNamedQuery("deleteUserConsentProtMappersByProtocolMapper") .setParameter("protocolMapperId", protocolMapper.getId()) .executeUpdate(); } diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java b/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java index f8d935275a..576801f382 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java @@ -1,7 +1,8 @@ package org.keycloak.models.jpa; import org.keycloak.models.ClientModel; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.ProtocolMapperModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.ModelDuplicateException; import org.keycloak.models.ModelException; import org.keycloak.models.PasswordPolicy; @@ -12,9 +13,9 @@ import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserCredentialValueModel; import org.keycloak.models.UserModel; import org.keycloak.models.jpa.entities.CredentialEntity; -import org.keycloak.models.jpa.entities.GrantedConsentEntity; -import org.keycloak.models.jpa.entities.GrantedConsentProtocolMapperEntity; -import org.keycloak.models.jpa.entities.GrantedConsentRoleEntity; +import org.keycloak.models.jpa.entities.UserConsentEntity; +import org.keycloak.models.jpa.entities.UserConsentProtocolMapperEntity; +import org.keycloak.models.jpa.entities.UserConsentRoleEntity; import org.keycloak.models.jpa.entities.UserAttributeEntity; import org.keycloak.models.jpa.entities.UserEntity; import org.keycloak.models.jpa.entities.UserRequiredActionEntity; @@ -29,7 +30,6 @@ import javax.persistence.TypedQuery; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; -import java.util.Date; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -480,18 +480,15 @@ public class UserAdapter implements UserModel { } @Override - public GrantedConsentModel addGrantedConsent(GrantedConsentModel consent) { - String clientId = consent.getClientId(); - if (clientId == null) { - throw new ModelException("clientId needs to be filled for newly added consent!"); - } + public void addGrantedConsent(UserConsentModel consent) { + String clientId = consent.getClient().getId(); - GrantedConsentEntity consentEntity = getGrantedConsentEntity(clientId); + UserConsentEntity consentEntity = getGrantedConsentEntity(clientId); if (consentEntity != null) { throw new ModelDuplicateException("Consent already exists for client [" + clientId + "] and user [" + user.getId() + "]"); } - consentEntity = new GrantedConsentEntity(); + consentEntity = new UserConsentEntity(); consentEntity.setId(KeycloakModelUtils.generateId()); consentEntity.setUser(user); consentEntity.setClientId(clientId); @@ -499,38 +496,33 @@ public class UserAdapter implements UserModel { em.flush(); updateGrantedConsentEntity(consentEntity, consent); - - return consent; } @Override - public GrantedConsentModel getGrantedConsentByClient(String clientId) { - GrantedConsentEntity entity = getGrantedConsentEntity(clientId); + public UserConsentModel getGrantedConsentByClient(String clientId) { + UserConsentEntity entity = getGrantedConsentEntity(clientId); return toConsentModel(entity); } @Override - public List getGrantedConsents() { - TypedQuery query = em.createNamedQuery("grantedConsentsByUser", GrantedConsentEntity.class); + public List getGrantedConsents() { + TypedQuery query = em.createNamedQuery("userConsentsByUser", UserConsentEntity.class); query.setParameter("userId", getId()); - List results = query.getResultList(); + List results = query.getResultList(); - List consents = new ArrayList(); - for (GrantedConsentEntity entity : results) { - GrantedConsentModel model = toConsentModel(entity); + List consents = new ArrayList(); + for (UserConsentEntity entity : results) { + UserConsentModel model = toConsentModel(entity); consents.add(model); } return consents; } @Override - public void updateGrantedConsent(GrantedConsentModel consent) { - String clientId = consent.getClientId(); - if (clientId == null) { - throw new ModelException("clientId needs to be for newly added consent!"); - } + public void updateGrantedConsent(UserConsentModel consent) { + String clientId = consent.getClient().getId(); - GrantedConsentEntity consentEntity = getGrantedConsentEntity(clientId); + UserConsentEntity consentEntity = getGrantedConsentEntity(clientId); if (consentEntity == null) { throw new ModelException("Consent not found for client [" + clientId + "] and user [" + user.getId() + "]"); } @@ -540,7 +532,7 @@ public class UserAdapter implements UserModel { @Override public boolean revokeGrantedConsentForClient(String clientId) { - GrantedConsentEntity consentEntity = getGrantedConsentEntity(clientId); + UserConsentEntity consentEntity = getGrantedConsentEntity(clientId); if (consentEntity == null) return false; em.remove(consentEntity); @@ -549,11 +541,11 @@ public class UserAdapter implements UserModel { } - private GrantedConsentEntity getGrantedConsentEntity(String clientId) { - TypedQuery query = em.createNamedQuery("grantedConsentByUserAndClient", GrantedConsentEntity.class); + private UserConsentEntity getGrantedConsentEntity(String clientId) { + TypedQuery query = em.createNamedQuery("userConsentByUserAndClient", UserConsentEntity.class); query.setParameter("userId", getId()); query.setParameter("clientId", clientId); - List results = query.getResultList(); + List results = query.getResultList(); if (results.size() > 1) { throw new ModelException("More results found for user [" + getUsername() + "] and client [" + clientId + "]"); } else if (results.size() == 1) { @@ -563,23 +555,23 @@ public class UserAdapter implements UserModel { } } - private GrantedConsentModel toConsentModel(GrantedConsentEntity entity) { + private UserConsentModel toConsentModel(UserConsentEntity entity) { if (entity == null) { return null; } - GrantedConsentModel model = new GrantedConsentModel(entity.getClientId()); + UserConsentModel model = new UserConsentModel(realm, entity.getClientId()); - Collection grantedRoleEntities = entity.getGrantedRoles(); + Collection grantedRoleEntities = entity.getGrantedRoles(); if (grantedRoleEntities != null) { - for (GrantedConsentRoleEntity grantedRole : grantedRoleEntities) { + for (UserConsentRoleEntity grantedRole : grantedRoleEntities) { model.addGrantedRole(grantedRole.getRoleId()); } } - Collection grantedProtocolMapperEntities = entity.getGrantedProtocolMappers(); + Collection grantedProtocolMapperEntities = entity.getGrantedProtocolMappers(); if (grantedProtocolMapperEntities != null) { - for (GrantedConsentProtocolMapperEntity grantedProtMapper : grantedProtocolMapperEntities) { + for (UserConsentProtocolMapperEntity grantedProtMapper : grantedProtocolMapperEntities) { model.addGrantedProtocolMapper(grantedProtMapper.getProtocolMapperId()); } } @@ -588,14 +580,14 @@ public class UserAdapter implements UserModel { } // Update roles and protocolMappers to given consentEntity from the consentModel - private void updateGrantedConsentEntity(GrantedConsentEntity consentEntity, GrantedConsentModel consentModel) { - Collection grantedProtocolMapperEntities = consentEntity.getGrantedProtocolMappers(); - Collection mappersToRemove = new HashSet(grantedProtocolMapperEntities); + private void updateGrantedConsentEntity(UserConsentEntity consentEntity, UserConsentModel consentModel) { + Collection grantedProtocolMapperEntities = consentEntity.getGrantedProtocolMappers(); + Collection mappersToRemove = new HashSet(grantedProtocolMapperEntities); - for (String protocolMapperId : consentModel.getGrantedProtocolMappers()) { - GrantedConsentProtocolMapperEntity grantedProtocolMapperEntity = new GrantedConsentProtocolMapperEntity(); - grantedProtocolMapperEntity.setGrantedConsent(consentEntity); - grantedProtocolMapperEntity.setProtocolMapperId(protocolMapperId); + for (ProtocolMapperModel protocolMapper : consentModel.getGrantedProtocolMappers()) { + UserConsentProtocolMapperEntity grantedProtocolMapperEntity = new UserConsentProtocolMapperEntity(); + grantedProtocolMapperEntity.setUserConsent(consentEntity); + grantedProtocolMapperEntity.setProtocolMapperId(protocolMapper.getId()); // Check if it's already there if (!grantedProtocolMapperEntities.contains(grantedProtocolMapperEntity)) { @@ -607,17 +599,17 @@ public class UserAdapter implements UserModel { } } // Those mappers were no longer on consentModel and will be removed - for (GrantedConsentProtocolMapperEntity toRemove : mappersToRemove) { + for (UserConsentProtocolMapperEntity toRemove : mappersToRemove) { grantedProtocolMapperEntities.remove(toRemove); em.remove(toRemove); } - Collection grantedRoleEntities = consentEntity.getGrantedRoles(); - Set rolesToRemove = new HashSet(grantedRoleEntities); - for (String roleId : consentModel.getGrantedRoles()) { - GrantedConsentRoleEntity consentRoleEntity = new GrantedConsentRoleEntity(); - consentRoleEntity.setGrantedConsent(consentEntity); - consentRoleEntity.setRoleId(roleId); + Collection grantedRoleEntities = consentEntity.getGrantedRoles(); + Set rolesToRemove = new HashSet(grantedRoleEntities); + for (RoleModel role : consentModel.getGrantedRoles()) { + UserConsentRoleEntity consentRoleEntity = new UserConsentRoleEntity(); + consentRoleEntity.setUserConsent(consentEntity); + consentRoleEntity.setRoleId(role.getId()); // Check if it's already there if (!grantedRoleEntities.contains(consentRoleEntity)) { @@ -629,7 +621,7 @@ public class UserAdapter implements UserModel { } } // Those roles were no longer on consentModel and will be removed - for (GrantedConsentRoleEntity toRemove : rolesToRemove) { + for (UserConsentRoleEntity toRemove : rolesToRemove) { grantedRoleEntities.remove(toRemove); em.remove(toRemove); } diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentEntity.java deleted file mode 100644 index 262f37f671..0000000000 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentEntity.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.keycloak.models.jpa.entities; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.persistence.CascadeType; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; - -/** - * @author Marek Posolda - */ -@Entity -@Table(name="GRANTED_CONSENT", uniqueConstraints = { - @UniqueConstraint(columnNames = {"USER_ID", "CLIENT_ID"}) -}) -@NamedQueries({ - @NamedQuery(name="grantedConsentByUserAndClient", query="select consent from GrantedConsentEntity consent where consent.user.id = :userId and consent.clientId = :clientId"), - @NamedQuery(name="grantedConsentsByUser", query="select consent from GrantedConsentEntity consent where consent.user.id = :userId"), - @NamedQuery(name="deleteGrantedConsentsByRealm", query="delete from GrantedConsentEntity consent where consent.user IN (select user from UserEntity user where user.realmId = :realmId)"), - @NamedQuery(name="deleteGrantedConsentsByUser", query="delete from GrantedConsentEntity consent where consent.user = :user"), - @NamedQuery(name="deleteGrantedConsentsByClient", query="delete from GrantedConsentEntity consent where consent.clientId = :clientId"), -}) -public class GrantedConsentEntity { - - @Id - @Column(name="ID", length = 36) - protected String id; - - @ManyToOne(fetch= FetchType.LAZY) - @JoinColumn(name="USER_ID") - protected UserEntity user; - - @Column(name="CLIENT_ID") - protected String clientId; - - @OneToMany(cascade ={CascadeType.REMOVE}, orphanRemoval = true, mappedBy = "grantedConsent") - Collection grantedRoles = new ArrayList(); - - @OneToMany(cascade ={CascadeType.REMOVE}, orphanRemoval = true, mappedBy = "grantedConsent") - Collection grantedProtocolMappers = new ArrayList(); - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public UserEntity getUser() { - return user; - } - - public void setUser(UserEntity user) { - this.user = user; - } - - public String getClientId() { - return clientId; - } - - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public Collection getGrantedRoles() { - return grantedRoles; - } - - public void setGrantedRoles(Collection grantedRoles) { - this.grantedRoles = grantedRoles; - } - - public Collection getGrantedProtocolMappers() { - return grantedProtocolMappers; - } - - public void setGrantedProtocolMappers(Collection grantedProtocolMappers) { - this.grantedProtocolMappers = grantedProtocolMappers; - } -} diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentProtocolMapperEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentProtocolMapperEntity.java deleted file mode 100644 index 7683dec1fe..0000000000 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentProtocolMapperEntity.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.keycloak.models.jpa.entities; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; - -/** - * @author Marek Posolda - */ -@NamedQueries({ - @NamedQuery(name="deleteGrantedConsentProtMappersByRealm", query= - "delete from GrantedConsentProtocolMapperEntity csm where csm.grantedConsent IN (select consent from GrantedConsentEntity consent where consent.user IN (select user from UserEntity user where user.realmId = :realmId))"), - @NamedQuery(name="deleteGrantedConsentProtMappersByUser", query="delete from GrantedConsentProtocolMapperEntity csm where csm.grantedConsent IN (select consent from GrantedConsentEntity consent where consent.user = :user)"), - @NamedQuery(name="deleteGrantedConsentProtMappersByProtocolMapper", query="delete from GrantedConsentProtocolMapperEntity csm where csm.protocolMapperId = :protocolMapperId)"), - @NamedQuery(name="deleteGrantedConsentProtMappersByClient", query="delete from GrantedConsentProtocolMapperEntity csm where csm.grantedConsent IN (select consent from GrantedConsentEntity consent where consent.clientId = :clientId))"), -}) -@Entity -@Table(name="GRANTED_CONSENT_PROT_MAPPER") -@IdClass(GrantedConsentProtocolMapperEntity.Key.class) -public class GrantedConsentProtocolMapperEntity { - - @Id - @ManyToOne(fetch= FetchType.LAZY) - @JoinColumn(name = "GRANTED_CONSENT_ID") - protected GrantedConsentEntity grantedConsent; - - @Id - @Column(name="PROTOCOL_MAPPER_ID") - protected String protocolMapperId; - - public GrantedConsentEntity getGrantedConsent() { - return grantedConsent; - } - - public void setGrantedConsent(GrantedConsentEntity grantedConsent) { - this.grantedConsent = grantedConsent; - } - - public String getProtocolMapperId() { - return protocolMapperId; - } - - public void setProtocolMapperId(String protocolMapperId) { - this.protocolMapperId = protocolMapperId; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - GrantedConsentProtocolMapperEntity that = (GrantedConsentProtocolMapperEntity)o; - Key myKey = new Key(this.grantedConsent, this.protocolMapperId); - Key hisKey = new Key(that.grantedConsent, that.protocolMapperId); - return myKey.equals(hisKey); - } - - @Override - public int hashCode() { - Key myKey = new Key(this.grantedConsent, this.protocolMapperId); - return myKey.hashCode(); - } - - public static class Key implements Serializable { - - protected GrantedConsentEntity grantedConsent; - - protected String protocolMapperId; - - public Key() { - } - - public Key(GrantedConsentEntity grantedConsent, String protocolMapperId) { - this.grantedConsent = grantedConsent; - this.protocolMapperId = protocolMapperId; - } - - public GrantedConsentEntity getGrantedConsent() { - return grantedConsent; - } - - public String getProtocolMapperId() { - return protocolMapperId; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - Key key = (Key) o; - - if (grantedConsent != null ? !grantedConsent.getId().equals(key.grantedConsent != null ? key.grantedConsent.getId() : null) : key.grantedConsent != null) return false; - if (protocolMapperId != null ? !protocolMapperId.equals(key.protocolMapperId) : key.protocolMapperId != null) return false; - - return true; - } - - @Override - public int hashCode() { - int result = grantedConsent != null ? grantedConsent.getId().hashCode() : 0; - result = 31 * result + (protocolMapperId != null ? protocolMapperId.hashCode() : 0); - return result; - } - } -} diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentRoleEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentRoleEntity.java deleted file mode 100644 index ee2b3bb98d..0000000000 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GrantedConsentRoleEntity.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.keycloak.models.jpa.entities; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; - -/** - * @author Marek Posolda - */ -@NamedQueries({ - @NamedQuery(name="deleteGrantedConsentRolesByRealm", query="delete from GrantedConsentRoleEntity grantedRole where grantedRole.grantedConsent IN (select consent from GrantedConsentEntity consent where consent.user IN (select user from UserEntity user where user.realmId = :realmId))"), - @NamedQuery(name="deleteGrantedConsentRolesByUser", query="delete from GrantedConsentRoleEntity grantedRole where grantedRole.grantedConsent IN (select consent from GrantedConsentEntity consent where consent.user = :user)"), - @NamedQuery(name="deleteGrantedConsentRolesByRole", query="delete from GrantedConsentRoleEntity grantedRole where grantedRole.roleId = :roleId)"), - @NamedQuery(name="deleteGrantedConsentRolesByClient", query="delete from GrantedConsentRoleEntity grantedRole where grantedRole.grantedConsent IN (select consent from GrantedConsentEntity consent where consent.clientId = :clientId)"), -}) -@Entity -@Table(name="GRANTED_CONSENT_ROLE") -@IdClass(GrantedConsentRoleEntity.Key.class) -public class GrantedConsentRoleEntity { - - @Id - @ManyToOne(fetch= FetchType.LAZY) - @JoinColumn(name = "GRANTED_CONSENT_ID") - protected GrantedConsentEntity grantedConsent; - - @Id - @Column(name="ROLE_ID") - protected String roleId; - - public GrantedConsentEntity getGrantedConsent() { - return grantedConsent; - } - - public void setGrantedConsent(GrantedConsentEntity grantedConsent) { - this.grantedConsent = grantedConsent; - } - - public String getRoleId() { - return roleId; - } - - public void setRoleId(String roleId) { - this.roleId = roleId; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - GrantedConsentRoleEntity that = (GrantedConsentRoleEntity)o; - Key myKey = new Key(this.grantedConsent, this.roleId); - Key hisKey = new Key(that.grantedConsent, that.roleId); - return myKey.equals(hisKey); - } - - @Override - public int hashCode() { - Key myKey = new Key(this.grantedConsent, this.roleId); - return myKey.hashCode(); - } - - public static class Key implements Serializable { - - protected GrantedConsentEntity grantedConsent; - - protected String roleId; - - public Key() { - } - - public Key(GrantedConsentEntity grantedConsent, String roleId) { - this.grantedConsent = grantedConsent; - this.roleId = roleId; - } - - public GrantedConsentEntity getGrantedConsent() { - return grantedConsent; - } - - public String getRoleId() { - return roleId; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - Key key = (Key) o; - - if (grantedConsent != null ? !grantedConsent.getId().equals(key.grantedConsent != null ? key.grantedConsent.getId() : null) : key.grantedConsent != null) return false; - if (roleId != null ? !roleId.equals(key.roleId) : key.roleId != null) return false; - - return true; - } - - @Override - public int hashCode() { - int result = grantedConsent != null ? grantedConsent.getId().hashCode() : 0; - result = 31 * result + (roleId != null ? roleId.hashCode() : 0); - return result; - } - } - -} diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentEntity.java new file mode 100644 index 0000000000..9df40690b8 --- /dev/null +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentEntity.java @@ -0,0 +1,91 @@ +package org.keycloak.models.jpa.entities; + +import java.util.ArrayList; +import java.util.Collection; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.UniqueConstraint; + +/** + * @author Marek Posolda + */ +@Entity +@Table(name="USER_CONSENT", uniqueConstraints = { + @UniqueConstraint(columnNames = {"USER_ID", "CLIENT_ID"}) +}) +@NamedQueries({ + @NamedQuery(name="userConsentByUserAndClient", query="select consent from UserConsentEntity consent where consent.user.id = :userId and consent.clientId = :clientId"), + @NamedQuery(name="userConsentsByUser", query="select consent from UserConsentEntity consent where consent.user.id = :userId"), + @NamedQuery(name="deleteUserConsentsByRealm", query="delete from UserConsentEntity consent where consent.user IN (select user from UserEntity user where user.realmId = :realmId)"), + @NamedQuery(name="deleteUserConsentsByUser", query="delete from UserConsentEntity consent where consent.user = :user"), + @NamedQuery(name="deleteUserConsentsByClient", query="delete from UserConsentEntity consent where consent.clientId = :clientId"), +}) +public class UserConsentEntity { + + @Id + @Column(name="ID", length = 36) + protected String id; + + @ManyToOne(fetch= FetchType.LAZY) + @JoinColumn(name="USER_ID") + protected UserEntity user; + + @Column(name="CLIENT_ID") + protected String clientId; + + @OneToMany(cascade ={CascadeType.REMOVE}, orphanRemoval = true, mappedBy = "userConsent") + Collection grantedRoles = new ArrayList(); + + @OneToMany(cascade ={CascadeType.REMOVE}, orphanRemoval = true, mappedBy = "userConsent") + Collection grantedProtocolMappers = new ArrayList(); + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public UserEntity getUser() { + return user; + } + + public void setUser(UserEntity user) { + this.user = user; + } + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public Collection getGrantedRoles() { + return grantedRoles; + } + + public void setGrantedRoles(Collection grantedRoles) { + this.grantedRoles = grantedRoles; + } + + public Collection getGrantedProtocolMappers() { + return grantedProtocolMappers; + } + + public void setGrantedProtocolMappers(Collection grantedProtocolMappers) { + this.grantedProtocolMappers = grantedProtocolMappers; + } +} diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentProtocolMapperEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentProtocolMapperEntity.java new file mode 100644 index 0000000000..16814d2e89 --- /dev/null +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentProtocolMapperEntity.java @@ -0,0 +1,115 @@ +package org.keycloak.models.jpa.entities; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.Table; + +/** + * @author Marek Posolda + */ +@NamedQueries({ + @NamedQuery(name="deleteUserConsentProtMappersByRealm", query= + "delete from UserConsentProtocolMapperEntity csm where csm.userConsent IN (select consent from UserConsentEntity consent where consent.user IN (select user from UserEntity user where user.realmId = :realmId))"), + @NamedQuery(name="deleteUserConsentProtMappersByUser", query="delete from UserConsentProtocolMapperEntity csm where csm.userConsent IN (select consent from UserConsentEntity consent where consent.user = :user)"), + @NamedQuery(name="deleteUserConsentProtMappersByProtocolMapper", query="delete from UserConsentProtocolMapperEntity csm where csm.protocolMapperId = :protocolMapperId)"), + @NamedQuery(name="deleteUserConsentProtMappersByClient", query="delete from UserConsentProtocolMapperEntity csm where csm.userConsent IN (select consent from UserConsentEntity consent where consent.clientId = :clientId))"), +}) +@Entity +@Table(name="USER_CONSENT_PROT_MAPPER") +@IdClass(UserConsentProtocolMapperEntity.Key.class) +public class UserConsentProtocolMapperEntity { + + @Id + @ManyToOne(fetch= FetchType.LAZY) + @JoinColumn(name = "USER_CONSENT_ID") + protected UserConsentEntity userConsent; + + @Id + @Column(name="PROTOCOL_MAPPER_ID") + protected String protocolMapperId; + + public UserConsentEntity getUserConsent() { + return userConsent; + } + + public void setUserConsent(UserConsentEntity userConsent) { + this.userConsent = userConsent; + } + + public String getProtocolMapperId() { + return protocolMapperId; + } + + public void setProtocolMapperId(String protocolMapperId) { + this.protocolMapperId = protocolMapperId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + UserConsentProtocolMapperEntity that = (UserConsentProtocolMapperEntity)o; + Key myKey = new Key(this.userConsent, this.protocolMapperId); + Key hisKey = new Key(that.userConsent, that.protocolMapperId); + return myKey.equals(hisKey); + } + + @Override + public int hashCode() { + Key myKey = new Key(this.userConsent, this.protocolMapperId); + return myKey.hashCode(); + } + + public static class Key implements Serializable { + + protected UserConsentEntity userConsent; + + protected String protocolMapperId; + + public Key() { + } + + public Key(UserConsentEntity userConsent, String protocolMapperId) { + this.userConsent = userConsent; + this.protocolMapperId = protocolMapperId; + } + + public UserConsentEntity getUserConsent() { + return userConsent; + } + + public String getProtocolMapperId() { + return protocolMapperId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Key key = (Key) o; + + if (userConsent != null ? !userConsent.getId().equals(key.userConsent != null ? key.userConsent.getId() : null) : key.userConsent != null) return false; + if (protocolMapperId != null ? !protocolMapperId.equals(key.protocolMapperId) : key.protocolMapperId != null) return false; + + return true; + } + + @Override + public int hashCode() { + int result = userConsent != null ? userConsent.getId().hashCode() : 0; + result = 31 * result + (protocolMapperId != null ? protocolMapperId.hashCode() : 0); + return result; + } + } +} diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentRoleEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentRoleEntity.java new file mode 100644 index 0000000000..b8d1a8de51 --- /dev/null +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserConsentRoleEntity.java @@ -0,0 +1,115 @@ +package org.keycloak.models.jpa.entities; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.Table; + +/** + * @author Marek Posolda + */ +@NamedQueries({ + @NamedQuery(name="deleteUserConsentRolesByRealm", query="delete from UserConsentRoleEntity grantedRole where grantedRole.userConsent IN (select consent from UserConsentEntity consent where consent.user IN (select user from UserEntity user where user.realmId = :realmId))"), + @NamedQuery(name="deleteUserConsentRolesByUser", query="delete from UserConsentRoleEntity grantedRole where grantedRole.userConsent IN (select consent from UserConsentEntity consent where consent.user = :user)"), + @NamedQuery(name="deleteUserConsentRolesByRole", query="delete from UserConsentRoleEntity grantedRole where grantedRole.roleId = :roleId)"), + @NamedQuery(name="deleteUserConsentRolesByClient", query="delete from UserConsentRoleEntity grantedRole where grantedRole.userConsent IN (select consent from UserConsentEntity consent where consent.clientId = :clientId)"), +}) +@Entity +@Table(name="USER_CONSENT_ROLE") +@IdClass(UserConsentRoleEntity.Key.class) +public class UserConsentRoleEntity { + + @Id + @ManyToOne(fetch= FetchType.LAZY) + @JoinColumn(name = "USER_CONSENT_ID") + protected UserConsentEntity userConsent; + + @Id + @Column(name="ROLE_ID") + protected String roleId; + + public UserConsentEntity getUserConsent() { + return userConsent; + } + + public void setUserConsent(UserConsentEntity userConsent) { + this.userConsent = userConsent; + } + + public String getRoleId() { + return roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + UserConsentRoleEntity that = (UserConsentRoleEntity)o; + Key myKey = new Key(this.userConsent, this.roleId); + Key hisKey = new Key(that.userConsent, that.roleId); + return myKey.equals(hisKey); + } + + @Override + public int hashCode() { + Key myKey = new Key(this.userConsent, this.roleId); + return myKey.hashCode(); + } + + public static class Key implements Serializable { + + protected UserConsentEntity userConsent; + + protected String roleId; + + public Key() { + } + + public Key(UserConsentEntity userConsent, String roleId) { + this.userConsent = userConsent; + this.roleId = roleId; + } + + public UserConsentEntity getUserConsent() { + return userConsent; + } + + public String getRoleId() { + return roleId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Key key = (Key) o; + + if (userConsent != null ? !userConsent.getId().equals(key.userConsent != null ? key.userConsent.getId() : null) : key.userConsent != null) return false; + if (roleId != null ? !roleId.equals(key.roleId) : key.roleId != null) return false; + + return true; + } + + @Override + public int hashCode() { + int result = userConsent != null ? userConsent.getId().hashCode() : 0; + result = 31 * result + (roleId != null ? roleId.hashCode() : 0); + return result; + } + } + +} diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProvider.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProvider.java index f71c79779b..83bc85ccba 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProvider.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProvider.java @@ -17,6 +17,7 @@ import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserProvider; import org.keycloak.models.entities.FederatedIdentityEntity; +import org.keycloak.models.mongo.keycloak.entities.MongoUserConsentEntity; import org.keycloak.models.mongo.keycloak.entities.MongoUserEntity; import org.keycloak.models.utils.CredentialValidation; @@ -43,7 +44,6 @@ public class MongoUserProvider implements UserProvider { @Override public void close() { - // TODO } @Override @@ -274,11 +274,7 @@ public class MongoUserProvider implements UserProvider { @Override public boolean removeUser(RealmModel realm, UserModel user) { - DBObject query = new QueryBuilder() - .and("_id").is(user.getId()) - .and("realmId").is(realm.getId()) - .get(); - return getMongoStore().removeEntities(MongoUserEntity.class, query, invocationContext); + return getMongoStore().removeEntity(MongoUserEntity.class, user.getId(), invocationContext); } @@ -339,32 +335,60 @@ public class MongoUserProvider implements UserProvider { DBObject query = new QueryBuilder() .and("realmId").is(realm.getId()) .get(); - getMongoStore().removeEntities(MongoUserEntity.class, query, invocationContext); + getMongoStore().removeEntities(MongoUserEntity.class, query, true, invocationContext); } @Override public void preRemove(RealmModel realm, UserFederationProviderModel link) { + // Remove all users linked with federationProvider and their consents DBObject query = new QueryBuilder() .and("realmId").is(realm.getId()) .and("federationLink").is(link.getId()) .get(); - getMongoStore().removeEntities(MongoUserEntity.class, query, invocationContext); + getMongoStore().removeEntities(MongoUserEntity.class, query, true, invocationContext); } @Override public void preRemove(RealmModel realm, ClientModel client) { - // TODO + // Remove all role mappings and consents mapped to all roles of this client + for (RoleModel role : client.getRoles()) { + preRemove(realm, role); + } + + // Finally remove all consents of this client + DBObject query = new QueryBuilder() + .and("clientId").is(client.getId()) + .get(); + getMongoStore().removeEntities(MongoUserConsentEntity.class, query, false, invocationContext); } @Override public void preRemove(ClientModel client, ProtocolMapperModel protocolMapper) { - // TODO + // Remove this protocol mapper from all consents, which has it + DBObject query = new QueryBuilder() + .and("grantedProtocolMappers").is(protocolMapper.getId()) + .get(); + DBObject pull = new BasicDBObject("$pull", query); + getMongoStore().updateEntities(MongoUserEntity.class, query, pull, invocationContext); } @Override public void preRemove(RealmModel realm, RoleModel role) { - // todo not sure what to do for this + // Remove this role from all users, which has it + DBObject query = new QueryBuilder() + .and("roleIds").is(role.getId()) + .get(); + + DBObject pull = new BasicDBObject("$pull", query); + getMongoStore().updateEntities(MongoUserEntity.class, query, pull, invocationContext); + + // Remove this role from all consents, which has it + query = new QueryBuilder() + .and("grantedRoles").is(role.getId()) + .get(); + pull = new BasicDBObject("$pull", query); + getMongoStore().updateEntities(MongoUserConsentEntity.class, query, pull, invocationContext); } @Override diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/UserAdapter.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/UserAdapter.java index 5fa3e52fa5..752f3007c0 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/UserAdapter.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/UserAdapter.java @@ -2,10 +2,15 @@ package org.keycloak.models.mongo.keycloak.adapters; import static org.keycloak.models.utils.Pbkdf2PasswordEncoder.getSalt; +import com.mongodb.DBObject; +import com.mongodb.QueryBuilder; import org.keycloak.connections.mongo.api.context.MongoStoreInvocationContext; import org.keycloak.models.ClientModel; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.ProtocolMapperModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.ModelDuplicateException; +import org.keycloak.models.ModelException; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; @@ -13,7 +18,9 @@ import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserCredentialValueModel; import org.keycloak.models.UserModel; import org.keycloak.models.entities.CredentialEntity; +import org.keycloak.models.entities.UserConsentEntity; import org.keycloak.models.mongo.keycloak.entities.MongoRoleEntity; +import org.keycloak.models.mongo.keycloak.entities.MongoUserConsentEntity; import org.keycloak.models.mongo.keycloak.entities.MongoUserEntity; import org.keycloak.models.mongo.utils.MongoModelUtils; import org.keycloak.models.utils.Pbkdf2PasswordEncoder; @@ -22,9 +29,9 @@ import org.keycloak.util.Time; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; -import java.util.Date; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -360,30 +367,18 @@ public class UserAdapter extends AbstractMongoAdapter implement @Override public Set getRoleMappings() { - Set result = new HashSet(); - List roles = MongoModelUtils.getAllRolesOfUser(this, invocationContext); - - for (MongoRoleEntity role : roles) { - if (realm.getId().equals(role.getRealmId())) { - result.add(new RoleAdapter(session, realm, role, realm, invocationContext)); - } else { - // Likely applicationRole, but we don't have this application yet - result.add(new RoleAdapter(session, realm, role, invocationContext)); - } - } - return result; + List roles = MongoModelUtils.getAllRolesOfUser(realm, this); + return new HashSet(roles); } @Override public Set getRealmRoleMappings() { Set allRoles = getRoleMappings(); - // Filter to retrieve just realm roles TODO: Maybe improve to avoid filter programmatically... Maybe have separate fields for realmRoles and appRoles on user? + // Filter to retrieve just realm roles Set realmRoles = new HashSet(); for (RoleModel role : allRoles) { - MongoRoleEntity roleEntity = ((RoleAdapter) role).getRole(); - - if (realm.getId().equals(roleEntity.getRealmId())) { + if (role.getContainer() instanceof RealmModel) { realmRoles.add(role); } } @@ -400,11 +395,11 @@ public class UserAdapter extends AbstractMongoAdapter implement @Override public Set getClientRoleMappings(ClientModel app) { Set result = new HashSet(); - List roles = MongoModelUtils.getAllRolesOfUser(this, invocationContext); + List roles = MongoModelUtils.getAllRolesOfUser(realm, this); - for (MongoRoleEntity role : roles) { - if (app.getId().equals(role.getClientId())) { - result.add(new RoleAdapter(session, realm, role, app, invocationContext)); + for (RoleModel role : roles) { + if (app.equals(role.getContainer())) { + result.add(role); } } return result; @@ -422,32 +417,96 @@ public class UserAdapter extends AbstractMongoAdapter implement } @Override - public GrantedConsentModel addGrantedConsent(GrantedConsentModel consent) { - // TODO - return null; + public void addGrantedConsent(UserConsentModel consent) { + String clientId = consent.getClient().getId(); + if (getConsentEntityByClientId(clientId) != null) { + throw new ModelDuplicateException("Consent already exists for client [" + clientId + "] and user [" + user.getId() + "]"); + } + + MongoUserConsentEntity consentEntity = new MongoUserConsentEntity(); + consentEntity.setUserId(getId()); + consentEntity.setClientId(clientId); + fillEntityFromModel(consent, consentEntity); + getMongoStore().insertEntity(consentEntity, invocationContext); } @Override - public GrantedConsentModel getGrantedConsentByClient(String clientId) { - // TODO - return null; + public UserConsentModel getGrantedConsentByClient(String clientId) { + UserConsentEntity consentEntity = getConsentEntityByClientId(clientId); + return consentEntity!=null ? toConsentModel(consentEntity) : null; } @Override - public List getGrantedConsents() { - // TODO - return null; + public List getGrantedConsents() { + List result = new ArrayList(); + + DBObject query = new QueryBuilder() + .and("userId").is(getId()) + .get(); + List grantedConsents = getMongoStore().loadEntities(MongoUserConsentEntity.class, query, invocationContext); + + for (UserConsentEntity consentEntity : grantedConsents) { + UserConsentModel model = toConsentModel(consentEntity); + result.add(model); + } + + return result; + } + + private MongoUserConsentEntity getConsentEntityByClientId(String clientId) { + DBObject query = new QueryBuilder() + .and("userId").is(getId()) + .and("clientId").is(clientId) + .get(); + return getMongoStore().loadSingleEntity(MongoUserConsentEntity.class, query, invocationContext); + } + + private UserConsentModel toConsentModel(UserConsentEntity entity) { + UserConsentModel model = new UserConsentModel(realm, entity.getClientId()); + for (String roleId : entity.getGrantedRoles()) { + model.addGrantedRole(roleId); + } + for (String protMapperId : entity.getGrantedProtocolMappers()) { + model.addGrantedProtocolMapper(protMapperId); + } + return model; + } + + // Fill roles and protocolMappers to entity + private void fillEntityFromModel(UserConsentModel consent, MongoUserConsentEntity consentEntity) { + List roleIds = new LinkedList(); + for (RoleModel role : consent.getGrantedRoles()) { + roleIds.add(role.getId()); + } + consentEntity.setGrantedRoles(roleIds); + + List protMapperIds = new LinkedList(); + for (ProtocolMapperModel protMapperModel : consent.getGrantedProtocolMappers()) { + protMapperIds.add(protMapperModel.getId()); + } + consentEntity.setGrantedProtocolMappers(protMapperIds); } @Override - public void updateGrantedConsent(GrantedConsentModel consent) { - // TODO + public void updateGrantedConsent(UserConsentModel consent) { + String clientId = consent.getClient().getId(); + MongoUserConsentEntity consentEntity = getConsentEntityByClientId(clientId); + if (consentEntity == null) { + throw new ModelException("Consent not found for client [" + clientId + "] and user [" + user.getId() + "]"); + } else { + fillEntityFromModel(consent, consentEntity); + getMongoStore().updateEntity(consentEntity, invocationContext); + } } @Override public boolean revokeGrantedConsentForClient(String clientId) { - // TODO - return false; + MongoUserConsentEntity entity = getConsentEntityByClientId(clientId); + if (entity == null) { + return false; + } + + return getMongoStore().removeEntity(entity, invocationContext); } @Override diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoClientEntity.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoClientEntity.java index cc97d5d992..8c1271563c 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoClientEntity.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoClientEntity.java @@ -19,6 +19,6 @@ public class MongoClientEntity extends ClientEntity implements MongoIdentifiable DBObject query = new QueryBuilder() .and("clientId").is(getId()) .get(); - context.getMongoStore().removeEntities(MongoRoleEntity.class, query, context); + context.getMongoStore().removeEntities(MongoRoleEntity.class, query, true, context); } } diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoRealmEntity.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoRealmEntity.java index 22097514fb..a64c2b5e67 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoRealmEntity.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoRealmEntity.java @@ -19,13 +19,10 @@ public class MongoRealmEntity extends RealmEntity implements MongoIdentifiableEn .and("realmId").is(getId()) .get(); - // Remove all users of this realm - context.getMongoStore().removeEntities(MongoUserEntity.class, query, context); - // Remove all roles of this realm - context.getMongoStore().removeEntities(MongoRoleEntity.class, query, context); + context.getMongoStore().removeEntities(MongoRoleEntity.class, query, true, context); - // Remove all applications of this realm - context.getMongoStore().removeEntities(MongoClientEntity.class, query, context); + // Remove all clients of this realm + context.getMongoStore().removeEntities(MongoClientEntity.class, query, true, context); } } diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoRoleEntity.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoRoleEntity.java index dc820c25f8..20210691d8 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoRoleEntity.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoRoleEntity.java @@ -41,26 +41,15 @@ public class MongoRoleEntity extends RoleEntity implements MongoIdentifiableEnti public void afterRemove(MongoStoreInvocationContext invContext) { MongoStore mongoStore = invContext.getMongoStore(); - // Remove this role from all users, which has it + // Remove this scope from all clients, which has it DBObject query = new QueryBuilder() - .and("roleIds").is(getId()) - .get(); - - List users = mongoStore.loadEntities(MongoUserEntity.class, query, invContext); - for (MongoUserEntity user : users) { - //logger.info("Removing role " + getName() + " from user " + user.getUsername()); - mongoStore.pullItemFromList(user, "roleIds", getId(), invContext); - } - - // Remove this scope from all users, which has it - query = new QueryBuilder() .and("scopeIds").is(getId()) .get(); - users = mongoStore.loadEntities(MongoUserEntity.class, query, invContext); - for (MongoUserEntity user : users) { + List clients = mongoStore.loadEntities(MongoClientEntity.class, query, invContext); + for (MongoClientEntity client : clients) { //logger.info("Removing scope " + getName() + " from user " + user.getUsername()); - mongoStore.pullItemFromList(user, "scopeIds", getId(), invContext); + mongoStore.pullItemFromList(client, "scopeIds", getId(), invContext); } // Remove defaultRoles from realm diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoUserConsentEntity.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoUserConsentEntity.java new file mode 100644 index 0000000000..16e0026831 --- /dev/null +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoUserConsentEntity.java @@ -0,0 +1,17 @@ +package org.keycloak.models.mongo.keycloak.entities; + +import org.keycloak.connections.mongo.api.MongoCollection; +import org.keycloak.connections.mongo.api.MongoIdentifiableEntity; +import org.keycloak.connections.mongo.api.context.MongoStoreInvocationContext; +import org.keycloak.models.entities.UserConsentEntity; + +/** + * @author Marek Posolda + */ +@MongoCollection(collectionName = "userConsents") +public class MongoUserConsentEntity extends UserConsentEntity implements MongoIdentifiableEntity { + + @Override + public void afterRemove(MongoStoreInvocationContext invocationContext) { + } +} diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoUserEntity.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoUserEntity.java index c9f317e50d..d1700d88ad 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoUserEntity.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/entities/MongoUserEntity.java @@ -1,5 +1,7 @@ package org.keycloak.models.mongo.keycloak.entities; +import com.mongodb.DBObject; +import com.mongodb.QueryBuilder; import org.keycloak.connections.mongo.api.MongoCollection; import org.keycloak.connections.mongo.api.MongoIdentifiableEntity; import org.keycloak.connections.mongo.api.context.MongoStoreInvocationContext; @@ -19,6 +21,12 @@ public class MongoUserEntity extends UserEntity implements MongoIdentifiableEnti } @Override - public void afterRemove(MongoStoreInvocationContext invocationContext) { + public void afterRemove(MongoStoreInvocationContext context) { + // Remove all consents of this user + DBObject query = new QueryBuilder() + .and("userId").is(getId()) + .get(); + + context.getMongoStore().removeEntities(MongoUserConsentEntity.class, query, true, context); } } diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/utils/MongoModelUtils.java b/model/mongo/src/main/java/org/keycloak/models/mongo/utils/MongoModelUtils.java index 48828deecb..02923cfc4f 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/utils/MongoModelUtils.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/utils/MongoModelUtils.java @@ -4,6 +4,8 @@ import com.mongodb.DBObject; import com.mongodb.QueryBuilder; import org.keycloak.connections.mongo.api.context.MongoStoreInvocationContext; import org.keycloak.models.ClientModel; +import org.keycloak.models.RealmModel; +import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; import org.keycloak.models.entities.ClientEntity; import org.keycloak.models.mongo.keycloak.adapters.ClientAdapter; @@ -12,6 +14,7 @@ import org.keycloak.models.mongo.keycloak.entities.MongoRoleEntity; import org.keycloak.models.mongo.keycloak.entities.MongoUserEntity; import java.util.Collections; +import java.util.LinkedList; import java.util.List; /** @@ -20,18 +23,22 @@ import java.util.List; public class MongoModelUtils { // Get everything including both application and realm roles - public static List getAllRolesOfUser(UserModel user, MongoStoreInvocationContext invContext) { + public static List getAllRolesOfUser(RealmModel realm, UserModel user) { MongoUserEntity userEntity = ((UserAdapter)user).getUser(); List roleIds = userEntity.getRoleIds(); if (roleIds == null || roleIds.isEmpty()) { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } - DBObject query = new QueryBuilder() - .and("_id").in(roleIds) - .get(); - return invContext.getMongoStore().loadEntities(MongoRoleEntity.class, query, invContext); + List roles = new LinkedList(); + for (String roleId : roleIds) { + RoleModel role = realm.getRoleById(roleId); + if (role != null) { + roles.add(role); + } + } + return roles; } // Get everything including both application and realm scopes @@ -40,7 +47,7 @@ public class MongoModelUtils { List scopeIds = scopedEntity.getScopeIds(); if (scopeIds == null || scopeIds.isEmpty()) { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } DBObject query = new QueryBuilder() diff --git a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/MongoUserSessionProvider.java b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/MongoUserSessionProvider.java index 0bc584940f..848fdeb267 100755 --- a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/MongoUserSessionProvider.java +++ b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/MongoUserSessionProvider.java @@ -194,18 +194,14 @@ public class MongoUserSessionProvider implements UserSessionProvider { @Override public void removeUserSessions(RealmModel realm, UserModel user) { DBObject query = new BasicDBObject("user", user.getId()); - mongoStore.removeEntities(MongoUserSessionEntity.class, query, invocationContext); + mongoStore.removeEntities(MongoUserSessionEntity.class, query, true, invocationContext); } @Override public void removeUserSessions(RealmModel realm) { DBObject query = new BasicDBObject("realmId", realm.getId()); - mongoStore.removeEntities(MongoUserSessionEntity.class, query, invocationContext); - query = new QueryBuilder() - .and("realmId").is(realm.getId()) - .get(); - - mongoStore.removeEntities(MongoClientSessionEntity.class, query, invocationContext); + mongoStore.removeEntities(MongoUserSessionEntity.class, query, false, invocationContext); + mongoStore.removeEntities(MongoClientSessionEntity.class, query, false, invocationContext); } @Override @@ -216,20 +212,20 @@ public class MongoUserSessionProvider implements UserSessionProvider { .and("started").lessThan(currentTime - realm.getSsoSessionMaxLifespan()) .get(); - mongoStore.removeEntities(MongoUserSessionEntity.class, query, invocationContext); + mongoStore.removeEntities(MongoUserSessionEntity.class, query, true, invocationContext); query = new QueryBuilder() .and("realmId").is(realm.getId()) .and("lastSessionRefresh").lessThan(currentTime - realm.getSsoSessionIdleTimeout()) .get(); - mongoStore.removeEntities(MongoUserSessionEntity.class, query, invocationContext); + mongoStore.removeEntities(MongoUserSessionEntity.class, query, true, invocationContext); query = new QueryBuilder() .and("sessionId").is(null) .and("realmId").is(realm.getId()) .and("timestamp").lessThan(currentTime - RealmInfoUtil.getDettachedClientSessionLifespan(realm)) .get(); - mongoStore.removeEntities(MongoClientSessionEntity.class, query, invocationContext); + mongoStore.removeEntities(MongoClientSessionEntity.class, query, false, invocationContext); } @Override @@ -291,7 +287,7 @@ public class MongoUserSessionProvider implements UserSessionProvider { .or(new BasicDBObject("username", user.getUsername()), new BasicDBObject("username", user.getEmail())) .and("realmId").is(realm.getId()) .get(); - mongoStore.removeEntities(MongoUsernameLoginFailureEntity.class, query, invocationContext); + mongoStore.removeEntities(MongoUsernameLoginFailureEntity.class, query, true, invocationContext); } @Override diff --git a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoUserSessionEntity.java b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoUserSessionEntity.java index 5b7e8d3bea..0c637db12f 100755 --- a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoUserSessionEntity.java +++ b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoUserSessionEntity.java @@ -121,7 +121,7 @@ public class MongoUserSessionEntity extends AbstractIdentifiableEntity implement DBObject query = new QueryBuilder() .and("sessionId").is(getId()) .get(); - context.getMongoStore().removeEntities(MongoClientSessionEntity.class, query, context); + context.getMongoStore().removeEntities(MongoClientSessionEntity.class, query, true, context); } public Map getNotes() { diff --git a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java index 4814f306fd..ee75c4314c 100755 --- a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java +++ b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java @@ -14,7 +14,7 @@ import org.keycloak.jose.jws.JWSBuilder; import org.keycloak.login.LoginFormsProvider; import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionModel; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RealmModel; @@ -420,14 +420,14 @@ public class AuthenticationManager { if (client.isConsentRequired()) { accessCode.setAction(ClientSessionModel.Action.OAUTH_GRANT); - GrantedConsentModel grantedConsent = user.getGrantedConsentByClient(client.getId()); + UserConsentModel grantedConsent = user.getGrantedConsentByClient(client.getId()); List realmRoles = new LinkedList(); MultivaluedMap resourceRoles = new MultivaluedMapImpl(); for (RoleModel r : accessCode.getRequestedRoles()) { // Consent already granted by user - if (grantedConsent != null && grantedConsent.getGrantedRoles().contains(r.getId())) { + if (grantedConsent != null && grantedConsent.isRoleGranted(r)) { continue; } @@ -439,10 +439,10 @@ public class AuthenticationManager { } List protocolMappers = new LinkedList(); - for (ProtocolMapperModel model : client.getProtocolMappers()) { - if (model.isConsentRequired() && model.getProtocol().equals(clientSession.getAuthMethod()) && model.getConsentText() != null) { - if (grantedConsent == null || !grantedConsent.getGrantedProtocolMappers().contains(model.getId())) { - protocolMappers.add(model); + for (ProtocolMapperModel protocolMapper : client.getProtocolMappers()) { + if (protocolMapper.isConsentRequired() && protocolMapper.getProtocol().equals(clientSession.getAuthMethod()) && protocolMapper.getConsentText() != null) { + if (grantedConsent == null || !grantedConsent.isProtocolMapperGranted(protocolMapper)) { + protocolMappers.add(protocolMapper); } } } diff --git a/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java b/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java index a0eb4dce5c..02ac98e2b5 100755 --- a/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java +++ b/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java @@ -34,7 +34,7 @@ import org.keycloak.jose.jws.JWSBuilder; import org.keycloak.login.LoginFormsProvider; import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionModel; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.ModelException; import org.keycloak.models.ProtocolMapperModel; @@ -609,9 +609,10 @@ public class LoginActionsService { return protocol.consentDenied(clientSession); } - GrantedConsentModel grantedConsent = user.getGrantedConsentByClient(client.getId()); + UserConsentModel grantedConsent = user.getGrantedConsentByClient(client.getId()); if (grantedConsent == null) { - grantedConsent = user.addGrantedConsent(new GrantedConsentModel(client.getId())); + grantedConsent = new UserConsentModel(realm, client.getId()); + user.addGrantedConsent(grantedConsent); } for (String roleId : clientSession.getRoles()) { grantedConsent.addGrantedRole(roleId); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AdapterTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AdapterTest.java index 0e48914430..f7f48b3a74 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AdapterTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AdapterTest.java @@ -258,6 +258,7 @@ public class AdapterTest extends AbstractModelTest { commit(); realmModel = model.getRealm("JUGGLER"); app = realmModel.getClientByClientId("test-app"); + user = realmManager.getSession().users().getUserByUsername("bburke", realmModel); Assert.assertTrue(realmModel.removeRoleById(realmRole.getId())); Assert.assertFalse(realmModel.removeRoleById(realmRole.getId())); @@ -266,6 +267,9 @@ public class AdapterTest extends AbstractModelTest { Assert.assertTrue(realmModel.removeRoleById(appRole.getId())); Assert.assertFalse(realmModel.removeRoleById(appRole.getId())); assertNull(app.getRole(appRole.getName())); + + user = realmManager.getSession().users().getUserByUsername("bburke", realmModel); + } @Test diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/GrantedConsentModelTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserConsentModelTest.java similarity index 76% rename from testsuite/integration/src/test/java/org/keycloak/testsuite/model/GrantedConsentModelTest.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserConsentModelTest.java index 5c555b7690..bdc068ba19 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/GrantedConsentModelTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserConsentModelTest.java @@ -1,13 +1,12 @@ package org.keycloak.testsuite.model; import java.util.List; -import java.util.Map; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.keycloak.models.ClientModel; -import org.keycloak.models.GrantedConsentModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.ModelException; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RealmModel; @@ -20,7 +19,7 @@ import org.keycloak.protocol.oidc.mappers.UserPropertyMapper; /** * @author Marek Posolda */ -public class GrantedConsentModelTest extends AbstractModelTest { +public class UserConsentModelTest extends AbstractModelTest { @Before public void setupEnv() { @@ -47,13 +46,13 @@ public class GrantedConsentModelTest extends AbstractModelTest { UserModel john = session.users().addUser(realm, "john"); UserModel mary = session.users().addUser(realm, "mary"); - GrantedConsentModel johnFooGrant = new GrantedConsentModel(fooClient.getId()); + UserConsentModel johnFooGrant = new UserConsentModel(realm, fooClient.getId()); johnFooGrant.addGrantedRole(realmRole.getId()); johnFooGrant.addGrantedRole(barClientRole.getId()); johnFooGrant.addGrantedProtocolMapper(fooMapper.getId()); john.addGrantedConsent(johnFooGrant); - GrantedConsentModel johnBarGrant = new GrantedConsentModel(barClient.getId()); + UserConsentModel johnBarGrant = new UserConsentModel(realm, barClient.getId()); johnBarGrant.addGrantedProtocolMapper(barMapper.getId()); johnBarGrant.addGrantedRole(realmRole.getId()); @@ -66,7 +65,7 @@ public class GrantedConsentModelTest extends AbstractModelTest { john.addGrantedConsent(johnBarGrant); - GrantedConsentModel maryFooGrant = new GrantedConsentModel(fooClient.getId()); + UserConsentModel maryFooGrant = new UserConsentModel(realm, fooClient.getId()); maryFooGrant.addGrantedRole(realmRole.getId()); maryFooGrant.addGrantedProtocolMapper(fooMapper.getId()); mary.addGrantedConsent(maryFooGrant); @@ -77,27 +76,26 @@ public class GrantedConsentModelTest extends AbstractModelTest { @Test public void basicConsentTest() { RealmModel realm = realmManager.getRealm("original"); - Map clients = realm.getClientNameMap(); - ClientModel fooClient = clients.get("foo-client"); - ClientModel barClient = clients.get("bar-client"); + ClientModel fooClient = realm.getClientByClientId("foo-client"); + ClientModel barClient = realm.getClientByClientId("bar-client"); UserModel john = session.users().getUserByUsername("john", realm); UserModel mary = session.users().getUserByUsername("mary", realm); - GrantedConsentModel johnFooConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnFooConsent = john.getGrantedConsentByClient(fooClient.getId()); Assert.assertEquals(johnFooConsent.getGrantedRoles().size(), 2); Assert.assertEquals(johnFooConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", johnFooConsent)); Assert.assertTrue(isRoleGranted(barClient, "bar-client-role", johnFooConsent)); Assert.assertTrue(isMapperGranted(fooClient, "foo", johnFooConsent)); - GrantedConsentModel johnBarConsent = john.getGrantedConsentByClient(barClient.getId()); + UserConsentModel johnBarConsent = john.getGrantedConsentByClient(barClient.getId()); Assert.assertEquals(johnBarConsent.getGrantedRoles().size(), 1); Assert.assertEquals(johnBarConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", johnBarConsent)); Assert.assertTrue(isMapperGranted(barClient, "bar", johnBarConsent)); - GrantedConsentModel maryConsent = mary.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel maryConsent = mary.getGrantedConsentByClient(fooClient.getId()); Assert.assertEquals(maryConsent.getGrantedRoles().size(), 1); Assert.assertEquals(maryConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", maryConsent)); @@ -110,19 +108,18 @@ public class GrantedConsentModelTest extends AbstractModelTest { @Test public void getAllConsentTest() { RealmModel realm = realmManager.getRealm("original"); - Map clients = realm.getClientNameMap(); - ClientModel fooClient = clients.get("foo-client"); + ClientModel fooClient = realm.getClientByClientId("foo-client"); UserModel john = session.users().getUserByUsername("john", realm); UserModel mary = session.users().getUserByUsername("mary", realm); - List johnConsents = john.getGrantedConsents(); + List johnConsents = john.getGrantedConsents(); Assert.assertEquals(2, johnConsents.size()); - List maryConsents = mary.getGrantedConsents(); + List maryConsents = mary.getGrantedConsents(); Assert.assertEquals(1, maryConsents.size()); - GrantedConsentModel maryConsent = maryConsents.get(0); - Assert.assertEquals(maryConsent.getClientId(), fooClient.getId()); + UserConsentModel maryConsent = maryConsents.get(0); + Assert.assertEquals(maryConsent.getClient().getId(), fooClient.getId()); Assert.assertEquals(maryConsent.getGrantedRoles().size(), 1); Assert.assertEquals(maryConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", maryConsent)); @@ -132,18 +129,18 @@ public class GrantedConsentModelTest extends AbstractModelTest { @Test public void updateWithRoleRemovalTest() { RealmModel realm = realmManager.getRealm("original"); - ClientModel fooClient = realm.getClientNameMap().get("foo-client"); + ClientModel fooClient = realm.getClientByClientId("foo-client"); UserModel john = session.users().getUserByUsername("john", realm); - GrantedConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); // Remove foo protocol mapper from johnConsent ProtocolMapperModel protMapperModel = fooClient.getProtocolMapperByName(OIDCLoginProtocol.LOGIN_PROTOCOL, "foo"); - johnConsent.getGrantedProtocolMappers().remove(protMapperModel.getId()); + johnConsent.getGrantedProtocolMappers().remove(protMapperModel); // Remove realm-role and add new-realm-role to johnConsent RoleModel realmRole = realm.getRole("realm-role"); - johnConsent.getGrantedRoles().remove(realmRole.getId()); + johnConsent.getGrantedRoles().remove(realmRole); RoleModel newRealmRole = realm.addRole("new-realm-role"); johnConsent.addGrantedRole(newRealmRole.getId()); @@ -153,7 +150,7 @@ public class GrantedConsentModelTest extends AbstractModelTest { commit(); realm = realmManager.getRealm("original"); - fooClient = realm.getClientNameMap().get("foo-client"); + fooClient = realm.getClientByClientId("foo-client"); john = session.users().getUserByUsername("john", realm); johnConsent = john.getGrantedConsentByClient(fooClient.getId()); @@ -167,7 +164,7 @@ public class GrantedConsentModelTest extends AbstractModelTest { @Test public void revokeTest() { RealmModel realm = realmManager.getRealm("original"); - ClientModel fooClient = realm.getClientNameMap().get("foo-client"); + ClientModel fooClient = realm.getClientByClientId("foo-client"); UserModel john = session.users().getUserByUsername("john", realm); john.revokeGrantedConsentForClient(fooClient.getId()); @@ -190,62 +187,57 @@ public class GrantedConsentModelTest extends AbstractModelTest { @Test public void deleteProtocolMapperTest() { RealmModel realm = realmManager.getRealm("original"); - ClientModel fooClient = realm.getClientNameMap().get("foo-client"); + ClientModel fooClient = realm.getClientByClientId("foo-client"); ProtocolMapperModel fooMapper = fooClient.getProtocolMapperByName(OIDCLoginProtocol.LOGIN_PROTOCOL, "foo"); - String fooMapperId = fooMapper.getId(); fooClient.removeProtocolMapper(fooMapper); commit(); realm = realmManager.getRealm("original"); - fooClient = realm.getClientNameMap().get("foo-client"); + fooClient = realm.getClientByClientId("foo-client"); UserModel john = session.users().getUserByUsername("john", realm); - GrantedConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); Assert.assertEquals(johnConsent.getGrantedRoles().size(), 2); Assert.assertEquals(johnConsent.getGrantedProtocolMappers().size(), 0); - Assert.assertFalse(johnConsent.isProtocolMapperGranted(fooMapperId)); + Assert.assertFalse(johnConsent.isProtocolMapperGranted(fooMapper)); } @Test public void deleteRoleTest() { RealmModel realm = realmManager.getRealm("original"); RoleModel realmRole = realm.getRole("realm-role"); - String realmRoleId = realmRole.getId(); realm.removeRole(realmRole); commit(); realm = realmManager.getRealm("original"); - Map clients = realm.getClientNameMap(); - ClientModel fooClient = clients.get("foo-client"); - ClientModel barClient = clients.get("bar-client"); + ClientModel fooClient = realm.getClientByClientId("foo-client"); + ClientModel barClient = realm.getClientByClientId("bar-client"); UserModel john = session.users().getUserByUsername("john", realm); - GrantedConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); Assert.assertEquals(johnConsent.getGrantedRoles().size(), 1); Assert.assertEquals(johnConsent.getGrantedProtocolMappers().size(), 1); - Assert.assertFalse(johnConsent.isRoleGranted(realmRoleId)); + Assert.assertFalse(johnConsent.isRoleGranted(realmRole)); Assert.assertTrue(isRoleGranted(barClient, "bar-client-role", johnConsent)); } @Test public void deleteClientTest() { RealmModel realm = realmManager.getRealm("original"); - Map clients = realm.getClientNameMap(); - ClientModel barClient = clients.get("bar-client"); + ClientModel barClient = realm.getClientByClientId("bar-client"); realm.removeClient(barClient.getId()); commit(); realm = realmManager.getRealm("original"); - clients = realm.getClientNameMap(); - ClientModel fooClient = clients.get("foo-client"); - Assert.assertNull(clients.get("bar-client")); + ClientModel fooClient = realm.getClientByClientId("foo-client"); + Assert.assertNull(realm.getClientByClientId("bar-client")); UserModel john = session.users().getUserByUsername("john", realm); - GrantedConsentModel johnFooConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnFooConsent = john.getGrantedConsentByClient(fooClient.getId()); Assert.assertEquals(johnFooConsent.getGrantedRoles().size(), 1); Assert.assertEquals(johnFooConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", johnFooConsent)); @@ -254,13 +246,13 @@ public class GrantedConsentModelTest extends AbstractModelTest { Assert.assertNull(john.getGrantedConsentByClient(barClient.getId())); } - private boolean isRoleGranted(RoleContainerModel roleContainer, String roleName, GrantedConsentModel consentModel) { + private boolean isRoleGranted(RoleContainerModel roleContainer, String roleName, UserConsentModel consentModel) { RoleModel role = roleContainer.getRole(roleName); - return consentModel.isRoleGranted(role.getId()); + return consentModel.isRoleGranted(role); } - private boolean isMapperGranted(ClientModel client, String protocolMapperName, GrantedConsentModel consentModel) { + private boolean isMapperGranted(ClientModel client, String protocolMapperName, UserConsentModel consentModel) { ProtocolMapperModel protocolMapper = client.getProtocolMapperByName(OIDCLoginProtocol.LOGIN_PROTOCOL, protocolMapperName); - return consentModel.isProtocolMapperGranted(protocolMapper.getId()); + return consentModel.isProtocolMapperGranted(protocolMapper); } } From 34e033e351e6cea207fc1851d7d5404f58cda341 Mon Sep 17 00:00:00 2001 From: mposolda Date: Wed, 22 Apr 2015 10:40:28 +0200 Subject: [PATCH 08/16] KEYCLOAK-1070 JSON representation and export/import for userConsent --- .../idm/UserConsentRepresentation.java | 28 ++++++++++++++ .../idm/UserRepresentation.java | 9 +++++ .../exportimport/util/ExportUtils.java | 33 +++++++++++++++- .../account/freemarker/model/AccessBean.java | 2 +- .../java/org/keycloak/models/UserModel.java | 10 ++--- .../models/utils/RepresentationToModel.java | 31 +++++++++++++++ .../models/utils/UserModelDelegate.java | 20 +++++----- .../models/file/adapter/ClientAdapter.java | 3 +- .../models/file/adapter/UserAdapter.java | 10 ++--- .../keycloak/models/cache/UserAdapter.java | 20 +++++----- .../keycloak/models/jpa/ClientAdapter.java | 2 +- .../org/keycloak/models/jpa/UserAdapter.java | 10 ++--- .../keycloak/adapters/ClientAdapter.java | 3 +- .../mongo/keycloak/adapters/UserAdapter.java | 10 ++--- .../managers/AuthenticationManager.java | 2 +- .../services/resources/AccountService.java | 3 +- .../resources/LoginActionsService.java | 6 +-- .../testsuite/model/ClientModelTest.java | 4 ++ .../keycloak/testsuite/model/ImportTest.java | 18 +++++++++ .../testsuite/model/UserConsentModelTest.java | 38 +++++++++---------- .../src/test/resources/model/testrealm.json | 12 ++++++ 21 files changed, 204 insertions(+), 70 deletions(-) create mode 100644 core/src/main/java/org/keycloak/representations/idm/UserConsentRepresentation.java diff --git a/core/src/main/java/org/keycloak/representations/idm/UserConsentRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/UserConsentRepresentation.java new file mode 100644 index 0000000000..113ba8483c --- /dev/null +++ b/core/src/main/java/org/keycloak/representations/idm/UserConsentRepresentation.java @@ -0,0 +1,28 @@ +package org.keycloak.representations.idm; + +import java.util.List; + +/** + * @author Marek Posolda + */ +public class UserConsentRepresentation { + + protected List grantedRoles; // points to roleIds + protected List grantedProtocolMappers; // points to protocolMapperIds + + public List getGrantedRoles() { + return grantedRoles; + } + + public void setGrantedRoles(List grantedRoles) { + this.grantedRoles = grantedRoles; + } + + public List getGrantedProtocolMappers() { + return grantedProtocolMappers; + } + + public void setGrantedProtocolMappers(List grantedProtocolMappers) { + this.grantedProtocolMappers = grantedProtocolMappers; + } +} diff --git a/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java index 94a90d9e45..b9716d3150 100755 --- a/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java @@ -27,6 +27,7 @@ public class UserRepresentation { protected List federatedIdentities; protected List realmRoles; protected Map> clientRoles; + protected Map clientConsents; @Deprecated protected Map> applicationRoles; @@ -176,6 +177,14 @@ public class UserRepresentation { this.clientRoles = clientRoles; } + public Map getClientConsents() { + return clientConsents; + } + + public void setClientConsents(Map clientConsents) { + this.clientConsents = clientConsents; + } + @Deprecated public Map> getApplicationRoles() { return applicationRoles; diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportUtils.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportUtils.java index c404c3d3ad..bccce2d0ff 100755 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportUtils.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportUtils.java @@ -8,14 +8,15 @@ import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.SerializationConfig; import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; +import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleContainerModel; import org.keycloak.models.RoleModel; import org.keycloak.models.FederatedIdentityModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.UserCredentialValueModel; import org.keycloak.models.UserModel; import org.keycloak.models.utils.ModelToRepresentation; -import org.keycloak.representations.idm.ApplicationRepresentation; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.RealmRepresentation; @@ -23,6 +24,7 @@ import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.representations.idm.RolesRepresentation; import org.keycloak.representations.idm.ScopeMappingRepresentation; import org.keycloak.representations.idm.FederatedIdentityRepresentation; +import org.keycloak.representations.idm.UserConsentRepresentation; import org.keycloak.representations.idm.UserRepresentation; import java.io.IOException; @@ -283,6 +285,35 @@ public class ExportUtils { userRep.setCredentials(credReps); userRep.setFederationLink(user.getFederationLink()); + // Grants + List consents = user.getConsents(); + Map consentReps = new HashMap(); + for (UserConsentModel consent : consents) { + String clientId = consent.getClient().getClientId(); + + List grantedProtocolMappers = new LinkedList(); + for (ProtocolMapperModel protocolMapper : consent.getGrantedProtocolMappers()) { + grantedProtocolMappers.add(protocolMapper.getId()); + } + + List grantedRoles = new LinkedList(); + for (RoleModel role : consent.getGrantedRoles()) { + grantedRoles.add(role.getId()); + } + + + if (grantedRoles.size() > 0 || grantedProtocolMappers.size() > 0) { + UserConsentRepresentation consentRep = new UserConsentRepresentation(); + if (grantedRoles.size() > 0) consentRep.setGrantedRoles(grantedRoles); + if (grantedProtocolMappers.size() > 0) consentRep.setGrantedProtocolMappers(grantedProtocolMappers); + consentReps.put(clientId, consentRep); + } + } + + if (consentReps.size() > 0) { + userRep.setClientConsents(consentReps); + } + return userRep; } diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java index 959b934a87..67eb4a68b4 100644 --- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java +++ b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java @@ -20,7 +20,7 @@ public class AccessBean { private List clientGrants = new LinkedList(); public AccessBean(RealmModel realm, UserModel user, URI baseUri, String stateChecker) { - List grantedConsents = user.getGrantedConsents(); + List grantedConsents = user.getConsents(); for (UserConsentModel consent : grantedConsents) { ClientModel client = consent.getClient(); diff --git a/model/api/src/main/java/org/keycloak/models/UserModel.java b/model/api/src/main/java/org/keycloak/models/UserModel.java index 09babf8082..ed5ae9ea96 100755 --- a/model/api/src/main/java/org/keycloak/models/UserModel.java +++ b/model/api/src/main/java/org/keycloak/models/UserModel.java @@ -75,11 +75,11 @@ public interface UserModel { String getFederationLink(); void setFederationLink(String link); - void addGrantedConsent(UserConsentModel consent); - UserConsentModel getGrantedConsentByClient(String clientId); - List getGrantedConsents(); - void updateGrantedConsent(UserConsentModel consent); - boolean revokeGrantedConsentForClient(String clientId); + void addConsent(UserConsentModel consent); + UserConsentModel getConsentByClient(String clientId); + List getConsents(); + void updateConsent(UserConsentModel consent); + boolean revokeConsentForClient(String clientId); public static enum RequiredAction { VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD diff --git a/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java b/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java index 6fc3e1e46a..0312ff452a 100755 --- a/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java +++ b/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java @@ -16,6 +16,7 @@ import org.keycloak.models.PasswordPolicy; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserCredentialValueModel; import org.keycloak.models.UserFederationProviderModel; @@ -34,6 +35,7 @@ import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.representations.idm.ScopeMappingRepresentation; import org.keycloak.representations.idm.SocialLinkRepresentation; +import org.keycloak.representations.idm.UserConsentRepresentation; import org.keycloak.representations.idm.UserFederationProviderRepresentation; import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.util.UriUtils; @@ -789,6 +791,35 @@ public class RepresentationToModel { createClientRoleMappings(client, user, entry.getValue()); } } + if (userRep.getClientConsents() != null) { + for (Map.Entry entry : userRep.getClientConsents().entrySet()) { + ClientModel client = clientMap.get(entry.getKey()); + if (client == null) { + throw new RuntimeException("Unable to find client consent mappings for client: " + entry.getKey()); + } + + UserConsentModel consentModel = new UserConsentModel(newRealm, client.getId()); + + UserConsentRepresentation consentRep = entry.getValue(); + if (consentRep.getGrantedRoles() != null) { + for (String roleId : consentRep.getGrantedRoles()) { + if (newRealm.getRoleById(roleId) == null) { + throw new RuntimeException("Unable to find realm role referenced in consent mappings of user " + user.getUsername() + ". Role ID: " + roleId); + } + consentModel.addGrantedRole(roleId); + } + } + if (consentRep.getGrantedProtocolMappers() != null) { + for (String mapperId : consentRep.getGrantedProtocolMappers()) { + if (client.getProtocolMapperById(mapperId) == null) { + throw new RuntimeException("Unable to find protocol mapper referenced in consent mappings of user " + user.getUsername() + ". Protocol mapper ID: " + mapperId); + } + consentModel.addGrantedProtocolMapper(mapperId);; + } + } + user.addConsent(consentModel); + } + } return user; } diff --git a/model/api/src/main/java/org/keycloak/models/utils/UserModelDelegate.java b/model/api/src/main/java/org/keycloak/models/utils/UserModelDelegate.java index cd7aebfa71..8ac8f5b1b6 100755 --- a/model/api/src/main/java/org/keycloak/models/utils/UserModelDelegate.java +++ b/model/api/src/main/java/org/keycloak/models/utils/UserModelDelegate.java @@ -188,27 +188,27 @@ public class UserModelDelegate implements UserModel { } @Override - public void addGrantedConsent(UserConsentModel consent) { - delegate.addGrantedConsent(consent); + public void addConsent(UserConsentModel consent) { + delegate.addConsent(consent); } @Override - public UserConsentModel getGrantedConsentByClient(String clientId) { - return delegate.getGrantedConsentByClient(clientId); + public UserConsentModel getConsentByClient(String clientId) { + return delegate.getConsentByClient(clientId); } @Override - public List getGrantedConsents() { - return delegate.getGrantedConsents(); + public List getConsents() { + return delegate.getConsents(); } @Override - public void updateGrantedConsent(UserConsentModel consent) { - delegate.updateGrantedConsent(consent); + public void updateConsent(UserConsentModel consent) { + delegate.updateConsent(consent); } @Override - public boolean revokeGrantedConsentForClient(String clientId) { - return delegate.revokeGrantedConsentForClient(clientId); + public boolean revokeConsentForClient(String clientId) { + return delegate.revokeConsentForClient(clientId); } } diff --git a/model/file/src/main/java/org/keycloak/models/file/adapter/ClientAdapter.java b/model/file/src/main/java/org/keycloak/models/file/adapter/ClientAdapter.java index 18cc9c858b..34ddb06734 100755 --- a/model/file/src/main/java/org/keycloak/models/file/adapter/ClientAdapter.java +++ b/model/file/src/main/java/org/keycloak/models/file/adapter/ClientAdapter.java @@ -277,7 +277,8 @@ public class ClientAdapter implements ClientModel { throw new RuntimeException("protocol mapper name must be unique per protocol"); } ProtocolMapperEntity entity = new ProtocolMapperEntity(); - entity.setId(KeycloakModelUtils.generateId()); + String id = model.getId() != null ? model.getId() : KeycloakModelUtils.generateId(); + entity.setId(id); entity.setProtocol(model.getProtocol()); entity.setName(model.getName()); entity.setProtocolMapper(model.getProtocolMapper()); diff --git a/model/file/src/main/java/org/keycloak/models/file/adapter/UserAdapter.java b/model/file/src/main/java/org/keycloak/models/file/adapter/UserAdapter.java index b9642db59b..0937e2c46f 100755 --- a/model/file/src/main/java/org/keycloak/models/file/adapter/UserAdapter.java +++ b/model/file/src/main/java/org/keycloak/models/file/adapter/UserAdapter.java @@ -432,29 +432,29 @@ public class UserAdapter implements UserModel, Comparable { } @Override - public void addGrantedConsent(UserConsentModel consent) { + public void addConsent(UserConsentModel consent) { // TODO } @Override - public UserConsentModel getGrantedConsentByClient(String clientId) { + public UserConsentModel getConsentByClient(String clientId) { // TODO return null; } @Override - public List getGrantedConsents() { + public List getConsents() { // TODO return null; } @Override - public void updateGrantedConsent(UserConsentModel consent) { + public void updateConsent(UserConsentModel consent) { // TODO } @Override - public boolean revokeGrantedConsentForClient(String clientId) { + public boolean revokeConsentForClient(String clientId) { // TODO return false; } diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/UserAdapter.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/UserAdapter.java index 16b705bfab..10336fd592 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/UserAdapter.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/UserAdapter.java @@ -277,34 +277,34 @@ public class UserAdapter implements UserModel { } @Override - public void addGrantedConsent(UserConsentModel consent) { + public void addConsent(UserConsentModel consent) { getDelegateForUpdate(); - updated.addGrantedConsent(consent); + updated.addConsent(consent); } @Override - public UserConsentModel getGrantedConsentByClient(String clientId) { + public UserConsentModel getConsentByClient(String clientId) { // TODO: caching? getDelegateForUpdate(); - return updated.getGrantedConsentByClient(clientId); + return updated.getConsentByClient(clientId); } @Override - public List getGrantedConsents() { + public List getConsents() { // TODO: caching? getDelegateForUpdate(); - return updated.getGrantedConsents(); + return updated.getConsents(); } @Override - public void updateGrantedConsent(UserConsentModel consent) { + public void updateConsent(UserConsentModel consent) { getDelegateForUpdate(); - updated.updateGrantedConsent(consent); + updated.updateConsent(consent); } @Override - public boolean revokeGrantedConsentForClient(String clientId) { + public boolean revokeConsentForClient(String clientId) { getDelegateForUpdate(); - return updated.revokeGrantedConsentForClient(clientId); + return updated.revokeConsentForClient(clientId); } } diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/ClientAdapter.java b/model/jpa/src/main/java/org/keycloak/models/jpa/ClientAdapter.java index 498db9a81c..f9f62b6ad5 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/ClientAdapter.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/ClientAdapter.java @@ -378,7 +378,7 @@ public class ClientAdapter implements ClientModel { if (getProtocolMapperByName(model.getProtocol(), model.getName()) != null) { throw new RuntimeException("protocol mapper name must be unique per protocol"); } - String id = KeycloakModelUtils.generateId(); + String id = model.getId() != null ? model.getId() : KeycloakModelUtils.generateId(); ProtocolMapperEntity entity = new ProtocolMapperEntity(); entity.setId(id); entity.setName(model.getName()); diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java b/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java index 576801f382..737e0e3760 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java @@ -480,7 +480,7 @@ public class UserAdapter implements UserModel { } @Override - public void addGrantedConsent(UserConsentModel consent) { + public void addConsent(UserConsentModel consent) { String clientId = consent.getClient().getId(); UserConsentEntity consentEntity = getGrantedConsentEntity(clientId); @@ -499,13 +499,13 @@ public class UserAdapter implements UserModel { } @Override - public UserConsentModel getGrantedConsentByClient(String clientId) { + public UserConsentModel getConsentByClient(String clientId) { UserConsentEntity entity = getGrantedConsentEntity(clientId); return toConsentModel(entity); } @Override - public List getGrantedConsents() { + public List getConsents() { TypedQuery query = em.createNamedQuery("userConsentsByUser", UserConsentEntity.class); query.setParameter("userId", getId()); List results = query.getResultList(); @@ -519,7 +519,7 @@ public class UserAdapter implements UserModel { } @Override - public void updateGrantedConsent(UserConsentModel consent) { + public void updateConsent(UserConsentModel consent) { String clientId = consent.getClient().getId(); UserConsentEntity consentEntity = getGrantedConsentEntity(clientId); @@ -531,7 +531,7 @@ public class UserAdapter implements UserModel { } @Override - public boolean revokeGrantedConsentForClient(String clientId) { + public boolean revokeConsentForClient(String clientId) { UserConsentEntity consentEntity = getGrantedConsentEntity(clientId); if (consentEntity == null) return false; diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java index 8e07bc9af2..2cb2c79a3e 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java @@ -305,7 +305,8 @@ public class ClientAdapter extends AbstractMongoAdapter imple throw new RuntimeException("protocol mapper name must be unique per protocol"); } ProtocolMapperEntity entity = new ProtocolMapperEntity(); - entity.setId(KeycloakModelUtils.generateId()); + String id = model.getId() != null ? model.getId() : KeycloakModelUtils.generateId(); + entity.setId(id); entity.setProtocol(model.getProtocol()); entity.setName(model.getName()); entity.setProtocolMapper(model.getProtocolMapper()); diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/UserAdapter.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/UserAdapter.java index 752f3007c0..b0547930c3 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/UserAdapter.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/UserAdapter.java @@ -417,7 +417,7 @@ public class UserAdapter extends AbstractMongoAdapter implement } @Override - public void addGrantedConsent(UserConsentModel consent) { + public void addConsent(UserConsentModel consent) { String clientId = consent.getClient().getId(); if (getConsentEntityByClientId(clientId) != null) { throw new ModelDuplicateException("Consent already exists for client [" + clientId + "] and user [" + user.getId() + "]"); @@ -431,13 +431,13 @@ public class UserAdapter extends AbstractMongoAdapter implement } @Override - public UserConsentModel getGrantedConsentByClient(String clientId) { + public UserConsentModel getConsentByClient(String clientId) { UserConsentEntity consentEntity = getConsentEntityByClientId(clientId); return consentEntity!=null ? toConsentModel(consentEntity) : null; } @Override - public List getGrantedConsents() { + public List getConsents() { List result = new ArrayList(); DBObject query = new QueryBuilder() @@ -488,7 +488,7 @@ public class UserAdapter extends AbstractMongoAdapter implement } @Override - public void updateGrantedConsent(UserConsentModel consent) { + public void updateConsent(UserConsentModel consent) { String clientId = consent.getClient().getId(); MongoUserConsentEntity consentEntity = getConsentEntityByClientId(clientId); if (consentEntity == null) { @@ -500,7 +500,7 @@ public class UserAdapter extends AbstractMongoAdapter implement } @Override - public boolean revokeGrantedConsentForClient(String clientId) { + public boolean revokeConsentForClient(String clientId) { MongoUserConsentEntity entity = getConsentEntityByClientId(clientId); if (entity == null) { return false; diff --git a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java index ee75c4314c..7647b36345 100755 --- a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java +++ b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java @@ -420,7 +420,7 @@ public class AuthenticationManager { if (client.isConsentRequired()) { accessCode.setAction(ClientSessionModel.Action.OAUTH_GRANT); - UserConsentModel grantedConsent = user.getGrantedConsentByClient(client.getId()); + UserConsentModel grantedConsent = user.getConsentByClient(client.getId()); List realmRoles = new LinkedList(); MultivaluedMap resourceRoles = new MultivaluedMapImpl(); diff --git a/services/src/main/java/org/keycloak/services/resources/AccountService.java b/services/src/main/java/org/keycloak/services/resources/AccountService.java index af1c872531..3a775e1361 100755 --- a/services/src/main/java/org/keycloak/services/resources/AccountService.java +++ b/services/src/main/java/org/keycloak/services/resources/AccountService.java @@ -76,7 +76,6 @@ import javax.ws.rs.core.Variant; import java.lang.reflect.Method; import java.net.URI; -import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -512,7 +511,7 @@ public class AccountService { // Revoke grant in UserModel UserModel user = auth.getUser(); - user.revokeGrantedConsentForClient(client.getId()); + user.revokeConsentForClient(client.getId()); // Logout clientSessions for this user and client List userSessions = session.sessions().getUserSessions(realm, user); diff --git a/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java b/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java index 02ac98e2b5..d4aa8d77d3 100755 --- a/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java +++ b/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java @@ -609,10 +609,10 @@ public class LoginActionsService { return protocol.consentDenied(clientSession); } - UserConsentModel grantedConsent = user.getGrantedConsentByClient(client.getId()); + UserConsentModel grantedConsent = user.getConsentByClient(client.getId()); if (grantedConsent == null) { grantedConsent = new UserConsentModel(realm, client.getId()); - user.addGrantedConsent(grantedConsent); + user.addConsent(grantedConsent); } for (String roleId : clientSession.getRoles()) { grantedConsent.addGrantedRole(roleId); @@ -623,7 +623,7 @@ public class LoginActionsService { grantedConsent.addGrantedProtocolMapper(protocolMapper.getId()); } } - user.updateGrantedConsent(grantedConsent); + user.updateConsent(grantedConsent); event.success(); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ClientModelTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ClientModelTest.java index f0fc63b14c..e56d462506 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ClientModelTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ClientModelTest.java @@ -9,6 +9,7 @@ import org.keycloak.models.RoleModel; import org.keycloak.models.utils.ModelToRepresentation; import org.keycloak.models.utils.RepresentationToModel; import org.keycloak.representations.idm.ClientRepresentation; +import org.keycloak.representations.idm.ProtocolMapperRepresentation; import org.keycloak.services.managers.ClientManager; import java.util.Iterator; @@ -63,6 +64,9 @@ public class ClientModelTest extends AbstractModelTest { public void json() { ClientRepresentation representation = ModelToRepresentation.toRepresentation(client); representation.setId(null); + for (ProtocolMapperRepresentation protocolMapper : representation.getProtocolMappers()) { + protocolMapper.setId(null); + } RealmModel realm = realmManager.createRealm("copy"); ClientModel copy = RepresentationToModel.createClient(session, realm, representation, true); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java index 54f4cbeedd..5bdc191813 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java @@ -14,6 +14,7 @@ import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RealmModel; import org.keycloak.models.RequiredCredentialModel; import org.keycloak.models.RoleModel; +import org.keycloak.models.UserConsentModel; import org.keycloak.models.UserFederationProvider; import org.keycloak.models.UserFederationProviderFactory; import org.keycloak.models.UserFederationProviderModel; @@ -238,6 +239,23 @@ public class ImportTest extends AbstractModelTest { String includeInIdToken = gssCredentialMapper.getConfig().get(OIDCAttributeMapperHelper.INCLUDE_IN_ID_TOKEN); Assert.assertTrue(includeInAccessToken.equalsIgnoreCase("true")); Assert.assertTrue(includeInIdToken == null || Boolean.parseBoolean(includeInIdToken) == false); + + // Test user consents + admin = session.users().getUserByUsername("admin", realm); + Assert.assertEquals(2, admin.getConsents().size()); + + UserConsentModel appAdminConsent = admin.getConsentByClient(application.getId()); + Assert.assertEquals(2, appAdminConsent.getGrantedRoles().size()); + Assert.assertTrue(appAdminConsent.getGrantedProtocolMappers() == null || appAdminConsent.getGrantedProtocolMappers().isEmpty()); + Assert.assertTrue(appAdminConsent.isRoleGranted(realm.getRole("admin"))); + Assert.assertTrue(appAdminConsent.isRoleGranted(application.getRole("app-admin"))); + + UserConsentModel otherAppAdminConsent = admin.getConsentByClient(otherApp.getId()); + Assert.assertEquals(1, otherAppAdminConsent.getGrantedRoles().size()); + Assert.assertEquals(1, otherAppAdminConsent.getGrantedProtocolMappers().size()); + Assert.assertTrue(otherAppAdminConsent.isRoleGranted(realm.getRole("admin"))); + Assert.assertFalse(otherAppAdminConsent.isRoleGranted(application.getRole("app-admin"))); + Assert.assertTrue(otherAppAdminConsent.isProtocolMapperGranted(gssCredentialMapper)); } @Test diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserConsentModelTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserConsentModelTest.java index bdc068ba19..97cb24b408 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserConsentModelTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserConsentModelTest.java @@ -50,7 +50,7 @@ public class UserConsentModelTest extends AbstractModelTest { johnFooGrant.addGrantedRole(realmRole.getId()); johnFooGrant.addGrantedRole(barClientRole.getId()); johnFooGrant.addGrantedProtocolMapper(fooMapper.getId()); - john.addGrantedConsent(johnFooGrant); + john.addConsent(johnFooGrant); UserConsentModel johnBarGrant = new UserConsentModel(realm, barClient.getId()); johnBarGrant.addGrantedProtocolMapper(barMapper.getId()); @@ -58,17 +58,17 @@ public class UserConsentModelTest extends AbstractModelTest { // Update should fail as grant doesn't yet exists try { - john.updateGrantedConsent(johnBarGrant); + john.updateConsent(johnBarGrant); Assert.fail("Not expected to end here"); } catch (ModelException expected) { } - john.addGrantedConsent(johnBarGrant); + john.addConsent(johnBarGrant); UserConsentModel maryFooGrant = new UserConsentModel(realm, fooClient.getId()); maryFooGrant.addGrantedRole(realmRole.getId()); maryFooGrant.addGrantedProtocolMapper(fooMapper.getId()); - mary.addGrantedConsent(maryFooGrant); + mary.addConsent(maryFooGrant); commit(); } @@ -82,27 +82,27 @@ public class UserConsentModelTest extends AbstractModelTest { UserModel john = session.users().getUserByUsername("john", realm); UserModel mary = session.users().getUserByUsername("mary", realm); - UserConsentModel johnFooConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnFooConsent = john.getConsentByClient(fooClient.getId()); Assert.assertEquals(johnFooConsent.getGrantedRoles().size(), 2); Assert.assertEquals(johnFooConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", johnFooConsent)); Assert.assertTrue(isRoleGranted(barClient, "bar-client-role", johnFooConsent)); Assert.assertTrue(isMapperGranted(fooClient, "foo", johnFooConsent)); - UserConsentModel johnBarConsent = john.getGrantedConsentByClient(barClient.getId()); + UserConsentModel johnBarConsent = john.getConsentByClient(barClient.getId()); Assert.assertEquals(johnBarConsent.getGrantedRoles().size(), 1); Assert.assertEquals(johnBarConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", johnBarConsent)); Assert.assertTrue(isMapperGranted(barClient, "bar", johnBarConsent)); - UserConsentModel maryConsent = mary.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel maryConsent = mary.getConsentByClient(fooClient.getId()); Assert.assertEquals(maryConsent.getGrantedRoles().size(), 1); Assert.assertEquals(maryConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", maryConsent)); Assert.assertFalse(isRoleGranted(barClient, "bar-client-role", maryConsent)); Assert.assertTrue(isMapperGranted(fooClient, "foo", maryConsent)); - Assert.assertNull(mary.getGrantedConsentByClient(barClient.getId())); + Assert.assertNull(mary.getConsentByClient(barClient.getId())); } @Test @@ -113,10 +113,10 @@ public class UserConsentModelTest extends AbstractModelTest { UserModel john = session.users().getUserByUsername("john", realm); UserModel mary = session.users().getUserByUsername("mary", realm); - List johnConsents = john.getGrantedConsents(); + List johnConsents = john.getConsents(); Assert.assertEquals(2, johnConsents.size()); - List maryConsents = mary.getGrantedConsents(); + List maryConsents = mary.getConsents(); Assert.assertEquals(1, maryConsents.size()); UserConsentModel maryConsent = maryConsents.get(0); Assert.assertEquals(maryConsent.getClient().getId(), fooClient.getId()); @@ -132,7 +132,7 @@ public class UserConsentModelTest extends AbstractModelTest { ClientModel fooClient = realm.getClientByClientId("foo-client"); UserModel john = session.users().getUserByUsername("john", realm); - UserConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnConsent = john.getConsentByClient(fooClient.getId()); // Remove foo protocol mapper from johnConsent ProtocolMapperModel protMapperModel = fooClient.getProtocolMapperByName(OIDCLoginProtocol.LOGIN_PROTOCOL, "foo"); @@ -145,14 +145,14 @@ public class UserConsentModelTest extends AbstractModelTest { RoleModel newRealmRole = realm.addRole("new-realm-role"); johnConsent.addGrantedRole(newRealmRole.getId()); - john.updateGrantedConsent(johnConsent); + john.updateConsent(johnConsent); commit(); realm = realmManager.getRealm("original"); fooClient = realm.getClientByClientId("foo-client"); john = session.users().getUserByUsername("john", realm); - johnConsent = john.getGrantedConsentByClient(fooClient.getId()); + johnConsent = john.getConsentByClient(fooClient.getId()); Assert.assertEquals(johnConsent.getGrantedRoles().size(), 2); Assert.assertEquals(johnConsent.getGrantedProtocolMappers().size(), 0); @@ -167,13 +167,13 @@ public class UserConsentModelTest extends AbstractModelTest { ClientModel fooClient = realm.getClientByClientId("foo-client"); UserModel john = session.users().getUserByUsername("john", realm); - john.revokeGrantedConsentForClient(fooClient.getId()); + john.revokeConsentForClient(fooClient.getId()); commit(); realm = realmManager.getRealm("original"); john = session.users().getUserByUsername("john", realm); - Assert.assertNull(john.getGrantedConsentByClient(fooClient.getId())); + Assert.assertNull(john.getConsentByClient(fooClient.getId())); } @Test @@ -196,7 +196,7 @@ public class UserConsentModelTest extends AbstractModelTest { realm = realmManager.getRealm("original"); fooClient = realm.getClientByClientId("foo-client"); UserModel john = session.users().getUserByUsername("john", realm); - UserConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnConsent = john.getConsentByClient(fooClient.getId()); Assert.assertEquals(johnConsent.getGrantedRoles().size(), 2); Assert.assertEquals(johnConsent.getGrantedProtocolMappers().size(), 0); @@ -215,7 +215,7 @@ public class UserConsentModelTest extends AbstractModelTest { ClientModel fooClient = realm.getClientByClientId("foo-client"); ClientModel barClient = realm.getClientByClientId("bar-client"); UserModel john = session.users().getUserByUsername("john", realm); - UserConsentModel johnConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnConsent = john.getConsentByClient(fooClient.getId()); Assert.assertEquals(johnConsent.getGrantedRoles().size(), 1); Assert.assertEquals(johnConsent.getGrantedProtocolMappers().size(), 1); @@ -237,13 +237,13 @@ public class UserConsentModelTest extends AbstractModelTest { UserModel john = session.users().getUserByUsername("john", realm); - UserConsentModel johnFooConsent = john.getGrantedConsentByClient(fooClient.getId()); + UserConsentModel johnFooConsent = john.getConsentByClient(fooClient.getId()); Assert.assertEquals(johnFooConsent.getGrantedRoles().size(), 1); Assert.assertEquals(johnFooConsent.getGrantedProtocolMappers().size(), 1); Assert.assertTrue(isRoleGranted(realm, "realm-role", johnFooConsent)); Assert.assertTrue(isMapperGranted(fooClient, "foo", johnFooConsent)); - Assert.assertNull(john.getGrantedConsentByClient(barClient.getId())); + Assert.assertNull(john.getConsentByClient(barClient.getId())); } private boolean isRoleGranted(RoleContainerModel roleContainer, String roleName, UserConsentModel consentModel) { diff --git a/testsuite/integration/src/test/resources/model/testrealm.json b/testsuite/integration/src/test/resources/model/testrealm.json index 4044399254..1c0b7e64a2 100755 --- a/testsuite/integration/src/test/resources/model/testrealm.json +++ b/testsuite/integration/src/test/resources/model/testrealm.json @@ -74,6 +74,15 @@ "applicationRoles": { "Application": [ "app-admin" ], "OtherApp": [ "otherapp-admin" ] + }, + "clientConsents": { + "Application": { + "grantedRoles": [ "456", "789" ] + }, + "OtherApp": { + "grantedProtocolMappers": [ "123" ], + "grantedRoles": [ "456" ] + } } }, { @@ -113,6 +122,7 @@ "enabled": true, "protocolMappers" : [ { + "id": "123", "name" : "gss delegation credential", "protocol" : "openid-connect", "protocolMapper" : "oidc-usersessionmodel-note-mapper", @@ -138,12 +148,14 @@ "roles" : { "realm" : [ { + "id": "456", "name": "admin" } ], "application" : { "Application" : [ { + "id": "789", "name": "app-admin" }, { From e17105cc8ecba4f0cb80c1e61b920c6ce459d177 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Wed, 22 Apr 2015 19:11:46 +0200 Subject: [PATCH 09/16] Updated distribution and cleaning of maven modules --- broker/core/pom.xml | 3 - broker/oidc/pom.xml | 4 - broker/saml/pom.xml | 11 - connections/file/pom.xml | 4 - connections/infinispan/pom.xml | 2 - connections/jpa-liquibase/pom.xml | 14 +- connections/jpa/pom.xml | 3 - connections/mongo-update/pom.xml | 3 - connections/mongo/pom.xml | 2 - core-jaxrs/pom.xml | 1 - core/pom.xml | 6 - .../org/keycloak/jose/jwk/JWKBuilderTest.java | 12 - dependencies/server-all/pom.xml | 37 - dependencies/server-min/pom.xml | 23 - .../as7-adapter-zip/assembly.xml | 0 .../{ => adapters}/as7-adapter-zip/pom.xml | 11 +- .../eap6-adapter-zip/assembly.xml | 0 .../{ => adapters}/eap6-adapter-zip/pom.xml | 11 +- .../jetty81-adapter-zip/assembly.xml | 0 .../jetty81-adapter-zip/pom.xml | 4 +- .../jetty91-adapter-zip/assembly.xml | 0 .../jetty91-adapter-zip/keycloak.mod | 0 .../jetty91-adapter-zip/pom.xml | 4 +- .../jetty92-adapter-zip/assembly.xml | 0 .../jetty92-adapter-zip/keycloak.mod | 0 .../jetty92-adapter-zip/pom.xml | 4 +- .../js-adapter-zip/assembly.xml | 0 .../{ => adapters}/js-adapter-zip/pom.xml | 5 +- .../{ => adapters}/osgi/features/pom.xml | 2 +- .../features/src/main/resources/features.xml | 0 distribution/{ => adapters}/osgi/jaas/pom.xml | 3 +- .../OSGI-INF/blueprint/blueprint.xml | 0 distribution/{ => adapters}/osgi/pom.xml | 2 +- .../{ => adapters}/osgi/thirdparty/pom.xml | 2 +- .../thirdparty/src/main/resources/.gitignore | 0 distribution/adapters/pom.xml | 42 + .../tomcat6-adapter-zip/assembly.xml | 0 .../tomcat6-adapter-zip/pom.xml | 4 +- .../tomcat7-adapter-zip/assembly.xml | 0 .../tomcat7-adapter-zip/pom.xml | 4 +- .../tomcat8-adapter-zip/assembly.xml | 0 .../tomcat8-adapter-zip/pom.xml | 4 +- .../wildfly-adapter-zip/assembly.xml | 0 .../wildfly-adapter-zip/pom.xml | 13 +- distribution/appliance-dist/assembly.xml | 77 -- distribution/appliance-dist/pom.xml | 197 ---- .../assembly.xml | 8 +- .../build.xml | 0 .../index.html | 0 .../pom.xml | 9 +- distribution/examples-docs-zip/assembly.xml | 46 - distribution/examples-docs-zip/pom.xml | 92 -- distribution/modules/build.xml | 47 +- distribution/modules/pom.xml | 81 -- .../modules/org/jboss/aesh/main/module.xml | 17 - .../modules/org/jboss/as/cli/main/module.xml | 56 -- .../org/picketlink/common/main/module.xml | 30 - .../org/picketlink/config/main/module.xml | 28 - .../org/picketlink/core/api/main/module.xml | 32 - .../org/picketlink/core/main/module.xml | 34 - .../federation/bindings/main/module.xml | 59 -- .../org/picketlink/federation/main/module.xml | 56 -- .../org/picketlink/idm/api/main/module.xml | 30 - .../org/picketlink/idm/main/module.xml | 34 - .../org/picketlink/idm/schema/main/module.xml | 32 - .../modules/org/picketlink/main/module.xml | 27 - distribution/pom.xml | 24 +- .../{proxy => proxy-dist}/assembly.xml | 4 +- distribution/{proxy => proxy-dist}/pom.xml | 5 +- distribution/server-bundle-dist/assembly.xml | 27 + distribution/server-bundle-dist/pom.xml | 56 ++ .../src/main/providers/README.txt | 0 .../src/main/themes/README.txt | 0 .../src/main/welcome-content/index.html | 0 .../src/main/xslt/standalone.xsl | 0 distribution/server-dist/assembly.xml | 40 + distribution/server-dist/pom.xml | 80 ++ .../server-dist/src/main/providers/README.txt | 2 + .../server-dist/src/main/themes/README.txt | 3 + .../src/main/welcome-content/index.html | 32 + .../server-dist/src/main/xslt/standalone.xsl | 89 ++ distribution/server-overlay/assembly.xml | 83 ++ distribution/server-overlay/pom.xml | 123 +++ .../src/main/providers/README.txt | 2 + .../server-overlay/src/main/themes/README.txt | 3 + .../src/main/welcome-content/index.html | 32 + .../src/main/xslt/standalone.xsl | 89 ++ distribution/src-dist/pom.xml | 4 +- .../WEB-INF/jboss-deployment-structure.xml | 3 +- distribution/theme-template-zip/build.xml | 11 - distribution/war-dist/assembly.xml | 73 -- distribution/war-dist/pom.xml | 157 ---- distribution/war-zip/assembly.xml | 30 - distribution/war-zip/auth-server.war.dodeploy | 0 distribution/war-zip/keycloak-ds.xml | 11 - distribution/war-zip/pom.xml | 80 -- events/api/pom.xml | 2 - events/email/pom.xml | 4 - events/jboss-logging/pom.xml | 3 - events/jpa/pom.xml | 5 - events/mongo/pom.xml | 4 - events/syslog/pom.xml | 4 - examples/admin-client/pom.xml | 11 +- examples/basic-auth/pom.xml | 20 +- .../broker/facebook-authentication/pom.xml | 18 +- examples/broker/google-authentication/pom.xml | 18 +- examples/broker/pom.xml | 17 +- .../broker/saml-broker-authentication/pom.xml | 18 +- .../broker/twitter-authentication/pom.xml | 19 +- examples/cors/angular-product-app/pom.xml | 19 +- examples/cors/database-service/pom.xml | 21 +- examples/cors/pom.xml | 19 +- .../demo-template/admin-access-app/pom.xml | 21 +- .../demo-template/angular-product-app/pom.xml | 19 +- .../demo-template/customer-app-cli/pom.xml | 20 +- .../demo-template/customer-app-js/pom.xml | 19 +- examples/demo-template/customer-app/pom.xml | 21 +- .../demo-template/database-service/pom.xml | 21 +- examples/demo-template/example-ear/pom.xml | 13 +- examples/demo-template/pom.xml | 6 +- examples/demo-template/product-app/pom.xml | 21 +- .../demo-template/third-party-cdi/pom.xml | 22 +- examples/demo-template/third-party/pom.xml | 22 +- examples/fuse/camel/pom.xml | 20 +- examples/fuse/customer-app-fuse/pom.xml | 21 +- examples/fuse/cxf-jaxrs/pom.xml | 19 +- examples/fuse/cxf-jaxws/pom.xml | 19 +- examples/fuse/features/pom.xml | 11 +- examples/fuse/pom.xml | 18 +- examples/fuse/product-app-fuse/pom.xml | 21 +- examples/js-console/pom.xml | 19 +- examples/kerberos/pom.xml | 20 +- examples/multi-tenant/pom.xml | 21 +- examples/pom.xml | 11 +- .../providers/event-listener-sysout/pom.xml | 18 +- examples/providers/event-store-mem/pom.xml | 18 +- .../providers/federation-provider/pom.xml | 15 +- examples/providers/pom.xml | 17 +- examples/saml/pom.xml | 6 +- examples/saml/post-basic/pom.xml | 89 +- examples/saml/post-with-encryption/pom.xml | 78 +- examples/saml/post-with-signature/pom.xml | 78 +- examples/saml/redirect-basic/pom.xml | 78 +- examples/saml/redirect-with-signature/pom.xml | 78 +- examples/themes/pom.xml | 15 +- export-import/export-import-api/pom.xml | 3 - export-import/export-import-dir/pom.xml | 3 - .../export-import-single-file/pom.xml | 3 - export-import/export-import-zip/pom.xml | 3 - federation/kerberos/pom.xml | 2 - federation/ldap/pom.xml | 3 - forms/account-api/pom.xml | 3 - forms/account-freemarker/pom.xml | 7 - forms/common-freemarker/pom.xml | 2 - forms/common-themes/pom.xml | 3 - forms/email-api/pom.xml | 3 - forms/email-freemarker/pom.xml | 5 - forms/login-api/pom.xml | 2 - forms/login-freemarker/pom.xml | 7 - integration/adapter-core/pom.xml | 1 - integration/admin-client/pom.xml | 5 - integration/as7-eap6/adapter/pom.xml | 4 - integration/installed/pom.xml | 2 - integration/jaxrs-oauth-client/pom.xml | 6 - integration/jboss-adapter-core/pom.xml | 2 - integration/jetty/jetty-core/pom.xml | 2 - integration/jetty/jetty8.1/pom.xml | 3 - integration/jetty/jetty9.1/pom.xml | 3 - integration/jetty/jetty9.2/pom.xml | 3 - integration/keycloak-as7-subsystem/pom.xml | 26 - integration/keycloak-subsystem/pom.xml | 1 - integration/servlet-oauth-client/pom.xml | 2 - integration/spring-boot/pom.xml | 5 - integration/tomcat/tomcat-core/pom.xml | 2 - integration/tomcat/tomcat6/pom.xml | 3 - integration/tomcat/tomcat7/pom.xml | 3 - integration/tomcat/tomcat8/pom.xml | 3 - integration/undertow/pom.xml | 2 - integration/wildfly-adapter/pom.xml | 4 - integration/wildfly-extensions/pom.xml | 4 - model/api/pom.xml | 1 - model/file/pom.xml | 5 - model/invalidation-cache/infinispan/pom.xml | 3 - .../invalidation-cache/model-adapters/pom.xml | 2 - model/jpa/pom.xml | 6 - model/mongo/pom.xml | 3 - model/sessions-infinispan/pom.xml | 3 - model/sessions-jpa/pom.xml | 4 - model/sessions-mem/pom.xml | 2 - model/sessions-mongo/pom.xml | 3 - pom.xml | 884 ++++++++++-------- project-integrations/aerogear-ups/app/pom.xml | 9 - .../aerogear-ups/auth-server/pom.xml | 7 - proxy/proxy-server/pom.xml | 5 - saml/saml-core/pom.xml | 7 - saml/saml-protocol/pom.xml | 16 - server/pom.xml | 44 - .../resources/META-INF/keycloak-server.json | 83 -- .../WEB-INF/jboss-deployment-structure.xml | 24 - server/src/main/webapp/WEB-INF/web.xml | 52 -- services/pom.xml | 25 +- social/core/pom.xml | 1 - social/facebook/pom.xml | 2 - social/github/pom.xml | 2 - social/google/pom.xml | 2 - social/linkedin/pom.xml | 2 - social/stackoverflow/pom.xml | 2 - social/twitter/pom.xml | 4 - testsuite/docker-cluster/pom.xml | 4 - testsuite/integration/pom.xml | 57 +- testsuite/jetty/jetty81/pom.xml | 19 - testsuite/jetty/jetty91/pom.xml | 19 - testsuite/jetty/jetty92/pom.xml | 19 - testsuite/performance-web/pom.xml | 13 - .../performance/web/OAuthClient.java | 2 +- testsuite/performance/pom.xml | 32 +- testsuite/proxy/pom.xml | 20 - testsuite/tomcat6/pom.xml | 188 +--- testsuite/tomcat7/pom.xml | 19 - testsuite/tomcat8/pom.xml | 19 - testsuite/tools/pom.xml | 3 - timer/api/pom.xml | 2 - timer/basic/pom.xml | 3 - 223 files changed, 1473 insertions(+), 3676 deletions(-) rename distribution/{ => adapters}/as7-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/as7-adapter-zip/pom.xml (89%) rename distribution/{ => adapters}/eap6-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/eap6-adapter-zip/pom.xml (89%) rename distribution/{ => adapters}/jetty81-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/jetty81-adapter-zip/pom.xml (90%) rename distribution/{ => adapters}/jetty91-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/jetty91-adapter-zip/keycloak.mod (100%) rename distribution/{ => adapters}/jetty91-adapter-zip/pom.xml (90%) rename distribution/{ => adapters}/jetty92-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/jetty92-adapter-zip/keycloak.mod (100%) rename distribution/{ => adapters}/jetty92-adapter-zip/pom.xml (90%) rename distribution/{ => adapters}/js-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/js-adapter-zip/pom.xml (91%) rename distribution/{ => adapters}/osgi/features/pom.xml (97%) rename distribution/{ => adapters}/osgi/features/src/main/resources/features.xml (100%) rename distribution/{ => adapters}/osgi/jaas/pom.xml (96%) rename distribution/{ => adapters}/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml (100%) rename distribution/{ => adapters}/osgi/pom.xml (92%) rename distribution/{ => adapters}/osgi/thirdparty/pom.xml (98%) rename distribution/{ => adapters}/osgi/thirdparty/src/main/resources/.gitignore (100%) create mode 100755 distribution/adapters/pom.xml rename distribution/{ => adapters}/tomcat6-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/tomcat6-adapter-zip/pom.xml (90%) rename distribution/{ => adapters}/tomcat7-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/tomcat7-adapter-zip/pom.xml (90%) rename distribution/{ => adapters}/tomcat8-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/tomcat8-adapter-zip/pom.xml (90%) rename distribution/{ => adapters}/wildfly-adapter-zip/assembly.xml (100%) rename distribution/{ => adapters}/wildfly-adapter-zip/pom.xml (88%) delete mode 100755 distribution/appliance-dist/assembly.xml delete mode 100755 distribution/appliance-dist/pom.xml rename distribution/{theme-template-zip => examples-dist}/assembly.xml (62%) rename distribution/{examples-docs-zip => examples-dist}/build.xml (100%) rename distribution/{examples-docs-zip => examples-dist}/index.html (100%) rename distribution/{theme-template-zip => examples-dist}/pom.xml (92%) delete mode 100755 distribution/examples-docs-zip/assembly.xml delete mode 100755 distribution/examples-docs-zip/pom.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/jboss/aesh/main/module.xml delete mode 100644 distribution/modules/src/main/resources/modules/org/jboss/as/cli/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/common/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/config/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/core/api/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/core/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/federation/bindings/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/federation/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/idm/api/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/idm/main/module.xml delete mode 100755 distribution/modules/src/main/resources/modules/org/picketlink/idm/schema/main/module.xml delete mode 100644 distribution/modules/src/main/resources/modules/org/picketlink/main/module.xml rename distribution/{proxy => proxy-dist}/assembly.xml (90%) rename distribution/{proxy => proxy-dist}/pom.xml (91%) create mode 100755 distribution/server-bundle-dist/assembly.xml create mode 100755 distribution/server-bundle-dist/pom.xml rename distribution/{appliance-dist => server-bundle-dist}/src/main/providers/README.txt (100%) rename distribution/{appliance-dist => server-bundle-dist}/src/main/themes/README.txt (100%) rename distribution/{appliance-dist => server-bundle-dist}/src/main/welcome-content/index.html (100%) rename distribution/{appliance-dist => server-bundle-dist}/src/main/xslt/standalone.xsl (100%) create mode 100755 distribution/server-dist/assembly.xml create mode 100755 distribution/server-dist/pom.xml create mode 100644 distribution/server-dist/src/main/providers/README.txt create mode 100644 distribution/server-dist/src/main/themes/README.txt create mode 100644 distribution/server-dist/src/main/welcome-content/index.html create mode 100755 distribution/server-dist/src/main/xslt/standalone.xsl create mode 100755 distribution/server-overlay/assembly.xml create mode 100755 distribution/server-overlay/pom.xml create mode 100644 distribution/server-overlay/src/main/providers/README.txt create mode 100644 distribution/server-overlay/src/main/themes/README.txt create mode 100644 distribution/server-overlay/src/main/welcome-content/index.html create mode 100755 distribution/server-overlay/src/main/xslt/standalone.xsl delete mode 100755 distribution/theme-template-zip/build.xml delete mode 100755 distribution/war-dist/assembly.xml delete mode 100755 distribution/war-dist/pom.xml delete mode 100755 distribution/war-zip/assembly.xml delete mode 100755 distribution/war-zip/auth-server.war.dodeploy delete mode 100755 distribution/war-zip/keycloak-ds.xml delete mode 100755 distribution/war-zip/pom.xml delete mode 100755 server/pom.xml delete mode 100755 server/src/main/resources/META-INF/keycloak-server.json delete mode 100755 server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml delete mode 100755 server/src/main/webapp/WEB-INF/web.xml diff --git a/broker/core/pom.xml b/broker/core/pom.xml index dce2420b69..f39c1a3dcb 100755 --- a/broker/core/pom.xml +++ b/broker/core/pom.xml @@ -18,17 +18,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-events-api - ${project.version} org.jboss.resteasy diff --git a/broker/oidc/pom.xml b/broker/oidc/pom.xml index 8913efb889..abd9687e65 100755 --- a/broker/oidc/pom.xml +++ b/broker/oidc/pom.xml @@ -18,12 +18,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-broker-core - ${project.version} org.codehaus.jackson @@ -38,13 +36,11 @@ org.keycloak keycloak-events-api - ${project.version} provided org.keycloak keycloak-services - ${project.version} provided diff --git a/broker/saml/pom.xml b/broker/saml/pom.xml index 704427ae28..3118e57686 100755 --- a/broker/saml/pom.xml +++ b/broker/saml/pom.xml @@ -18,37 +18,26 @@ org.keycloak keycloak-broker-core - ${project.version} provided org.keycloak keycloak-saml-protocol - ${project.version} provided org.keycloak keycloak-saml-core - ${project.version} provided - org.keycloak keycloak-services - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided diff --git a/connections/file/pom.xml b/connections/file/pom.xml index d5382e036b..35135ba25e 100755 --- a/connections/file/pom.xml +++ b/connections/file/pom.xml @@ -17,22 +17,18 @@ org.keycloak keycloak-export-import-api - ${project.version} org.keycloak keycloak-export-import-single-file - ${project.version} org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.codehaus.jackson diff --git a/connections/infinispan/pom.xml b/connections/infinispan/pom.xml index ffa64dfcf9..8ad53749b4 100755 --- a/connections/infinispan/pom.xml +++ b/connections/infinispan/pom.xml @@ -17,12 +17,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.infinispan diff --git a/connections/jpa-liquibase/pom.xml b/connections/jpa-liquibase/pom.xml index cf520671c2..0da5e9e6b2 100755 --- a/connections/jpa-liquibase/pom.xml +++ b/connections/jpa-liquibase/pom.xml @@ -17,12 +17,10 @@ org.keycloak keycloak-connections-jpa - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.liquibase @@ -41,7 +39,10 @@ org.keycloak keycloak-services - ${project.version} + + + com.h2database + h2 @@ -63,13 +64,6 @@ ${username} ${password} - - - com.h2database - h2 - ${h2.version} - - diff --git a/connections/jpa/pom.xml b/connections/jpa/pom.xml index 4e15dff906..680fc051d0 100755 --- a/connections/jpa/pom.xml +++ b/connections/jpa/pom.xml @@ -17,12 +17,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.hibernate.javax.persistence @@ -32,7 +30,6 @@ org.hibernate hibernate-entitymanager - ${hibernate.entitymanager.version} provided diff --git a/connections/mongo-update/pom.xml b/connections/mongo-update/pom.xml index 18522fddc3..a59eff5804 100755 --- a/connections/mongo-update/pom.xml +++ b/connections/mongo-update/pom.xml @@ -17,17 +17,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-connections-mongo - ${project.version} org.mongodb diff --git a/connections/mongo/pom.xml b/connections/mongo/pom.xml index 918c3efeed..3b0c353a2d 100755 --- a/connections/mongo/pom.xml +++ b/connections/mongo/pom.xml @@ -17,12 +17,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.mongodb diff --git a/core-jaxrs/pom.xml b/core-jaxrs/pom.xml index d2c6a7015c..4b6a3ea2ad 100755 --- a/core-jaxrs/pom.xml +++ b/core-jaxrs/pom.xml @@ -22,7 +22,6 @@ org.keycloak keycloak-core - ${project.version} provided diff --git a/core/pom.xml b/core/pom.xml index 5e34dd9119..497505a007 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -56,12 +56,6 @@ junit test - - com.nimbusds - nimbus-jose-jwt - 3.9 - test - diff --git a/core/src/test/java/org/keycloak/jose/jwk/JWKBuilderTest.java b/core/src/test/java/org/keycloak/jose/jwk/JWKBuilderTest.java index 7b6a8612b8..52a0c1f33b 100644 --- a/core/src/test/java/org/keycloak/jose/jwk/JWKBuilderTest.java +++ b/core/src/test/java/org/keycloak/jose/jwk/JWKBuilderTest.java @@ -1,21 +1,12 @@ package org.keycloak.jose.jwk; -import com.nimbusds.jose.jwk.RSAKey; import org.junit.Test; -import org.keycloak.jose.jws.Algorithm; -import org.keycloak.util.Base64Url; import org.keycloak.util.JsonSerialization; -import sun.security.rsa.RSAPublicKeyImpl; -import java.math.BigInteger; -import java.security.KeyFactory; -import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; -import java.security.interfaces.RSAPublicKey; import java.security.spec.InvalidKeySpecException; -import java.security.spec.RSAPublicKeySpec; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -46,9 +37,6 @@ public class JWKBuilderTest { // Parse assertArrayEquals(publicKey.getEncoded(), JWKParser.create().parse(jwkJson).toPublicKey().getEncoded()); - - // Parse with 3rd party lib - assertArrayEquals(publicKey.getEncoded(), RSAKey.parse(jwkJson).toRSAPublicKey().getEncoded()); } @Test diff --git a/dependencies/server-all/pom.xml b/dependencies/server-all/pom.xml index d124ea5447..a2e06953bc 100755 --- a/dependencies/server-all/pom.xml +++ b/dependencies/server-all/pom.xml @@ -18,100 +18,81 @@ org.keycloak keycloak-dependencies-server-min - ${project.version} pom org.keycloak keycloak-connections-jpa - ${project.version} org.keycloak keycloak-connections-jpa-liquibase - ${project.version} org.keycloak keycloak-connections-infinispan - ${project.version} org.keycloak keycloak-model-jpa - ${project.version} org.keycloak keycloak-model-file - ${project.version} org.keycloak keycloak-model-sessions-mem - ${project.version} org.keycloak keycloak-model-sessions-jpa - ${project.version} org.keycloak keycloak-model-sessions-mongo - ${project.version} org.keycloak keycloak-model-sessions-infinispan - ${project.version} org.keycloak keycloak-invalidation-cache-infinispan - ${project.version} org.keycloak keycloak-events-jpa - ${project.version} org.keycloak keycloak-events-jboss-logging - ${project.version} org.keycloak keycloak-events-email - ${project.version} org.keycloak keycloak-broker-oidc - ${project.version} org.keycloak keycloak-broker-saml - ${project.version} org.keycloak keycloak-social-github - ${project.version} org.keycloak keycloak-social-google - ${project.version} org.keycloak keycloak-social-twitter - ${project.version} org.twitter4j @@ -120,69 +101,52 @@ org.keycloak keycloak-social-facebook - ${project.version} org.keycloak keycloak-social-linkedin - ${project.version} org.keycloak keycloak-social-stackoverflow - ${project.version} org.keycloak keycloak-ldap-federation - ${project.version} org.keycloak keycloak-kerberos-federation - ${project.version} org.keycloak keycloak-saml-core - ${project.version} org.keycloak keycloak-saml-protocol - ${project.version} - org.keycloak keycloak-connections-mongo - ${project.version} org.keycloak keycloak-connections-mongo-update - ${project.version} org.keycloak keycloak-model-mongo - ${project.version} org.keycloak keycloak-events-mongo - ${project.version} org.mongodb @@ -193,7 +157,6 @@ org.keycloak keycloak-export-import-zip - ${project.version} de.idyl diff --git a/dependencies/server-min/pom.xml b/dependencies/server-min/pom.xml index 55ceeae975..aa886a629a 100755 --- a/dependencies/server-min/pom.xml +++ b/dependencies/server-min/pom.xml @@ -18,7 +18,6 @@ org.keycloak keycloak-core - ${project.version} net.iharder @@ -35,12 +34,10 @@ org.keycloak keycloak-core-jaxrs - ${project.version} org.keycloak keycloak-services - ${project.version} com.google.zxing @@ -49,46 +46,38 @@ org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-invalidation-cache-model - ${project.version} org.keycloak keycloak-events-api - ${project.version} org.keycloak keycloak-events-jpa - ${project.version} org.keycloak keycloak-events-jboss-logging - ${project.version} org.keycloak keycloak-js-adapter - ${project.version} org.keycloak keycloak-social-core - ${project.version} org.keycloak keycloak-forms-common-freemarker - ${project.version} org.freemarker @@ -97,66 +86,54 @@ org.keycloak keycloak-forms-common-themes - ${project.version} org.keycloak keycloak-account-api - ${project.version} org.keycloak keycloak-account-freemarker - ${project.version} org.keycloak keycloak-email-api - ${project.version} org.keycloak keycloak-email-freemarker - ${project.version} org.keycloak keycloak-login-api - ${project.version} org.keycloak keycloak-login-freemarker - ${project.version} org.keycloak keycloak-timer-api - ${project.version} org.keycloak keycloak-timer-basic - ${project.version} org.keycloak keycloak-export-import-api - ${project.version} org.keycloak keycloak-export-import-dir - ${project.version} org.keycloak keycloak-export-import-single-file - ${project.version} diff --git a/distribution/as7-adapter-zip/assembly.xml b/distribution/adapters/as7-adapter-zip/assembly.xml similarity index 100% rename from distribution/as7-adapter-zip/assembly.xml rename to distribution/adapters/as7-adapter-zip/assembly.xml diff --git a/distribution/as7-adapter-zip/pom.xml b/distribution/adapters/as7-adapter-zip/pom.xml similarity index 89% rename from distribution/as7-adapter-zip/pom.xml rename to distribution/adapters/as7-adapter-zip/pom.xml index 48429c6fc8..464ee6c3fe 100755 --- a/distribution/as7-adapter-zip/pom.xml +++ b/distribution/adapters/as7-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-as7-adapter-dist @@ -17,7 +17,11 @@ org.keycloak keycloak-as7-adapter - ${project.version} + + + org.keycloak + keycloak-jboss-modules + zip @@ -25,7 +29,6 @@ org.apache.maven.plugins maven-dependency-plugin - unpack @@ -38,7 +41,6 @@ org.keycloak keycloak-jboss-modules - ${project.version} zip ${project.build.directory}/unpacked @@ -49,7 +51,6 @@ maven-assembly-plugin - 2.4 assemble diff --git a/distribution/eap6-adapter-zip/assembly.xml b/distribution/adapters/eap6-adapter-zip/assembly.xml similarity index 100% rename from distribution/eap6-adapter-zip/assembly.xml rename to distribution/adapters/eap6-adapter-zip/assembly.xml diff --git a/distribution/eap6-adapter-zip/pom.xml b/distribution/adapters/eap6-adapter-zip/pom.xml similarity index 89% rename from distribution/eap6-adapter-zip/pom.xml rename to distribution/adapters/eap6-adapter-zip/pom.xml index bca84dfc21..4a44e076f6 100755 --- a/distribution/eap6-adapter-zip/pom.xml +++ b/distribution/adapters/eap6-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-eap6-adapter-dist @@ -17,7 +17,11 @@ org.keycloak keycloak-as7-adapter - ${project.version} + + + org.keycloak + keycloak-jboss-modules + zip @@ -25,7 +29,6 @@ org.apache.maven.plugins maven-dependency-plugin - unpack @@ -38,7 +41,6 @@ org.keycloak keycloak-jboss-modules - ${project.version} zip ${project.build.directory}/unpacked @@ -49,7 +51,6 @@ maven-assembly-plugin - 2.4 assemble diff --git a/distribution/jetty81-adapter-zip/assembly.xml b/distribution/adapters/jetty81-adapter-zip/assembly.xml similarity index 100% rename from distribution/jetty81-adapter-zip/assembly.xml rename to distribution/adapters/jetty81-adapter-zip/assembly.xml diff --git a/distribution/jetty81-adapter-zip/pom.xml b/distribution/adapters/jetty81-adapter-zip/pom.xml similarity index 90% rename from distribution/jetty81-adapter-zip/pom.xml rename to distribution/adapters/jetty81-adapter-zip/pom.xml index d93ffb8669..317d4f7243 100755 --- a/distribution/jetty81-adapter-zip/pom.xml +++ b/distribution/adapters/jetty81-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-jetty81-adapter-dist @@ -17,14 +17,12 @@ org.keycloak keycloak-jetty81-adapter - ${project.version} maven-assembly-plugin - 2.4 assemble diff --git a/distribution/jetty91-adapter-zip/assembly.xml b/distribution/adapters/jetty91-adapter-zip/assembly.xml similarity index 100% rename from distribution/jetty91-adapter-zip/assembly.xml rename to distribution/adapters/jetty91-adapter-zip/assembly.xml diff --git a/distribution/jetty91-adapter-zip/keycloak.mod b/distribution/adapters/jetty91-adapter-zip/keycloak.mod similarity index 100% rename from distribution/jetty91-adapter-zip/keycloak.mod rename to distribution/adapters/jetty91-adapter-zip/keycloak.mod diff --git a/distribution/jetty91-adapter-zip/pom.xml b/distribution/adapters/jetty91-adapter-zip/pom.xml similarity index 90% rename from distribution/jetty91-adapter-zip/pom.xml rename to distribution/adapters/jetty91-adapter-zip/pom.xml index 1e099d57f1..478f4a241a 100755 --- a/distribution/jetty91-adapter-zip/pom.xml +++ b/distribution/adapters/jetty91-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-jetty91-adapter-dist @@ -17,14 +17,12 @@ org.keycloak keycloak-jetty91-adapter - ${project.version} maven-assembly-plugin - 2.4 assemble diff --git a/distribution/jetty92-adapter-zip/assembly.xml b/distribution/adapters/jetty92-adapter-zip/assembly.xml similarity index 100% rename from distribution/jetty92-adapter-zip/assembly.xml rename to distribution/adapters/jetty92-adapter-zip/assembly.xml diff --git a/distribution/jetty92-adapter-zip/keycloak.mod b/distribution/adapters/jetty92-adapter-zip/keycloak.mod similarity index 100% rename from distribution/jetty92-adapter-zip/keycloak.mod rename to distribution/adapters/jetty92-adapter-zip/keycloak.mod diff --git a/distribution/jetty92-adapter-zip/pom.xml b/distribution/adapters/jetty92-adapter-zip/pom.xml similarity index 90% rename from distribution/jetty92-adapter-zip/pom.xml rename to distribution/adapters/jetty92-adapter-zip/pom.xml index c85bbebfe3..f0757278b7 100755 --- a/distribution/jetty92-adapter-zip/pom.xml +++ b/distribution/adapters/jetty92-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-jetty92-adapter-dist @@ -17,14 +17,12 @@ org.keycloak keycloak-jetty92-adapter - ${project.version} maven-assembly-plugin - 2.4 assemble diff --git a/distribution/js-adapter-zip/assembly.xml b/distribution/adapters/js-adapter-zip/assembly.xml similarity index 100% rename from distribution/js-adapter-zip/assembly.xml rename to distribution/adapters/js-adapter-zip/assembly.xml diff --git a/distribution/js-adapter-zip/pom.xml b/distribution/adapters/js-adapter-zip/pom.xml similarity index 91% rename from distribution/js-adapter-zip/pom.xml rename to distribution/adapters/js-adapter-zip/pom.xml index 7b56afff38..7a53e76d0c 100755 --- a/distribution/js-adapter-zip/pom.xml +++ b/distribution/adapters/js-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-js-adapter-dist @@ -20,7 +20,6 @@ org.apache.maven.plugins maven-dependency-plugin - unpack @@ -33,7 +32,6 @@ org.keycloak keycloak-js-adapter - ${project.version} ${project.build.directory}/unpacked/js-adapter *.js @@ -45,7 +43,6 @@ maven-assembly-plugin - 2.4 assemble diff --git a/distribution/osgi/features/pom.xml b/distribution/adapters/osgi/features/pom.xml similarity index 97% rename from distribution/osgi/features/pom.xml rename to distribution/adapters/osgi/features/pom.xml index 3426e39deb..888b460eac 100755 --- a/distribution/osgi/features/pom.xml +++ b/distribution/adapters/osgi/features/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + ../../../../pom.xml Keycloak OSGI Features diff --git a/distribution/osgi/features/src/main/resources/features.xml b/distribution/adapters/osgi/features/src/main/resources/features.xml similarity index 100% rename from distribution/osgi/features/src/main/resources/features.xml rename to distribution/adapters/osgi/features/src/main/resources/features.xml diff --git a/distribution/osgi/jaas/pom.xml b/distribution/adapters/osgi/jaas/pom.xml similarity index 96% rename from distribution/osgi/jaas/pom.xml rename to distribution/adapters/osgi/jaas/pom.xml index db7ac4f7e1..eed5d6dc0a 100755 --- a/distribution/osgi/jaas/pom.xml +++ b/distribution/adapters/osgi/jaas/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + ../../../../pom.xml Keycloak OSGI JAAS Realm Configuration @@ -28,7 +28,6 @@ org.keycloak keycloak-adapter-core - ${project.version} diff --git a/distribution/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/distribution/adapters/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml similarity index 100% rename from distribution/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml rename to distribution/adapters/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml diff --git a/distribution/osgi/pom.xml b/distribution/adapters/osgi/pom.xml similarity index 92% rename from distribution/osgi/pom.xml rename to distribution/adapters/osgi/pom.xml index 336ec7ad95..29b94f98db 100755 --- a/distribution/osgi/pom.xml +++ b/distribution/adapters/osgi/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml Keycloak OSGI Integration diff --git a/distribution/osgi/thirdparty/pom.xml b/distribution/adapters/osgi/thirdparty/pom.xml similarity index 98% rename from distribution/osgi/thirdparty/pom.xml rename to distribution/adapters/osgi/thirdparty/pom.xml index 8d7004574a..f2d35bebd6 100755 --- a/distribution/osgi/thirdparty/pom.xml +++ b/distribution/adapters/osgi/thirdparty/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + ../../../../pom.xml Keycloak OSGI Thirdparty diff --git a/distribution/osgi/thirdparty/src/main/resources/.gitignore b/distribution/adapters/osgi/thirdparty/src/main/resources/.gitignore similarity index 100% rename from distribution/osgi/thirdparty/src/main/resources/.gitignore rename to distribution/adapters/osgi/thirdparty/src/main/resources/.gitignore diff --git a/distribution/adapters/pom.xml b/distribution/adapters/pom.xml new file mode 100755 index 0000000000..2a975c2f1b --- /dev/null +++ b/distribution/adapters/pom.xml @@ -0,0 +1,42 @@ + + + keycloak-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + ../../pom.xml + + + Adapters Distribution Parent + + 4.0.0 + + keycloak-adapters-distribution-parent + pom + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + + as7-adapter-zip + eap6-adapter-zip + jetty81-adapter-zip + jetty91-adapter-zip + jetty92-adapter-zip + js-adapter-zip + osgi + tomcat6-adapter-zip + tomcat7-adapter-zip + tomcat8-adapter-zip + wildfly-adapter-zip + + diff --git a/distribution/tomcat6-adapter-zip/assembly.xml b/distribution/adapters/tomcat6-adapter-zip/assembly.xml similarity index 100% rename from distribution/tomcat6-adapter-zip/assembly.xml rename to distribution/adapters/tomcat6-adapter-zip/assembly.xml diff --git a/distribution/tomcat6-adapter-zip/pom.xml b/distribution/adapters/tomcat6-adapter-zip/pom.xml similarity index 90% rename from distribution/tomcat6-adapter-zip/pom.xml rename to distribution/adapters/tomcat6-adapter-zip/pom.xml index cd55b1a2d6..a6875b5048 100755 --- a/distribution/tomcat6-adapter-zip/pom.xml +++ b/distribution/adapters/tomcat6-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-tomcat6-adapter-dist @@ -17,14 +17,12 @@ org.keycloak keycloak-tomcat6-adapter - ${project.version} maven-assembly-plugin - 2.4 assemble diff --git a/distribution/tomcat7-adapter-zip/assembly.xml b/distribution/adapters/tomcat7-adapter-zip/assembly.xml similarity index 100% rename from distribution/tomcat7-adapter-zip/assembly.xml rename to distribution/adapters/tomcat7-adapter-zip/assembly.xml diff --git a/distribution/tomcat7-adapter-zip/pom.xml b/distribution/adapters/tomcat7-adapter-zip/pom.xml similarity index 90% rename from distribution/tomcat7-adapter-zip/pom.xml rename to distribution/adapters/tomcat7-adapter-zip/pom.xml index c871535d8a..3ee04adc23 100755 --- a/distribution/tomcat7-adapter-zip/pom.xml +++ b/distribution/adapters/tomcat7-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-tomcat7-adapter-dist @@ -17,14 +17,12 @@ org.keycloak keycloak-tomcat7-adapter - ${project.version} maven-assembly-plugin - 2.4 assemble diff --git a/distribution/tomcat8-adapter-zip/assembly.xml b/distribution/adapters/tomcat8-adapter-zip/assembly.xml similarity index 100% rename from distribution/tomcat8-adapter-zip/assembly.xml rename to distribution/adapters/tomcat8-adapter-zip/assembly.xml diff --git a/distribution/tomcat8-adapter-zip/pom.xml b/distribution/adapters/tomcat8-adapter-zip/pom.xml similarity index 90% rename from distribution/tomcat8-adapter-zip/pom.xml rename to distribution/adapters/tomcat8-adapter-zip/pom.xml index 827d1b67d2..e30ca3577c 100755 --- a/distribution/tomcat8-adapter-zip/pom.xml +++ b/distribution/adapters/tomcat8-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-tomcat8-adapter-dist @@ -17,14 +17,12 @@ org.keycloak keycloak-tomcat8-adapter - ${project.version} maven-assembly-plugin - 2.4 assemble diff --git a/distribution/wildfly-adapter-zip/assembly.xml b/distribution/adapters/wildfly-adapter-zip/assembly.xml similarity index 100% rename from distribution/wildfly-adapter-zip/assembly.xml rename to distribution/adapters/wildfly-adapter-zip/assembly.xml diff --git a/distribution/wildfly-adapter-zip/pom.xml b/distribution/adapters/wildfly-adapter-zip/pom.xml similarity index 88% rename from distribution/wildfly-adapter-zip/pom.xml rename to distribution/adapters/wildfly-adapter-zip/pom.xml index f1365cdb09..d57dd5b5ab 100755 --- a/distribution/wildfly-adapter-zip/pom.xml +++ b/distribution/adapters/wildfly-adapter-zip/pom.xml @@ -5,7 +5,7 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + ../../../pom.xml keycloak-wildfly-adapter-dist @@ -13,12 +13,19 @@ Keycloak Wildfly Adapter Distro + + + org.keycloak + keycloak-jboss-modules + zip + + + org.apache.maven.plugins maven-dependency-plugin - unpack @@ -31,7 +38,6 @@ org.keycloak keycloak-jboss-modules - ${project.version} zip ${project.build.directory}/unpacked @@ -42,7 +48,6 @@ maven-assembly-plugin - 2.4 assemble diff --git a/distribution/appliance-dist/assembly.xml b/distribution/appliance-dist/assembly.xml deleted file mode 100755 index 12b626d73a..0000000000 --- a/distribution/appliance-dist/assembly.xml +++ /dev/null @@ -1,77 +0,0 @@ - - war-dist - - - zip - tar.gz - - true - - - - ${project.build.directory}/unpacked/examples - examples - - - ${project.build.directory}/unpacked/docs - docs - - - ${project.build.directory}/unpacked/wildfly-${wildfly.version} - keycloak - - **/*.sh - welcome-content/* - **/modules/system/layers/base/org/picketlink/** - **/modules/system/layers/base/org/jboss/as/cli/** - **/modules/system/layers/base/org/jboss/aesh/** - - - - ${project.build.directory}/unpacked/wildfly-${wildfly.version} - keycloak - - **/*.sh - - 0755 - - - ${project.build.directory}/unpacked/modules - keycloak/modules/system/layers/base - - - ${project.build.directory}/unpacked/deployments/auth-server.war/WEB-INF/classes/META-INF - - keycloak/standalone/configuration - - keycloak-server.json - - - - ${project.build.directory}/unpacked/themes - keycloak/standalone/configuration/themes - - - ${project.build.directory}/unpacked/adapter - keycloak - - - src/main/welcome-content - keycloak/welcome-content - - *.* - - - - - - - src/main/themes/README.txt - keycloak/standalone/configuration/themes - - - src/main/providers/README.txt - keycloak/standalone/configuration/providers - - - diff --git a/distribution/appliance-dist/pom.xml b/distribution/appliance-dist/pom.xml deleted file mode 100755 index 7ba2c085e5..0000000000 --- a/distribution/appliance-dist/pom.xml +++ /dev/null @@ -1,197 +0,0 @@ - - 4.0.0 - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - ../../pom.xml - - - keycloak-appliance-dist-all - pom - Keycloak Appliance Distribution - - - - - org.keycloak - keycloak-wildfly-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-as7-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-tomcat6-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-tomcat7-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-tomcat8-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-jetty81-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-jetty91-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-jetty92-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-eap6-adapter-dist - ${project.version} - zip - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - unpack - prepare-package - - unpack - - - - - org.keycloak - keycloak-war-deployment - ${project.version} - zip - ${project.build.directory}/unpacked - - - org.wildfly - wildfly-dist - ${wildfly.version} - zip - ${project.build.directory}/unpacked - - - org.keycloak - keycloak-examples-docs-dist - ${project.version} - zip - ${project.build.directory}/unpacked - - - org.keycloak - keycloak-example-themes-dist - ${project.version} - zip - ${project.build.directory}/unpacked - - - org.keycloak - keycloak-wildfly-adapter-dist - ${project.version} - zip - ${project.build.directory}/unpacked/adapter - - - org.keycloak - keycloak-js-adapter - ${project.version} - ${project.build.directory}/unpacked/js-adapter - *.js - - - org.keycloak - keycloak-jboss-modules - ${project.version} - zip - ${project.build.directory}/unpacked/modules - - - **/welcome-content/* - - - - - - org.codehaus.mojo - xml-maven-plugin - 1.0 - - - generate-resources - package - - transform - - - - - ${project.build.directory}/unpacked/wildfly-${wildfly.version}/standalone/configuration - src/main/xslt/standalone.xsl - - standalone*.xml - - ${project.build.directory}/unpacked/wildfly-${wildfly.version}/standalone/configuration - - - ${project.build.directory} - - - - - - maven-assembly-plugin - 2.4 - - - assemble - package - - single - - - - assembly.xml - - - target - - - target/assembly/work - - false - - - - - - - - diff --git a/distribution/theme-template-zip/assembly.xml b/distribution/examples-dist/assembly.xml similarity index 62% rename from distribution/theme-template-zip/assembly.xml rename to distribution/examples-dist/assembly.xml index e0ff9e1be9..a8c9ab2207 100755 --- a/distribution/theme-template-zip/assembly.xml +++ b/distribution/examples-dist/assembly.xml @@ -1,15 +1,15 @@ - war-dist + examples zip - false + true - target/themes - themes + target/examples + **/.svn/** **/target/** diff --git a/distribution/examples-docs-zip/build.xml b/distribution/examples-dist/build.xml similarity index 100% rename from distribution/examples-docs-zip/build.xml rename to distribution/examples-dist/build.xml diff --git a/distribution/examples-docs-zip/index.html b/distribution/examples-dist/index.html similarity index 100% rename from distribution/examples-docs-zip/index.html rename to distribution/examples-dist/index.html diff --git a/distribution/theme-template-zip/pom.xml b/distribution/examples-dist/pom.xml similarity index 92% rename from distribution/theme-template-zip/pom.xml rename to distribution/examples-dist/pom.xml index cdfe25f97e..5f5cad366b 100755 --- a/distribution/theme-template-zip/pom.xml +++ b/distribution/examples-dist/pom.xml @@ -8,14 +8,15 @@ ../../pom.xml - keycloak-example-themes-dist + keycloak-examples-dist pom - Keycloak Example Themes + Keycloak Examples Distribution + keycloak-examples-${project.version} org.apache.maven.plugins @@ -27,7 +28,6 @@ org.apache.maven.plugins maven-antrun-plugin - 1.7 false @@ -58,12 +58,9 @@ - - maven-assembly-plugin - 2.4 assemble diff --git a/distribution/examples-docs-zip/assembly.xml b/distribution/examples-docs-zip/assembly.xml deleted file mode 100755 index 117ce6e331..0000000000 --- a/distribution/examples-docs-zip/assembly.xml +++ /dev/null @@ -1,46 +0,0 @@ - - war-dist - - - zip - - false - - - - ../../ - - License.html - - - - - . - - index.html - - docs - - - ../../target/site/apidocs - docs/javadocs - - - ../../services/target/site/apidocs - docs/rest-api - - - ../../docbook/target/docbook/publish/en-US - docs/userguide - - - target/examples - examples - - **/.svn/** - **/target/** - **/*.iml - - - - diff --git a/distribution/examples-docs-zip/pom.xml b/distribution/examples-docs-zip/pom.xml deleted file mode 100755 index ba9325dd2d..0000000000 --- a/distribution/examples-docs-zip/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - 4.0.0 - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - ../../pom.xml - - - keycloak-examples-docs-dist - pom - Keycloak Examples and Doc Distribution - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.7 - false - - - build-example - - run - - compile - - - - - - - - - - - - ant-contrib - ant-contrib - 1.0b3 - - - ant - ant - - - - - - - - - maven-assembly-plugin - 2.4 - - - assemble - package - - single - - - - assembly.xml - - - target - - - target/assembly/work - - false - - - - - - - - diff --git a/distribution/modules/build.xml b/distribution/modules/build.xml index df4bef5917..091cf96e19 100755 --- a/distribution/modules/build.xml +++ b/distribution/modules/build.xml @@ -267,6 +267,7 @@ + @@ -306,23 +307,10 @@ - - - - - - - - - - - - - @@ -350,39 +338,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/distribution/modules/pom.xml b/distribution/modules/pom.xml index e95c8eebef..5da3a2e4eb 100755 --- a/distribution/modules/pom.xml +++ b/distribution/modules/pom.xml @@ -20,131 +20,53 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.keycloak keycloak-wildfly-extensions - ${project.version} org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-core-jaxrs - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-jboss-adapter-core - ${project.version} org.keycloak keycloak-as7-adapter - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-wildfly-adapter - ${project.version} org.keycloak keycloak-subsystem - ${project.version} org.keycloak.subsystem keycloak-server - ${project.version} war org.keycloak keycloak-as7-subsystem - ${project.version} - - org.wildfly.core - wildfly-cli - - - org.picketlink - picketlink-common - - - org.picketlink - picketlink-idm-api - - - org.picketlink - picketlink-idm-impl - - - org.picketlink - picketlink-federation - - - - - org.picketlink - picketlink-wildfly-common - - - - - org.picketlink - picketlink-tomcat-common - - - org.picketlink - picketlink-tomcat5-single - - - org.picketlink - picketlink-jbas-common - - - org.picketlink - picketlink-jbas7-single - - - - org.picketlink - picketlink-idm-simple-schema - - - org.picketlink - picketlink-config - - - org.picketlink - picketlink-api - - - org.picketlink - picketlink-impl - - - org.jboss.aesh - aesh - - @@ -159,7 +81,6 @@ org.apache.maven.plugins maven-antrun-plugin - 1.7 false @@ -213,7 +134,6 @@ maven-assembly-plugin - 2.4 assemble @@ -251,7 +171,6 @@ org.keycloak.subsystem keycloak-server - ${project.version} war true ${project.build.directory}/modules/org/keycloak/keycloak-subsystem/main/auth-server diff --git a/distribution/modules/src/main/resources/modules/org/jboss/aesh/main/module.xml b/distribution/modules/src/main/resources/modules/org/jboss/aesh/main/module.xml deleted file mode 100755 index 6fe34f6f22..0000000000 --- a/distribution/modules/src/main/resources/modules/org/jboss/aesh/main/module.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/distribution/modules/src/main/resources/modules/org/jboss/as/cli/main/module.xml b/distribution/modules/src/main/resources/modules/org/jboss/as/cli/main/module.xml deleted file mode 100644 index 59cb8c7378..0000000000 --- a/distribution/modules/src/main/resources/modules/org/jboss/as/cli/main/module.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/common/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/common/main/module.xml deleted file mode 100755 index 6602ccfbc9..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/common/main/module.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/config/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/config/main/module.xml deleted file mode 100755 index 9afbd36cf7..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/config/main/module.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/core/api/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/core/api/main/module.xml deleted file mode 100755 index eb6241774c..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/core/api/main/module.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/core/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/core/main/module.xml deleted file mode 100755 index c9aad28ea1..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/core/main/module.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/federation/bindings/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/federation/bindings/main/module.xml deleted file mode 100755 index d726a187cd..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/federation/bindings/main/module.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/federation/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/federation/main/module.xml deleted file mode 100755 index 105d34b163..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/federation/main/module.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/idm/api/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/idm/api/main/module.xml deleted file mode 100755 index 9c840ba9b1..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/idm/api/main/module.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/idm/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/idm/main/module.xml deleted file mode 100755 index 97a8a80ab7..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/idm/main/module.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/idm/schema/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/idm/schema/main/module.xml deleted file mode 100755 index a9bfe96816..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/idm/schema/main/module.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/distribution/modules/src/main/resources/modules/org/picketlink/main/module.xml b/distribution/modules/src/main/resources/modules/org/picketlink/main/module.xml deleted file mode 100644 index 2418940a90..0000000000 --- a/distribution/modules/src/main/resources/modules/org/picketlink/main/module.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/distribution/pom.xml b/distribution/pom.xml index a501572134..16cc9bee0c 100755 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -6,7 +6,7 @@ 1.2.0.RC1-SNAPSHOT ../pom.xml - Distribution + Distribution Parent 4.0.0 @@ -25,25 +25,13 @@ + adapters subsystem-war modules - as7-adapter-zip - tomcat6-adapter-zip - tomcat7-adapter-zip - tomcat8-adapter-zip - eap6-adapter-zip - wildfly-adapter-zip - jetty81-adapter-zip - jetty91-adapter-zip - jetty92-adapter-zip - js-adapter-zip - examples-docs-zip - theme-template-zip - war-zip - war-dist - osgi - proxy - appliance-dist + examples-dist + proxy-dist src-dist + server-overlay + server-dist diff --git a/distribution/proxy/assembly.xml b/distribution/proxy-dist/assembly.xml similarity index 90% rename from distribution/proxy/assembly.xml rename to distribution/proxy-dist/assembly.xml index f5f9a80af4..98956797ea 100755 --- a/distribution/proxy/assembly.xml +++ b/distribution/proxy-dist/assembly.xml @@ -1,10 +1,10 @@ - war-dist + proxy-dist zip - false + true diff --git a/distribution/proxy/pom.xml b/distribution/proxy-dist/pom.xml similarity index 91% rename from distribution/proxy/pom.xml rename to distribution/proxy-dist/pom.xml index 1ecb3309cf..c40103210e 100755 --- a/distribution/proxy/pom.xml +++ b/distribution/proxy-dist/pom.xml @@ -17,19 +17,18 @@ org.keycloak launcher - ${project.version} org.keycloak keycloak-proxy-server - ${project.version} + + keycloak-proxy-${project.version} maven-assembly-plugin - 2.4 assemble diff --git a/distribution/server-bundle-dist/assembly.xml b/distribution/server-bundle-dist/assembly.xml new file mode 100755 index 0000000000..1b4b99432e --- /dev/null +++ b/distribution/server-bundle-dist/assembly.xml @@ -0,0 +1,27 @@ + + server-bundle-dist + + + zip + tar.gz + dir + + true + + + + + org.keycloak:keycloak-server-dist:zip + + + true + + + + org.keycloak:keycloak-examples-dist:zip + + + true + + + diff --git a/distribution/server-bundle-dist/pom.xml b/distribution/server-bundle-dist/pom.xml new file mode 100755 index 0000000000..0328d1c0ad --- /dev/null +++ b/distribution/server-bundle-dist/pom.xml @@ -0,0 +1,56 @@ + + 4.0.0 + + keycloak-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + ../../pom.xml + + + keycloak-server-bundle-dist + pom + Keycloak Server Bundle Distribution + + + + + org.keycloak + keycloak-server-dist + zip + + + org.keycloak + keycloak-examples-dist + zip + + + + + keycloak-${project.version} + + + maven-assembly-plugin + + + assemble + package + + single + + + + assembly.xml + + target + target/assembly/work + false + gnu + + + + + + + + diff --git a/distribution/appliance-dist/src/main/providers/README.txt b/distribution/server-bundle-dist/src/main/providers/README.txt similarity index 100% rename from distribution/appliance-dist/src/main/providers/README.txt rename to distribution/server-bundle-dist/src/main/providers/README.txt diff --git a/distribution/appliance-dist/src/main/themes/README.txt b/distribution/server-bundle-dist/src/main/themes/README.txt similarity index 100% rename from distribution/appliance-dist/src/main/themes/README.txt rename to distribution/server-bundle-dist/src/main/themes/README.txt diff --git a/distribution/appliance-dist/src/main/welcome-content/index.html b/distribution/server-bundle-dist/src/main/welcome-content/index.html similarity index 100% rename from distribution/appliance-dist/src/main/welcome-content/index.html rename to distribution/server-bundle-dist/src/main/welcome-content/index.html diff --git a/distribution/appliance-dist/src/main/xslt/standalone.xsl b/distribution/server-bundle-dist/src/main/xslt/standalone.xsl similarity index 100% rename from distribution/appliance-dist/src/main/xslt/standalone.xsl rename to distribution/server-bundle-dist/src/main/xslt/standalone.xsl diff --git a/distribution/server-dist/assembly.xml b/distribution/server-dist/assembly.xml new file mode 100755 index 0000000000..03adcc2ab2 --- /dev/null +++ b/distribution/server-dist/assembly.xml @@ -0,0 +1,40 @@ + + server-dist + + + zip + tar.gz + + + true + + + + ${project.build.directory}/unpacked/wildfly-${wildfly.version} + + + **/*.sh + welcome-content/** + docs/** + + + + ${project.build.directory}/unpacked/wildfly-${wildfly.version} + + + **/*.sh + + 0755 + + + + + + + org.keycloak:keycloak-server-overlay:zip + + + true + + + diff --git a/distribution/server-dist/pom.xml b/distribution/server-dist/pom.xml new file mode 100755 index 0000000000..9eacd09fae --- /dev/null +++ b/distribution/server-dist/pom.xml @@ -0,0 +1,80 @@ + + 4.0.0 + + keycloak-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + ../../pom.xml + + + keycloak-server-dist + pom + Keycloak Server Distribution + + + + + org.keycloak + keycloak-server-overlay + zip + + + org.wildfly + wildfly-dist + zip + + + + + keycloak-${project.version} + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-wildfly + prepare-package + + unpack + + + + + org.wildfly + wildfly-dist + ${wildfly.version} + zip + ${project.build.directory}/unpacked + + + + + + + + maven-assembly-plugin + + + assemble + package + + single + + + + assembly.xml + + target + target/assembly/work + false + gnu + + + + + + + + diff --git a/distribution/server-dist/src/main/providers/README.txt b/distribution/server-dist/src/main/providers/README.txt new file mode 100644 index 0000000000..a6d523b43f --- /dev/null +++ b/distribution/server-dist/src/main/providers/README.txt @@ -0,0 +1,2 @@ +Any provider implementation jars and libraries in this folder will be loaded by Keycloak. See the providers +section in the documentation for more details. \ No newline at end of file diff --git a/distribution/server-dist/src/main/themes/README.txt b/distribution/server-dist/src/main/themes/README.txt new file mode 100644 index 0000000000..705b73ac69 --- /dev/null +++ b/distribution/server-dist/src/main/themes/README.txt @@ -0,0 +1,3 @@ +Themes to configure the look and feel of login pages and account management console. It's not recommended to +modify existing the built-in themes, instead you should create a new theme that extends a built-in theme. See the theme +section in the documentation for more details. \ No newline at end of file diff --git a/distribution/server-dist/src/main/welcome-content/index.html b/distribution/server-dist/src/main/welcome-content/index.html new file mode 100644 index 0000000000..ad7660ed03 --- /dev/null +++ b/distribution/server-dist/src/main/welcome-content/index.html @@ -0,0 +1,32 @@ + + + + + + Welcome to Keycloak + + + + + + diff --git a/distribution/server-dist/src/main/xslt/standalone.xsl b/distribution/server-dist/src/main/xslt/standalone.xsl new file mode 100755 index 0000000000..8973a4d71a --- /dev/null +++ b/distribution/server-dist/src/main/xslt/standalone.xsl @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE + h2 + + sa + sa + + + + + + + + + + + + true + auth + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/distribution/server-overlay/assembly.xml b/distribution/server-overlay/assembly.xml new file mode 100755 index 0000000000..88d8fe9d3f --- /dev/null +++ b/distribution/server-overlay/assembly.xml @@ -0,0 +1,83 @@ + + server-dist + + + zip + tar.gz + + false + + + + ${project.build.directory}/unpacked/wildfly-${wildfly.version} + + + **/standalone*.xml + + + + ${project.build.directory}/unpacked/docs + docs + + + ${project.build.directory}/unpacked/wildfly-${wildfly.version} + + + **/*.sh + + 0755 + + + ${project.build.directory}/unpacked/modules + modules/system/layers/base + + + ../../forms/common-themes/src/main/resources/theme + standalone/configuration/themes + + **/** + + + + src/main/welcome-content + welcome-content + + *.* + + + + ../../ + + License.html + + + + + ../../target/site/apidocs + docs/javadocs + + + ../../services/target/site/apidocs + docs/rest-api + + + ../../docbook/target/docbook/publish/en-US + docs/userguide + + + + + + ../subsystem-war/src/main/resources/META-INF/keycloak-server.json + standalone/configuration + + + src/main/themes/README.txt + standalone/configuration/themes + + + src/main/providers/README.txt + standalone/configuration/providers + + + diff --git a/distribution/server-overlay/pom.xml b/distribution/server-overlay/pom.xml new file mode 100755 index 0000000000..68a38a137c --- /dev/null +++ b/distribution/server-overlay/pom.xml @@ -0,0 +1,123 @@ + + 4.0.0 + + keycloak-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + ../../pom.xml + + + keycloak-server-overlay + pom + Keycloak Server Overlay + + + + + org.keycloak + keycloak-jboss-modules + zip + + + org.wildfly + wildfly-dist + zip + + + + + keycloak-${project.version} + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-standalone-xml + prepare-package + + unpack + + + + + org.wildfly + wildfly-dist + zip + ${project.build.directory}/unpacked + + + **/standalone*.xml + + + + unpack-module + prepare-package + + unpack + + + + + org.keycloak + keycloak-jboss-modules + zip + ${project.build.directory}/unpacked/modules + + + + + + + + org.codehaus.mojo + xml-maven-plugin + 1.0 + + + generate-resources + package + + transform + + + + + ${project.build.directory}/unpacked/wildfly-${wildfly.version}/standalone/configuration + src/main/xslt/standalone.xsl + + standalone*.xml + + ${project.build.directory}/unpacked/wildfly-${wildfly.version}/standalone/configuration + + + + + + + + maven-assembly-plugin + + + assemble + package + + single + + + + assembly.xml + + target + target/assembly/work + false + gnu + + + + + + + + diff --git a/distribution/server-overlay/src/main/providers/README.txt b/distribution/server-overlay/src/main/providers/README.txt new file mode 100644 index 0000000000..a6d523b43f --- /dev/null +++ b/distribution/server-overlay/src/main/providers/README.txt @@ -0,0 +1,2 @@ +Any provider implementation jars and libraries in this folder will be loaded by Keycloak. See the providers +section in the documentation for more details. \ No newline at end of file diff --git a/distribution/server-overlay/src/main/themes/README.txt b/distribution/server-overlay/src/main/themes/README.txt new file mode 100644 index 0000000000..705b73ac69 --- /dev/null +++ b/distribution/server-overlay/src/main/themes/README.txt @@ -0,0 +1,3 @@ +Themes to configure the look and feel of login pages and account management console. It's not recommended to +modify existing the built-in themes, instead you should create a new theme that extends a built-in theme. See the theme +section in the documentation for more details. \ No newline at end of file diff --git a/distribution/server-overlay/src/main/welcome-content/index.html b/distribution/server-overlay/src/main/welcome-content/index.html new file mode 100644 index 0000000000..ad7660ed03 --- /dev/null +++ b/distribution/server-overlay/src/main/welcome-content/index.html @@ -0,0 +1,32 @@ + + + + + + Welcome to Keycloak + + + + + + diff --git a/distribution/server-overlay/src/main/xslt/standalone.xsl b/distribution/server-overlay/src/main/xslt/standalone.xsl new file mode 100755 index 0000000000..8973a4d71a --- /dev/null +++ b/distribution/server-overlay/src/main/xslt/standalone.xsl @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE + h2 + + sa + sa + + + + + + + + + + + + true + auth + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/distribution/src-dist/pom.xml b/distribution/src-dist/pom.xml index 65ffb2470c..37775f4d31 100755 --- a/distribution/src-dist/pom.xml +++ b/distribution/src-dist/pom.xml @@ -13,9 +13,8 @@ Keycloak Source Distribution - - + keycloak-src-${project.version} org.apache.maven.plugins @@ -26,7 +25,6 @@ maven-assembly-plugin - 2.4 assemble diff --git a/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index aae18bf302..f44d7d67a0 100755 --- a/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -55,8 +55,6 @@ - - @@ -69,6 +67,7 @@ + \ No newline at end of file diff --git a/distribution/theme-template-zip/build.xml b/distribution/theme-template-zip/build.xml deleted file mode 100755 index 0e2103f994..0000000000 --- a/distribution/theme-template-zip/build.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/distribution/war-dist/assembly.xml b/distribution/war-dist/assembly.xml deleted file mode 100755 index 82ba96c4f8..0000000000 --- a/distribution/war-dist/assembly.xml +++ /dev/null @@ -1,73 +0,0 @@ - - war-dist - - - zip - tar.gz - - true - - - - ${project.build.directory}/unpacked - - - **/js-adapter/** - - - - - - - - true - false - - org.keycloak:keycloak-example-themes-dist:zip - - configuration - - - - diff --git a/distribution/war-dist/pom.xml b/distribution/war-dist/pom.xml deleted file mode 100755 index 6751546634..0000000000 --- a/distribution/war-dist/pom.xml +++ /dev/null @@ -1,157 +0,0 @@ - - 4.0.0 - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - ../../pom.xml - - - keycloak-war-dist-all - pom - Keycloak WAR Distribution - - - - - org.keycloak - keycloak-wildfly-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-as7-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-tomcat6-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-tomcat7-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-tomcat8-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-eap6-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-jetty81-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-jetty91-adapter-dist - ${project.version} - zip - - - org.keycloak - keycloak-jetty92-adapter-dist - ${project.version} - zip - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - unpack - prepare-package - - unpack - - - - - org.keycloak - keycloak-war-deployment - ${project.version} - zip - ${project.build.directory}/unpacked - - - - org.keycloak - keycloak-examples-docs-dist - ${project.version} - zip - ${project.build.directory}/unpacked - - - org.keycloak - keycloak-js-adapter - ${project.version} - ${project.build.directory}/unpacked/js-adapter - *.js - - - - - - - - maven-assembly-plugin - 2.4 - - - assemble - package - - single - - - - assembly.xml - - - target - - - target/assembly/work - - false - - - - - - - - diff --git a/distribution/war-zip/assembly.xml b/distribution/war-zip/assembly.xml deleted file mode 100755 index 124b455846..0000000000 --- a/distribution/war-zip/assembly.xml +++ /dev/null @@ -1,30 +0,0 @@ - - war-dist - - - zip - - false - - - - ${project.build.directory}/unpacked - - - - ${basedir} - - keycloak-ds.xml - auth-server.war.dodeploy - - deployments - - - ${project.build.directory}/unpacked/deployments/auth-server.war/WEB-INF/classes/META-INF - configuration - - keycloak-server.json - - - - diff --git a/distribution/war-zip/auth-server.war.dodeploy b/distribution/war-zip/auth-server.war.dodeploy deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/distribution/war-zip/keycloak-ds.xml b/distribution/war-zip/keycloak-ds.xml deleted file mode 100755 index a547c51809..0000000000 --- a/distribution/war-zip/keycloak-ds.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE - h2 - - sa - sa - - - \ No newline at end of file diff --git a/distribution/war-zip/pom.xml b/distribution/war-zip/pom.xml deleted file mode 100755 index 53461924bb..0000000000 --- a/distribution/war-zip/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - ../../pom.xml - - - keycloak-war-deployment - pom - Keycloak WAR Deployment For Wildfly/AS7/EAP - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - unpack - prepare-package - - unpack - - - - - org.keycloak - keycloak-server - ${project.version} - war - ${project.build.directory}/unpacked/deployments/auth-server.war - - - - - - - - maven-assembly-plugin - 2.4 - - - assemble - package - - single - - - - assembly.xml - - - target - - - target/assembly/work - - false - - - - - - - - diff --git a/events/api/pom.xml b/events/api/pom.xml index 7e45caf07c..bef416b0a6 100755 --- a/events/api/pom.xml +++ b/events/api/pom.xml @@ -21,13 +21,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided diff --git a/events/email/pom.xml b/events/email/pom.xml index 473831cd19..8391d5b6f8 100755 --- a/events/email/pom.xml +++ b/events/email/pom.xml @@ -16,25 +16,21 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided org.keycloak keycloak-email-api - ${project.version} provided diff --git a/events/jboss-logging/pom.xml b/events/jboss-logging/pom.xml index 0f407d4f96..9a3288dbe7 100755 --- a/events/jboss-logging/pom.xml +++ b/events/jboss-logging/pom.xml @@ -21,19 +21,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided diff --git a/events/jpa/pom.xml b/events/jpa/pom.xml index 888fa05eb1..900ab468b4 100755 --- a/events/jpa/pom.xml +++ b/events/jpa/pom.xml @@ -16,25 +16,21 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-connections-jpa - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided @@ -45,7 +41,6 @@ org.hibernate hibernate-entitymanager - ${hibernate.entitymanager.version} provided diff --git a/events/mongo/pom.xml b/events/mongo/pom.xml index 2d0f5d00f8..097eb7824a 100755 --- a/events/mongo/pom.xml +++ b/events/mongo/pom.xml @@ -16,25 +16,21 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-connections-mongo - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided diff --git a/events/syslog/pom.xml b/events/syslog/pom.xml index b6d7d574b3..91d2fbf261 100755 --- a/events/syslog/pom.xml +++ b/events/syslog/pom.xml @@ -16,25 +16,21 @@ org.syslog4j syslog4j - ${syslog4j.version} provided org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided diff --git a/examples/admin-client/pom.xml b/examples/admin-client/pom.xml index a2fba00376..e0e270f939 100755 --- a/examples/admin-client/pom.xml +++ b/examples/admin-client/pom.xml @@ -3,10 +3,9 @@ 4.0.0 - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Keycloak Examples - Admin Client @@ -21,7 +20,6 @@ org.keycloak keycloak-admin-client - ${project.version} @@ -42,13 +40,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - diff --git a/examples/basic-auth/pom.xml b/examples/basic-auth/pom.xml index 7dd5f91083..26d7c7fb5d 100755 --- a/examples/basic-auth/pom.xml +++ b/examples/basic-auth/pom.xml @@ -4,10 +4,9 @@ 4.0.0 - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Keycloak Examples - Basic Auth @@ -40,13 +39,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -74,21 +71,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/broker/facebook-authentication/pom.xml b/examples/broker/facebook-authentication/pom.xml index e7edbb0986..f6884d5468 100755 --- a/examples/broker/facebook-authentication/pom.xml +++ b/examples/broker/facebook-authentication/pom.xml @@ -4,10 +4,9 @@ 4.0.0 - keycloak-parent + keycloak-examples-broker-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Keycloak Broker Examples - Facebook Authentication @@ -43,21 +42,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/broker/google-authentication/pom.xml b/examples/broker/google-authentication/pom.xml index 8913c7fcbf..6060f3de24 100755 --- a/examples/broker/google-authentication/pom.xml +++ b/examples/broker/google-authentication/pom.xml @@ -4,10 +4,9 @@ 4.0.0 - keycloak-parent + keycloak-examples-broker-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Keycloak Broker Examples - Google Authentication @@ -43,21 +42,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/broker/pom.xml b/examples/broker/pom.xml index f06b50f2e3..be5e83f90a 100755 --- a/examples/broker/pom.xml +++ b/examples/broker/pom.xml @@ -1,29 +1,18 @@ - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + Broker Examples 4.0.0 - examples-broker-pom + keycloak-examples-broker-parent pom - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - facebook-authentication google-authentication diff --git a/examples/broker/saml-broker-authentication/pom.xml b/examples/broker/saml-broker-authentication/pom.xml index afec533110..e3945f573d 100755 --- a/examples/broker/saml-broker-authentication/pom.xml +++ b/examples/broker/saml-broker-authentication/pom.xml @@ -4,10 +4,9 @@ 4.0.0 - keycloak-parent + keycloak-examples-broker-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Keycloak Broker Examples - SAML Identity Provider Brokering @@ -43,21 +42,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/broker/twitter-authentication/pom.xml b/examples/broker/twitter-authentication/pom.xml index 7bc704f7c6..3e730b7cc0 100755 --- a/examples/broker/twitter-authentication/pom.xml +++ b/examples/broker/twitter-authentication/pom.xml @@ -4,10 +4,9 @@ 4.0.0 - keycloak-parent + keycloak-examples-broker-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Keycloak Broker Examples - Twitter Authentication @@ -30,7 +29,6 @@ org.keycloak keycloak-admin-client - ${project.version} org.twitter4j @@ -71,21 +69,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/cors/angular-product-app/pom.xml b/examples/cors/angular-product-app/pom.xml index f5f220ccaf..204f441c2c 100755 --- a/examples/cors/angular-product-app/pom.xml +++ b/examples/cors/angular-product-app/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-cors-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo cors-angular-product-example @@ -31,21 +31,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/cors/database-service/pom.xml b/examples/cors/database-service/pom.xml index ea50d1086f..6daa915a95 100755 --- a/examples/cors/database-service/pom.xml +++ b/examples/cors/database-service/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-cors-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo cors-database-service @@ -37,13 +37,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -71,21 +69,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/cors/pom.xml b/examples/cors/pom.xml index 8044e2fc9d..7fe7e75f6d 100755 --- a/examples/cors/pom.xml +++ b/examples/cors/pom.xml @@ -1,31 +1,22 @@ + - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + Keycloak Examples - CORS 4.0.0 - cors-exxample-pom + keycloak-examples-cors-parent pom - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - angular-product-app database-service + diff --git a/examples/demo-template/admin-access-app/pom.xml b/examples/demo-template/admin-access-app/pom.xml index de3e305ae2..293b79d9bd 100755 --- a/examples/demo-template/admin-access-app/pom.xml +++ b/examples/demo-template/admin-access-app/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo admin-access-example @@ -31,13 +31,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -65,21 +63,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/demo-template/angular-product-app/pom.xml b/examples/demo-template/angular-product-app/pom.xml index 69b4e9ca0f..42c4dd16f1 100755 --- a/examples/demo-template/angular-product-app/pom.xml +++ b/examples/demo-template/angular-product-app/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo angular-product-example @@ -31,21 +31,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/demo-template/customer-app-cli/pom.xml b/examples/demo-template/customer-app-cli/pom.xml index c86422e574..94970428f3 100755 --- a/examples/demo-template/customer-app-cli/pom.xml +++ b/examples/demo-template/customer-app-cli/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo customer-portal-cli-example @@ -18,7 +18,6 @@ org.keycloak keycloak-installed-adapter - ${project.version} org.jboss.logging @@ -28,21 +27,6 @@ - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - org.codehaus.mojo exec-maven-plugin diff --git a/examples/demo-template/customer-app-js/pom.xml b/examples/demo-template/customer-app-js/pom.xml index 7c67b07c65..fc2779aba0 100755 --- a/examples/demo-template/customer-app-js/pom.xml +++ b/examples/demo-template/customer-app-js/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo customer-portal-js-example @@ -31,21 +31,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/demo-template/customer-app/pom.xml b/examples/demo-template/customer-app/pom.xml index a50d9fea8f..de11a81e01 100755 --- a/examples/demo-template/customer-app/pom.xml +++ b/examples/demo-template/customer-app/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo customer-portal-example @@ -31,13 +31,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -65,21 +63,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/demo-template/database-service/pom.xml b/examples/demo-template/database-service/pom.xml index d68db7e4a9..60a508948d 100755 --- a/examples/demo-template/database-service/pom.xml +++ b/examples/demo-template/database-service/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo database-service @@ -37,13 +37,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -71,21 +69,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/demo-template/example-ear/pom.xml b/examples/demo-template/example-ear/pom.xml index 4673d6bbcf..1f37289ee3 100755 --- a/examples/demo-template/example-ear/pom.xml +++ b/examples/demo-template/example-ear/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo customer-portal-example-ear @@ -26,13 +26,11 @@ org.keycloak.example.demo customer-portal-example - ${project.version} war org.keycloak.example.demo product-portal-example - ${project.version} war @@ -60,13 +58,6 @@ - - org.apache.maven.plugins - maven-deploy-plugin - - true - - diff --git a/examples/demo-template/pom.xml b/examples/demo-template/pom.xml index d76a49e1f1..5ef9df3073 100755 --- a/examples/demo-template/pom.xml +++ b/examples/demo-template/pom.xml @@ -1,16 +1,16 @@ - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + Examples 4.0.0 - demo-pom + keycloak-examples-demo-parent pom diff --git a/examples/demo-template/product-app/pom.xml b/examples/demo-template/product-app/pom.xml index 627373b6fe..8b84a9302e 100755 --- a/examples/demo-template/product-app/pom.xml +++ b/examples/demo-template/product-app/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo product-portal-example @@ -31,13 +31,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -65,21 +63,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/demo-template/third-party-cdi/pom.xml b/examples/demo-template/third-party-cdi/pom.xml index 5dcdb54513..6a5e14b72c 100755 --- a/examples/demo-template/third-party-cdi/pom.xml +++ b/examples/demo-template/third-party-cdi/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo oauth-client-cdi-example @@ -42,19 +42,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided org.keycloak keycloak-servlet-oauth-client - ${project.version} org.apache.httpcomponents @@ -81,21 +78,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/demo-template/third-party/pom.xml b/examples/demo-template/third-party/pom.xml index e33d95991b..7090aea6e1 100755 --- a/examples/demo-template/third-party/pom.xml +++ b/examples/demo-template/third-party/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-demo-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo oauth-client-example @@ -24,19 +24,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided org.keycloak keycloak-servlet-oauth-client - ${project.version} org.apache.httpcomponents @@ -63,21 +60,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/fuse/camel/pom.xml b/examples/fuse/camel/pom.xml index b01d91de02..76681028b5 100755 --- a/examples/fuse/camel/pom.xml +++ b/examples/fuse/camel/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-fuse-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo camel-endpoint-example @@ -33,7 +33,6 @@ org.keycloak keycloak-core - ${project.version} org.apache.camel @@ -55,21 +54,6 @@ install - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - org.apache.felix maven-bundle-plugin diff --git a/examples/fuse/customer-app-fuse/pom.xml b/examples/fuse/customer-app-fuse/pom.xml index 41378c0b49..faf9436cc3 100755 --- a/examples/fuse/customer-app-fuse/pom.xml +++ b/examples/fuse/customer-app-fuse/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-fuse-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo customer-portal-fuse-example @@ -41,13 +41,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -61,21 +59,6 @@ customer-portal-fuse - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - org.apache.maven.plugins maven-war-plugin diff --git a/examples/fuse/cxf-jaxrs/pom.xml b/examples/fuse/cxf-jaxrs/pom.xml index a1e55980ec..b8a6985f63 100755 --- a/examples/fuse/cxf-jaxrs/pom.xml +++ b/examples/fuse/cxf-jaxrs/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-fuse-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo cxf-jaxrs-example @@ -54,21 +54,6 @@ install - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - org.apache.felix maven-bundle-plugin diff --git a/examples/fuse/cxf-jaxws/pom.xml b/examples/fuse/cxf-jaxws/pom.xml index 2e2f46624f..f06c9db822 100755 --- a/examples/fuse/cxf-jaxws/pom.xml +++ b/examples/fuse/cxf-jaxws/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-fuse-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo cxf-jaxws-example @@ -77,21 +77,6 @@ install - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - org.apache.felix maven-bundle-plugin diff --git a/examples/fuse/features/pom.xml b/examples/fuse/features/pom.xml index b4923a8795..1450761097 100755 --- a/examples/fuse/features/pom.xml +++ b/examples/fuse/features/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-fuse-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo keycloak-fuse-example-features @@ -21,13 +21,6 @@ - - org.apache.maven.plugins - maven-deploy-plugin - - true - - org.apache.maven.plugins maven-resources-plugin diff --git a/examples/fuse/pom.xml b/examples/fuse/pom.xml index 6eea11a93f..30e31bdcf1 100755 --- a/examples/fuse/pom.xml +++ b/examples/fuse/pom.xml @@ -1,30 +1,18 @@ - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + Fuse examples 4.0.0 - fuse-pom + keycloak-examples-fuse-parent pom - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - customer-app-fuse product-app-fuse diff --git a/examples/fuse/product-app-fuse/pom.xml b/examples/fuse/product-app-fuse/pom.xml index 4b07d22631..9523a35b4b 100755 --- a/examples/fuse/product-app-fuse/pom.xml +++ b/examples/fuse/product-app-fuse/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-fuse-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + 4.0.0 org.keycloak.example.demo product-portal-fuse-example @@ -41,14 +41,12 @@ org.keycloak keycloak-core - ${project.version} org.keycloak.example.demo cxf-jaxws-example - ${project.version} @@ -56,21 +54,6 @@ install - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - org.apache.felix maven-bundle-plugin diff --git a/examples/js-console/pom.xml b/examples/js-console/pom.xml index 330125813e..13419a71a0 100755 --- a/examples/js-console/pom.xml +++ b/examples/js-console/pom.xml @@ -2,11 +2,11 @@ - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + 4.0.0 org.keycloak.example.demo js-console @@ -31,21 +31,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/kerberos/pom.xml b/examples/kerberos/pom.xml index ffbedd9b6d..8dbab3f166 100755 --- a/examples/kerberos/pom.xml +++ b/examples/kerberos/pom.xml @@ -3,10 +3,9 @@ 4.0.0 - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Keycloak Examples - Kerberos Credential Delegation @@ -34,13 +33,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -62,21 +59,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - diff --git a/examples/multi-tenant/pom.xml b/examples/multi-tenant/pom.xml index 12c3c2d5e8..c74b5da520 100755 --- a/examples/multi-tenant/pom.xml +++ b/examples/multi-tenant/pom.xml @@ -2,10 +2,9 @@ 4.0.0 - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Keycloak Examples - Multi Tenant @@ -25,17 +24,6 @@ pom import - - - org.keycloak - keycloak-core - ${project.version} - - - org.keycloak - keycloak-adapter-core - ${project.version} - @@ -75,13 +63,6 @@ false - - org.apache.maven.plugins - maven-deploy-plugin - - true - - diff --git a/examples/pom.xml b/examples/pom.xml index 390fc45036..c4bff69079 100755 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,13 +4,13 @@ keycloak-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../pom.xml + Examples 4.0.0 - examples-pom + keycloak-examples-parent pom @@ -22,6 +22,13 @@ true + + org.apache.maven.plugins + maven-war-plugin + + false + + diff --git a/examples/providers/event-listener-sysout/pom.xml b/examples/providers/event-listener-sysout/pom.xml index 0f71426996..6174302a41 100755 --- a/examples/providers/event-listener-sysout/pom.xml +++ b/examples/providers/event-listener-sysout/pom.xml @@ -1,11 +1,11 @@ - keycloak-parent + keycloak-examples-providers-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + Event Listener System.out Example 4.0.0 @@ -17,32 +17,18 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-events-api - ${project.version} event-listener-sysout-example - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - diff --git a/examples/providers/event-store-mem/pom.xml b/examples/providers/event-store-mem/pom.xml index 9136ce54b8..3cc40562d1 100755 --- a/examples/providers/event-store-mem/pom.xml +++ b/examples/providers/event-store-mem/pom.xml @@ -1,11 +1,11 @@ - keycloak-parent + keycloak-examples-providers-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + Event Store In-Mem Example 4.0.0 @@ -17,32 +17,18 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-events-api - ${project.version} event-store-mem-example - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - diff --git a/examples/providers/federation-provider/pom.xml b/examples/providers/federation-provider/pom.xml index 2317523a2a..0fe81fe9d8 100755 --- a/examples/providers/federation-provider/pom.xml +++ b/examples/providers/federation-provider/pom.xml @@ -1,11 +1,11 @@ - keycloak-parent + keycloak-examples-providers-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../../pom.xml + Properties Authentication Provider Example 4.0.0 @@ -17,13 +17,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided @@ -35,14 +33,5 @@ federation-properties-example - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - diff --git a/examples/providers/pom.xml b/examples/providers/pom.xml index f27cd76fc7..cbd7efb7d0 100755 --- a/examples/providers/pom.xml +++ b/examples/providers/pom.xml @@ -1,31 +1,18 @@ - - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml Provider Examples 4.0.0 - examples-providers-pom + keycloak-examples-providers-parent pom - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - event-listener-sysout event-store-mem diff --git a/examples/saml/pom.xml b/examples/saml/pom.xml index 4a2ea5e62a..ce8579b76c 100755 --- a/examples/saml/pom.xml +++ b/examples/saml/pom.xml @@ -1,16 +1,16 @@ - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + Provider Examples 4.0.0 - examples-saml-pom + keycloak-examples-saml-parent pom diff --git a/examples/saml/post-basic/pom.xml b/examples/saml/post-basic/pom.xml index 07762a8910..7cb485b70c 100644 --- a/examples/saml/post-basic/pom.xml +++ b/examples/saml/post-basic/pom.xml @@ -2,46 +2,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.picketlink.quickstarts - picketlink-federation-saml-sp-post-basic - 2.7.0.Beta2 + + keycloak-examples-saml-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + + + keycloak-example-saml-federation-saml-sp-post-basic war - PicketLink Quickstart: picketlink-federation-saml-sp-post-basic - PicketLink Quickstart: PicketLink Service Provider With a Basic Configuration using SAML HTTP POST Binding - - http://www.picketlink.org - - - - Apache License, Version 2.0 - repo - http://www.apache.org/licenses/LICENSE-2.0.html - - - - - - 7.4.Final - - - 1.0.1.Final - - - 2.7.0.Beta2 - - - jboss-eap - - - 2.1.1 - - - 3.1 - 1.6 - 1.6 - + keycloak-example-saml-federation-saml-sp-post-basic @@ -49,51 +20,33 @@ maven-war-plugin - ${version.war.plugin} - false ${target.container} - - - ${basedir}/conf/${target.container} - - + + + ${basedir}/conf/${target.container} + + - org.jboss.as.plugins jboss-as-maven-plugin - ${version.jboss.maven.plugin} - ${project.build.finalName}-${target.container}.${project.packaging} + false + + + + org.wildfly.plugins + wildfly-maven-plugin + + false - - - wildfly - - wildfly - - - - - org.wildfly.plugins - wildfly-maven-plugin - ${version.wildfly.maven.plugin} - - ${project.build.finalName}-${target.container}.${project.packaging} - - - - - - - \ No newline at end of file diff --git a/examples/saml/post-with-encryption/pom.xml b/examples/saml/post-with-encryption/pom.xml index 497bea45e1..50f3108179 100755 --- a/examples/saml/post-with-encryption/pom.xml +++ b/examples/saml/post-with-encryption/pom.xml @@ -2,46 +2,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.picketlink.quickstarts - picketlink-federation-saml-sp-with-encryption - 2.7.0.Beta2 + + keycloak-examples-saml-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + + + keycloak-example-saml-post-with-encryption war - PicketLink Quickstart: picketlink-federation-saml-sp-with-encryption - PicketLink Quickstart: PicketLink Service Provider With a Basic Configuration using SAML HTTP POST Binding With Encryption Support - - http://www.picketlink.org - - - - Apache License, Version 2.0 - repo - http://www.apache.org/licenses/LICENSE-2.0.html - - - - - - 7.4.Final - - - 1.0.1.Final - - - 2.7.0.Beta2 - - - jboss-eap - - - 2.1.1 - - - 3.1 - 1.6 - 1.6 - + keycloak-example-saml-post-with-encryption @@ -57,7 +28,6 @@ maven-war-plugin - ${version.war.plugin} false @@ -80,37 +50,21 @@ - org.jboss.as.plugins jboss-as-maven-plugin - ${version.jboss.maven.plugin} - ${project.build.finalName}-${target.container}.${project.packaging} + false + + + + org.wildfly.plugins + wildfly-maven-plugin + + false - - - wildfly - - wildfly - - - - - org.wildfly.plugins - wildfly-maven-plugin - ${version.wildfly.maven.plugin} - - ${project.build.finalName}-${target.container}.${project.packaging} - - - - - - - \ No newline at end of file diff --git a/examples/saml/post-with-signature/pom.xml b/examples/saml/post-with-signature/pom.xml index 2c644a706a..9ea515df36 100755 --- a/examples/saml/post-with-signature/pom.xml +++ b/examples/saml/post-with-signature/pom.xml @@ -2,46 +2,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.picketlink.quickstarts - picketlink-federation-saml-sp-post-with-signature - 2.7.0.Beta2 + + keycloak-examples-saml-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + + + keycloak-example-saml-post-with-signature war - PicketLink Quickstart: picketlink-federation-saml-sp-post-with-signature - PicketLink Quickstart: PicketLink Service Provider With a Basic Configuration using SAML HTTP POST Binding With Signature Support - - http://www.picketlink.org - - - - Apache License, Version 2.0 - repo - http://www.apache.org/licenses/LICENSE-2.0.html - - - - - - 7.4.Final - - - 1.0.1.Final - - - 2.7.0.Beta2 - - - jboss-eap - - - 2.1.1 - - - 3.1 - 1.6 - 1.6 - + keycloak-example-saml-post-with-signature @@ -57,7 +28,6 @@ maven-war-plugin - ${version.war.plugin} false @@ -80,37 +50,21 @@ - org.jboss.as.plugins jboss-as-maven-plugin - ${version.jboss.maven.plugin} - ${project.build.finalName}-${target.container}.${project.packaging} + false + + + + org.wildfly.plugins + wildfly-maven-plugin + + false - - - wildfly - - wildfly - - - - - org.wildfly.plugins - wildfly-maven-plugin - ${version.wildfly.maven.plugin} - - ${project.build.finalName}-${target.container}.${project.packaging} - - - - - - - \ No newline at end of file diff --git a/examples/saml/redirect-basic/pom.xml b/examples/saml/redirect-basic/pom.xml index 98c3a40b62..3ca0bc54c3 100644 --- a/examples/saml/redirect-basic/pom.xml +++ b/examples/saml/redirect-basic/pom.xml @@ -2,46 +2,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.picketlink.quickstarts - picketlink-federation-saml-sp-redirect-basic - 2.7.0.Beta2 + + keycloak-examples-saml-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + + + keycloak-example-saml-redirect-basic war - PicketLink Quickstart: picketlink-federation-saml-sp-redirect-basic - PicketLink Quickstart: PicketLink Service Provider With a Basic Configuration using SAML HTTP Redirect Binding - - http://www.picketlink.org - - - - Apache License, Version 2.0 - repo - http://www.apache.org/licenses/LICENSE-2.0.html - - - - - - 7.4.Final - - - 1.0.1.Final - - - 2.7.0.Beta2 - - - jboss-eap - - - 2.1.1 - - - 3.1 - 1.6 - 1.6 - + keycloak-example-saml-redirect-basic @@ -49,7 +20,6 @@ maven-war-plugin - ${version.war.plugin} false @@ -66,37 +36,21 @@ - org.jboss.as.plugins jboss-as-maven-plugin - ${version.jboss.maven.plugin} - ${project.build.finalName}-${target.container}.${project.packaging} + false + + + + org.wildfly.plugins + wildfly-maven-plugin + + false - - - wildfly - - wildfly - - - - - org.wildfly.plugins - wildfly-maven-plugin - ${version.wildfly.maven.plugin} - - ${project.build.finalName}-${target.container}.${project.packaging} - - - - - - - \ No newline at end of file diff --git a/examples/saml/redirect-with-signature/pom.xml b/examples/saml/redirect-with-signature/pom.xml index d491d8ec89..a94f159cc6 100755 --- a/examples/saml/redirect-with-signature/pom.xml +++ b/examples/saml/redirect-with-signature/pom.xml @@ -2,46 +2,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.picketlink.quickstarts - picketlink-federation-saml-sp-redirect-with-signature - 2.7.0.Beta2 + + keycloak-examples-saml-parent + org.keycloak + 1.2.0.RC1-SNAPSHOT + + + keycloak-example-saml-redirect-with-signature war - PicketLink Quickstart: picketlink-federation-saml-sp-redirect-with-signature - PicketLink Quickstart: PicketLink Service Provider With a Basic Configuration using SAML HTTP Redirect Binding With Signature Support - - http://www.picketlink.org - - - - Apache License, Version 2.0 - repo - http://www.apache.org/licenses/LICENSE-2.0.html - - - - - - 7.4.Final - - - 1.0.1.Final - - - 2.7.0.Beta2 - - - jboss-eap - - - 2.1.1 - - - 3.1 - 1.6 - 1.6 - + keycloak-example-saml-redirect-with-signature @@ -57,7 +28,6 @@ maven-war-plugin - ${version.war.plugin} false @@ -80,37 +50,21 @@ - org.jboss.as.plugins jboss-as-maven-plugin - ${version.jboss.maven.plugin} - ${project.build.finalName}-${target.container}.${project.packaging} + false + + + + org.wildfly.plugins + wildfly-maven-plugin + + false - - - wildfly - - wildfly - - - - - org.wildfly.plugins - wildfly-maven-plugin - ${version.wildfly.maven.plugin} - - ${project.build.finalName}-${target.container}.${project.packaging} - - - - - - - \ No newline at end of file diff --git a/examples/themes/pom.xml b/examples/themes/pom.xml index 119e3f4c52..363b69d0c5 100755 --- a/examples/themes/pom.xml +++ b/examples/themes/pom.xml @@ -1,11 +1,11 @@ - keycloak-parent + keycloak-examples-parent org.keycloak 1.2.0.RC1-SNAPSHOT - ../../pom.xml + Themes Examples 4.0.0 @@ -15,16 +15,5 @@ keycloak-example-themes - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - diff --git a/export-import/export-import-api/pom.xml b/export-import/export-import-api/pom.xml index 0ff760baa0..6718c08357 100755 --- a/export-import/export-import-api/pom.xml +++ b/export-import/export-import-api/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-invalidation-cache-model - ${project.version} provided diff --git a/export-import/export-import-dir/pom.xml b/export-import/export-import-dir/pom.xml index ff7fac9f6c..f17882a79d 100755 --- a/export-import/export-import-dir/pom.xml +++ b/export-import/export-import-dir/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-export-import-api - ${project.version} provided diff --git a/export-import/export-import-single-file/pom.xml b/export-import/export-import-single-file/pom.xml index 9b84d6b0c2..56df327d44 100755 --- a/export-import/export-import-single-file/pom.xml +++ b/export-import/export-import-single-file/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-export-import-api - ${project.version} provided diff --git a/export-import/export-import-zip/pom.xml b/export-import/export-import-zip/pom.xml index 7571058795..9c9d6f53dd 100755 --- a/export-import/export-import-zip/pom.xml +++ b/export-import/export-import-zip/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-export-import-api - ${project.version} provided diff --git a/federation/kerberos/pom.xml b/federation/kerberos/pom.xml index a2f5bcef1e..4cb036cbd2 100755 --- a/federation/kerberos/pom.xml +++ b/federation/kerberos/pom.xml @@ -16,13 +16,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided diff --git a/federation/ldap/pom.xml b/federation/ldap/pom.xml index 72803ab6e6..27aea26a99 100755 --- a/federation/ldap/pom.xml +++ b/federation/ldap/pom.xml @@ -16,19 +16,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-kerberos-federation - ${project.version} provided diff --git a/forms/account-api/pom.xml b/forms/account-api/pom.xml index 1a53b9f1b8..8ec5d42168 100755 --- a/forms/account-api/pom.xml +++ b/forms/account-api/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided diff --git a/forms/account-freemarker/pom.xml b/forms/account-freemarker/pom.xml index 8c39675145..0029ccf68c 100755 --- a/forms/account-freemarker/pom.xml +++ b/forms/account-freemarker/pom.xml @@ -17,43 +17,36 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-account-api - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-forms-common-freemarker - ${project.version} provided org.keycloak keycloak-services - ${project.version} provided org.keycloak keycloak-social-core - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided diff --git a/forms/common-freemarker/pom.xml b/forms/common-freemarker/pom.xml index 4dd0214876..cc94ecac49 100755 --- a/forms/common-freemarker/pom.xml +++ b/forms/common-freemarker/pom.xml @@ -17,13 +17,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided diff --git a/forms/common-themes/pom.xml b/forms/common-themes/pom.xml index 52b142512e..d7ed8ac5e1 100755 --- a/forms/common-themes/pom.xml +++ b/forms/common-themes/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-forms-common-freemarker - ${project.version} provided diff --git a/forms/email-api/pom.xml b/forms/email-api/pom.xml index ae51f1dc28..16306ee633 100755 --- a/forms/email-api/pom.xml +++ b/forms/email-api/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided diff --git a/forms/email-freemarker/pom.xml b/forms/email-freemarker/pom.xml index 35c264fc50..3b3db450c0 100755 --- a/forms/email-freemarker/pom.xml +++ b/forms/email-freemarker/pom.xml @@ -17,31 +17,26 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-email-api - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided org.keycloak keycloak-forms-common-freemarker - ${project.version} provided diff --git a/forms/login-api/pom.xml b/forms/login-api/pom.xml index 0dccc0b723..4200823302 100755 --- a/forms/login-api/pom.xml +++ b/forms/login-api/pom.xml @@ -17,13 +17,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided diff --git a/forms/login-freemarker/pom.xml b/forms/login-freemarker/pom.xml index c5b7134db4..31b00ed19a 100755 --- a/forms/login-freemarker/pom.xml +++ b/forms/login-freemarker/pom.xml @@ -17,43 +17,36 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-forms-common-freemarker - ${project.version} provided org.keycloak keycloak-login-api - ${project.version} provided org.keycloak keycloak-email-api - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-services - ${project.version} provided org.keycloak keycloak-social-core - ${project.version} provided diff --git a/integration/adapter-core/pom.xml b/integration/adapter-core/pom.xml index 2db2a9c374..d5a03d0764 100755 --- a/integration/adapter-core/pom.xml +++ b/integration/adapter-core/pom.xml @@ -41,7 +41,6 @@ org.keycloak keycloak-core - ${project.version} provided diff --git a/integration/admin-client/pom.xml b/integration/admin-client/pom.xml index 95d8fe4035..91d15fc356 100755 --- a/integration/admin-client/pom.xml +++ b/integration/admin-client/pom.xml @@ -18,7 +18,6 @@ org.keycloak keycloak-core - ${project.version} org.codehaus.jackson @@ -34,25 +33,21 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} provided org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} provided org.jboss.resteasy resteasy-client - ${resteasy.version.latest} provided org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} provided diff --git a/integration/as7-eap6/adapter/pom.xml b/integration/as7-eap6/adapter/pom.xml index 89c65b94e3..2ab68682f3 100755 --- a/integration/as7-eap6/adapter/pom.xml +++ b/integration/as7-eap6/adapter/pom.xml @@ -17,17 +17,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-jboss-adapter-core - ${project.version} org.apache.httpcomponents @@ -80,7 +77,6 @@ org.keycloak keycloak-tomcat-core-adapter - ${project.version} org.apache.tomcat diff --git a/integration/installed/pom.xml b/integration/installed/pom.xml index a5268e3de3..b0d2c01cc6 100755 --- a/integration/installed/pom.xml +++ b/integration/installed/pom.xml @@ -17,12 +17,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.bouncycastle diff --git a/integration/jaxrs-oauth-client/pom.xml b/integration/jaxrs-oauth-client/pom.xml index 4e644b8172..4bd26a1a05 100755 --- a/integration/jaxrs-oauth-client/pom.xml +++ b/integration/jaxrs-oauth-client/pom.xml @@ -17,31 +17,26 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} provided org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} provided org.jboss.resteasy resteasy-client - ${resteasy.version.latest} provided org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided @@ -57,7 +52,6 @@ org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} provided diff --git a/integration/jboss-adapter-core/pom.xml b/integration/jboss-adapter-core/pom.xml index fc722ab500..1de6a1923d 100755 --- a/integration/jboss-adapter-core/pom.xml +++ b/integration/jboss-adapter-core/pom.xml @@ -23,12 +23,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.apache.httpcomponents diff --git a/integration/jetty/jetty-core/pom.xml b/integration/jetty/jetty-core/pom.xml index 20bdac852c..47bbb2785d 100755 --- a/integration/jetty/jetty-core/pom.xml +++ b/integration/jetty/jetty-core/pom.xml @@ -34,12 +34,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.apache.httpcomponents diff --git a/integration/jetty/jetty8.1/pom.xml b/integration/jetty/jetty8.1/pom.xml index 54753b8058..dd500ed17b 100755 --- a/integration/jetty/jetty8.1/pom.xml +++ b/integration/jetty/jetty8.1/pom.xml @@ -33,17 +33,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-jetty-core - ${project.version} org.apache.httpcomponents diff --git a/integration/jetty/jetty9.1/pom.xml b/integration/jetty/jetty9.1/pom.xml index 07ef614bf9..ca658feee0 100755 --- a/integration/jetty/jetty9.1/pom.xml +++ b/integration/jetty/jetty9.1/pom.xml @@ -34,17 +34,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-jetty-core - ${project.version} org.eclipse.jetty diff --git a/integration/jetty/jetty9.2/pom.xml b/integration/jetty/jetty9.2/pom.xml index b853e72ecc..32205e7890 100755 --- a/integration/jetty/jetty9.2/pom.xml +++ b/integration/jetty/jetty9.2/pom.xml @@ -34,17 +34,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-jetty-core - ${project.version} org.apache.httpcomponents diff --git a/integration/keycloak-as7-subsystem/pom.xml b/integration/keycloak-as7-subsystem/pom.xml index 7da7032c07..7a1db33c20 100755 --- a/integration/keycloak-as7-subsystem/pom.xml +++ b/integration/keycloak-as7-subsystem/pom.xml @@ -63,35 +63,9 @@ - - org.keycloak keycloak-as7-adapter - ${project.version} diff --git a/integration/keycloak-subsystem/pom.xml b/integration/keycloak-subsystem/pom.xml index 52b39fdeaa..36054dc210 100755 --- a/integration/keycloak-subsystem/pom.xml +++ b/integration/keycloak-subsystem/pom.xml @@ -125,7 +125,6 @@ org.keycloak keycloak-as7-adapter - ${project.version} diff --git a/integration/servlet-oauth-client/pom.xml b/integration/servlet-oauth-client/pom.xml index 06ec8ade3c..56a52c006a 100755 --- a/integration/servlet-oauth-client/pom.xml +++ b/integration/servlet-oauth-client/pom.xml @@ -22,13 +22,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-adapter-core - ${project.version} provided diff --git a/integration/spring-boot/pom.xml b/integration/spring-boot/pom.xml index fe3bebc0b7..1052300fe0 100755 --- a/integration/spring-boot/pom.xml +++ b/integration/spring-boot/pom.xml @@ -21,30 +21,25 @@ org.jboss.logging jboss-logging - ${jboss.logging.version} org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-tomcat8-adapter - ${project.version} provided org.keycloak keycloak-undertow-adapter - ${project.version} provided org.keycloak keycloak-jetty92-adapter - ${project.version} provided diff --git a/integration/tomcat/tomcat-core/pom.xml b/integration/tomcat/tomcat-core/pom.xml index 5bc46b86cb..514f2aed2e 100755 --- a/integration/tomcat/tomcat-core/pom.xml +++ b/integration/tomcat/tomcat-core/pom.xml @@ -27,12 +27,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.apache.httpcomponents diff --git a/integration/tomcat/tomcat6/pom.xml b/integration/tomcat/tomcat6/pom.xml index 9e3cf14692..75079d4e72 100755 --- a/integration/tomcat/tomcat6/pom.xml +++ b/integration/tomcat/tomcat6/pom.xml @@ -25,17 +25,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-tomcat-core-adapter - ${project.version} org.apache.tomcat diff --git a/integration/tomcat/tomcat7/pom.xml b/integration/tomcat/tomcat7/pom.xml index 46ea1dfa13..66fa8de8f0 100755 --- a/integration/tomcat/tomcat7/pom.xml +++ b/integration/tomcat/tomcat7/pom.xml @@ -26,17 +26,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-tomcat-core-adapter - ${project.version} org.apache.tomcat diff --git a/integration/tomcat/tomcat8/pom.xml b/integration/tomcat/tomcat8/pom.xml index 120295179b..11577ea6ab 100755 --- a/integration/tomcat/tomcat8/pom.xml +++ b/integration/tomcat/tomcat8/pom.xml @@ -25,12 +25,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.apache.tomcat @@ -48,7 +46,6 @@ org.keycloak keycloak-tomcat-core-adapter - ${project.version} org.apache.tomcat diff --git a/integration/undertow/pom.xml b/integration/undertow/pom.xml index 7f0f28c288..0b37f79d7f 100755 --- a/integration/undertow/pom.xml +++ b/integration/undertow/pom.xml @@ -23,12 +23,10 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.apache.httpcomponents diff --git a/integration/wildfly-adapter/pom.xml b/integration/wildfly-adapter/pom.xml index 6419e5dbae..49029622cd 100755 --- a/integration/wildfly-adapter/pom.xml +++ b/integration/wildfly-adapter/pom.xml @@ -23,22 +23,18 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-jboss-adapter-core - ${project.version} org.apache.httpcomponents diff --git a/integration/wildfly-extensions/pom.xml b/integration/wildfly-extensions/pom.xml index 079f6fed29..201db70505 100755 --- a/integration/wildfly-extensions/pom.xml +++ b/integration/wildfly-extensions/pom.xml @@ -38,25 +38,21 @@ org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-forms-common-freemarker - ${project.version} provided org.keycloak keycloak-forms-common-themes - ${project.version} provided org.keycloak keycloak-services - ${project.version} provided diff --git a/model/api/pom.xml b/model/api/pom.xml index 1b97730c38..56b8ca715d 100755 --- a/model/api/pom.xml +++ b/model/api/pom.xml @@ -37,7 +37,6 @@ org.keycloak keycloak-core - ${project.version} provided diff --git a/model/file/pom.xml b/model/file/pom.xml index bb555601fc..8574546ea8 100755 --- a/model/file/pom.xml +++ b/model/file/pom.xml @@ -17,28 +17,23 @@ org.keycloak keycloak-export-import-api - ${project.version} org.keycloak keycloak-export-import-single-file - ${project.version} org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-connections-file - ${project.version} org.codehaus.jackson diff --git a/model/invalidation-cache/infinispan/pom.xml b/model/invalidation-cache/infinispan/pom.xml index ce7d1a6c80..94f89630bb 100755 --- a/model/invalidation-cache/infinispan/pom.xml +++ b/model/invalidation-cache/infinispan/pom.xml @@ -17,17 +17,14 @@ org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-invalidation-cache-model - ${project.version} org.keycloak keycloak-connections-infinispan - ${project.version} org.infinispan diff --git a/model/invalidation-cache/model-adapters/pom.xml b/model/invalidation-cache/model-adapters/pom.xml index db74f1a4f2..5f2f0196cf 100755 --- a/model/invalidation-cache/model-adapters/pom.xml +++ b/model/invalidation-cache/model-adapters/pom.xml @@ -27,13 +27,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} org.jboss.resteasy diff --git a/model/jpa/pom.xml b/model/jpa/pom.xml index 8842b973ea..e3f552569c 100755 --- a/model/jpa/pom.xml +++ b/model/jpa/pom.xml @@ -27,23 +27,19 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-connections-jpa - ${project.version} org.keycloak keycloak-invalidation-cache-model - ${project.version} test @@ -54,13 +50,11 @@ org.hibernate hibernate-entitymanager - ${hibernate.entitymanager.version} provided org.keycloak keycloak-model-sessions-mem - ${project.version} test diff --git a/model/mongo/pom.xml b/model/mongo/pom.xml index 7db03e7e5c..2c45c2119b 100755 --- a/model/mongo/pom.xml +++ b/model/mongo/pom.xml @@ -28,19 +28,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-connections-mongo - ${project.version} provided diff --git a/model/sessions-infinispan/pom.xml b/model/sessions-infinispan/pom.xml index f3cb16b7d1..0d8bb52b9b 100755 --- a/model/sessions-infinispan/pom.xml +++ b/model/sessions-infinispan/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-connections-infinispan - ${project.version} provided diff --git a/model/sessions-jpa/pom.xml b/model/sessions-jpa/pom.xml index c91f2d8f37..4bbd9997b5 100755 --- a/model/sessions-jpa/pom.xml +++ b/model/sessions-jpa/pom.xml @@ -17,19 +17,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-connections-jpa - ${project.version} provided @@ -40,7 +37,6 @@ org.hibernate hibernate-entitymanager - ${hibernate.entitymanager.version} provided diff --git a/model/sessions-mem/pom.xml b/model/sessions-mem/pom.xml index 50458f6e97..fe46ff75ac 100755 --- a/model/sessions-mem/pom.xml +++ b/model/sessions-mem/pom.xml @@ -17,13 +17,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided diff --git a/model/sessions-mongo/pom.xml b/model/sessions-mongo/pom.xml index d74a375cb6..d9453c407a 100755 --- a/model/sessions-mongo/pom.xml +++ b/model/sessions-mongo/pom.xml @@ -18,19 +18,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-connections-mongo - ${project.version} provided diff --git a/pom.xml b/pom.xml index 326ec90d58..237f13d720 100755 --- a/pom.xml +++ b/pom.xml @@ -2,6 +2,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 + + org.jboss + jboss-parent + 14 + + Keycloak Keycloak SSO @@ -12,16 +18,13 @@ pom - 0.33.12 2.0.0-M17 1.0.0-M23 2.3.8 1.50 1.9.9 4.2.1 - 2.3.7.Final - 3.0.9.Final - + 3.0.10.Final 1.1.1.Final 2.7.0.Final 2.11.3 @@ -53,11 +56,19 @@ 9.1.0.v20131115 4.2.0 3.1.2 + 2.10 + 4.11 + 1.3 + 1.2.17 + 1.3.1b + 1.5.1 - - 1.7 - 1.7 - + 7.5.Final + 1.0.1.Final + 1.7.2 + 0.1.10 + 1.9.0 + 1.0.4 http://keycloak.org @@ -122,9 +133,7 @@ forms examples testsuite - server timer - project-integrations export-import @@ -150,17 +159,6 @@ mail ${javax.mail.version} - - org.jboss.aesh - aesh - ${aesh.version} - - - junit - junit - - - org.jboss.resteasy jaxrs-api @@ -184,22 +182,17 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version} - - - org.jboss.resteasy - tjws ${resteasy.version} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} + ${resteasy.version} + + + org.jboss.resteasy + async-http-servlet-3.0 + ${resteasy.version} io.undertow @@ -236,71 +229,11 @@ jboss-servlet-api_3.0_spec ${servlet.api.30.version} - - org.picketlink - picketlink-common - ${picketlink.version} - - - org.picketlink - picketlink-idm-api - ${picketlink.version} - - - org.picketlink - picketlink-idm-impl - ${picketlink.version} - - - org.picketlink - picketlink-federation - ${picketlink.version} - org.picketlink picketlink-wildfly-common ${picketlink.version} - - org.picketlink - picketlink-tomcat-common - ${picketlink.version} - - - org.picketlink - picketlink-tomcat5-single - ${picketlink.version} - - - org.picketlink - picketlink-jbas-common - ${picketlink.version} - - - org.picketlink - picketlink-jbas7-single - ${picketlink.version} - - - org.picketlink - picketlink-idm-simple-schema - ${picketlink.version} - - - org.picketlink - picketlink-config - ${picketlink.version} - - - org.picketlink - picketlink-api - ${picketlink.version} - - - org.picketlink - picketlink-impl - ${picketlink.version} - org.jboss.logging jboss-logging @@ -314,24 +247,18 @@ log4j log4j - 1.2.17 + ${log4j.version} junit junit - 4.11 + ${junit.version} test org.hamcrest hamcrest-all - 1.3 - test - - - org.easymock - easymock - 3.2 + ${hamcrest.version} test @@ -349,27 +276,27 @@ hibernate-entitymanager ${hibernate.entitymanager.version} - - com.google.api-client - google-api-client - ${google.client.version} - org.freemarker freemarker ${freemarker.version} - - - com.google.http-client - google-http-client-jackson - ${google.client.version} + org.apache.santuario + xmlsec + ${xmlsec.version} + + + javax.servlet + servlet-api + + - com.google.apis - google-api-services-oauth2 - v2-rev35-1.14.1-beta + org.wildfly + wildfly-dist + ${wildfly.version} + zip @@ -395,7 +322,7 @@ com.icegreen greenmail - 1.3.1b + ${greenmail.version} @@ -442,12 +369,12 @@ org.mongodb mongo-java-driver - 2.11.2 + ${mongo.driver.version} org.apache.jmeter ApacheJMeter_java - 2.10 + ${jmeter.version} dom4j @@ -471,19 +398,16 @@ ${slf4j.version} - mysql mysql-connector-java ${mysql.version} - org.wildfly.core wildfly-controller @@ -512,11 +436,6 @@ pom ${wildfly.core.version} - - org.wildfly.core - wildfly-cli - ${wildfly.core.version} - org.wildfly.core wildfly-core-feature-pack @@ -563,195 +482,520 @@ pax-web-runtime ${pax.web.version} + + + + org.keycloak + keycloak-broker-core + ${project.version} + + + org.keycloak + keycloak-broker-oidc + ${project.version} + + + org.keycloak + keycloak-broker-saml + ${project.version} + + + org.keycloak + keycloak-connections-file + ${project.version} + + + org.keycloak + keycloak-connections-infinispan + ${project.version} + + + org.keycloak + keycloak-connections-jpa + ${project.version} + + + org.keycloak + keycloak-connections-jpa-liquibase + ${project.version} + + + org.keycloak + keycloak-connections-mongo + ${project.version} + + + org.keycloak + keycloak-connections-mongo-update + ${project.version} + + + org.keycloak + keycloak-core + ${project.version} + + + org.keycloak + keycloak-core-jaxrs + ${project.version} + + + org.keycloak + keycloak-events-api + ${project.version} + + + org.keycloak + keycloak-events-email + ${project.version} + + + org.keycloak + keycloak-events-jboss-logging + ${project.version} + + + org.keycloak + keycloak-events-jpa + ${project.version} + + + org.keycloak + keycloak-events-mongo + ${project.version} + + + org.keycloak + keycloak-events-syslog + ${project.version} + + + org.keycloak + keycloak-export-import-api + ${project.version} + + + org.keycloak + keycloak-export-import-dir + ${project.version} + + + org.keycloak + keycloak-export-import-single-file + ${project.version} + + + org.keycloak + keycloak-export-import-zip + ${project.version} + + + org.keycloak + keycloak-kerberos-federation + ${project.version} + + + org.keycloak + keycloak-ldap-federation + ${project.version} + + + org.keycloak + keycloak-account-api + ${project.version} + + + org.keycloak + keycloak-account-freemarker + ${project.version} + + + org.keycloak + keycloak-dependencies-server-min + ${project.version} + pom + + + org.keycloak + keycloak-dependencies-server-all + ${project.version} + pom + + + org.keycloak + keycloak-forms-common-freemarker + ${project.version} + + + org.keycloak + keycloak-forms-common-themes + ${project.version} + + + org.keycloak + keycloak-email-api + ${project.version} + + + org.keycloak + keycloak-email-freemarker + ${project.version} + + + org.keycloak + keycloak-adapter-core + ${project.version} + + + org.keycloak + keycloak-admin-client + ${project.version} + + + org.keycloak + keycloak-as7-adapter + ${project.version} + + + org.keycloak + keycloak-installed-adapter + ${project.version} + + + org.keycloak + keycloak-jaxrs-oauth-client + ${project.version} + + + org.keycloak + keycloak-jboss-adapter-core + ${project.version} + + + org.keycloak + keycloak-jetty-core + ${project.version} + + + org.keycloak + keycloak-jetty81-adapter + ${project.version} + + + org.keycloak + keycloak-jetty91-adapter + ${project.version} + + + org.keycloak + keycloak-jetty92-adapter + ${project.version} + + + org.keycloak + keycloak-as7-subsystem + ${project.version} + + + org.keycloak + keycloak-subsystem + ${project.version} + + + org.keycloak + keycloak-js-adapter + ${project.version} + + + org.keycloak + keycloak-osgi-adapter + ${project.version} + + + org.keycloak + keycloak-servlet-oauth-client + ${project.version} + + + org.keycloak + keycloak-spring-boot-adapter + ${project.version} + + + org.keycloak + keycloak-tomcat-core-adapter + ${project.version} + + + org.keycloak + keycloak-tomcat6-adapter + ${project.version} + + + org.keycloak + keycloak-tomcat7-adapter + ${project.version} + + + org.keycloak + keycloak-tomcat8-adapter + ${project.version} + + + org.keycloak + keycloak-undertow-adapter + ${project.version} + + + org.keycloak + keycloak-wildfly-adapter + ${project.version} + + + org.keycloak + keycloak-wildfly-extensions + ${project.version} + + + org.keycloak + keycloak-login-api + ${project.version} + + + org.keycloak + keycloak-login-freemarker + ${project.version} + + + org.keycloak + keycloak-model-api + ${project.version} + + + org.keycloak + keycloak-model-file + ${project.version} + + + org.keycloak + keycloak-invalidation-cache-infinispan + ${project.version} + + + org.keycloak + keycloak-invalidation-cache-model + ${project.version} + + + org.keycloak + keycloak-model-jpa + ${project.version} + + + org.keycloak + keycloak-model-mongo + ${project.version} + + + org.keycloak + keycloak-model-sessions-infinispan + ${project.version} + + + org.keycloak + keycloak-model-sessions-jpa + ${project.version} + + + org.keycloak + keycloak-model-sessions-mem + ${project.version} + + + org.keycloak + keycloak-model-sessions-mongo + ${project.version} + + + org.keycloak + launcher + ${project.version} + + + org.keycloak + keycloak-proxy-server + ${project.version} + + + org.keycloak + keycloak-saml-core + ${project.version} + + + org.keycloak + keycloak-saml-protocol + ${project.version} + + + org.keycloak + keycloak-services + ${project.version} + + + org.keycloak + keycloak-social-core + ${project.version} + + + org.keycloak + keycloak-social-facebook + ${project.version} + + + org.keycloak + keycloak-social-github + ${project.version} + + + org.keycloak + keycloak-social-google + ${project.version} + + + org.keycloak + keycloak-social-linkedin + ${project.version} + + + org.keycloak + keycloak-social-stackoverflow + ${project.version} + + + org.keycloak + keycloak-social-twitter + ${project.version} + + + org.keycloak + keycloak-timer-api + ${project.version} + + + org.keycloak + keycloak-timer-basic + ${project.version} + + + org.keycloak + keycloak-jboss-modules + ${project.version} + zip + + + org.keycloak + keycloak-server-overlay + ${project.version} + zip + + + org.keycloak.subsystem + keycloak-server + ${project.version} + war + + + org.keycloak + keycloak-testsuite-integration + ${project.version} + + + org.keycloak + keycloak-testsuite-integration + ${project.version} + test-jar + + + org.keycloak + keycloak-testsuite-tools + ${project.version} + + + org.keycloak + keycloak-testsuite-tools + ${project.version} + classes + + + org.keycloak + federation-properties-example + ${project.version} + + + org.keycloak.example.demo + cxf-jaxws-example + ${project.version} + + + org.keycloak.example.demo + customer-portal-example + ${project.version} + war + + + org.keycloak.example.demo + product-portal-example + ${project.version} + war + + jboss http://repository.jboss.org/nexus/content/groups/public/ - - + - - org.apache.maven.plugins - maven-dependency-plugin - 2.8 - org.apache.maven.plugins maven-surefire-plugin - 2.16 once -Xms512m -Xmx1024m -XX:MaxPermSize=512m - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.1 - - ${maven.compiler.source} - ${maven.compiler.target} - utf-8 - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.1 - - false - 128m - 1024m - false - true - - com.restfully.*:org.jboss.resteasy.examples.*:se.unlogic.*:org.jboss.resteasy.tests.*:org.apache.* - - - true - - true - true - - - ${project.url} - ${java.version} - ${java.vendor} - ${os.name} - ${os.arch} - ${os.version} - ${project.scm.url} - ${project.scm.connection} - ${buildNumber} - ${build.datetime} - JBoss (http://www.jboss.org/) - http://www.jboss.org/ - JBoss by Red Hat, Inc - http://www.jboss.org/ - - - - org.apache.maven.plugins maven-install-plugin - 2.3.1 true - - org.apache.maven.plugins - maven-source-plugin - 2.1.2 - - - true - - true - true - - - ${project.url} - ${java.version} - ${java.vendor} - ${os.name} - ${os.arch} - ${os.version} - ${project.scm.url} - ${project.scm.connection} - ${buildNumber} - ${build.datetime} - JBoss (http://www.jboss.org/) - http://www.jboss.org/ - JBoss by Red Hat, Inc - http://www.jboss.org/ - - - - - - verify - - jar - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.5 - - - org.apache.maven.plugins - maven-war-plugin - 2.3 - - false - - com.lazerycode.jmeter jmeter-maven-plugin - 1.9.0 + ${jmeter.plugin.version} com.lazerycode.jmeter jmeter-analysis-maven-plugin - 1.0.4 - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - true - - true - true - - - ${project.url} - ${java.version} - ${java.vendor} - ${os.name} - ${os.arch} - ${os.version} - ${project.scm.url} - ${project.scm.connection} - ${buildNumber} - ${build.datetime} - JBoss (http://www.jboss.org/) - http://www.jboss.org/ - JBoss by Red Hat, Inc - http://www.jboss.org/ - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 + ${jmeter.analysis.plugin.version} com.github.joelittlejohn.embedmongo embedmongo-maven-plugin - 0.1.10 + ${embedmongo.plugin.version} org.jboss.as.plugins jboss-as-maven-plugin - 7.5.Final + ${jboss.as.plugin.version} true @@ -759,7 +1003,7 @@ org.wildfly.plugins wildfly-maven-plugin - 1.0.1.Final + ${wildfly.plugin.version} true @@ -767,46 +1011,17 @@ com.samaxes.maven minify-maven-plugin - 1.7.2 + ${minify.plugin.version} org.liquibase liquibase-maven-plugin ${liquibase.version} - - org.codehaus.mojo - buildnumber-maven-plugin - 1.3 - - - org.apache.felix - maven-bundle-plugin - 2.3.7 - - - org.codehaus.mojo - build-helper-maven-plugin - 1.7 - - - org.apache.maven.plugins - maven-resources-plugin - 2.6 - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - utf-8 - - org.apache.maven.plugins maven-javadoc-plugin @@ -820,71 +1035,12 @@ - - org.apache.maven.plugins - maven-install-plugin - - true - - - - org.apache.maven.plugins - maven-source-plugin - - - verify - - jar - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - com.atlassian.maven.plugins - maven-clover2-plugin - 3.1.6 - - - org.codehaus.mojo - buildnumber-maven-plugin - - - get-build-timestamp - initialize - - create-timestamp - - - - EEE, d MMM yyyy HH:mm:ss Z - build.datetime - - - - get-scm-revision - initialize - - create - - - false - false - UNKNOWN - true - - - - - + - distribution + jboss-release docbook distribution diff --git a/project-integrations/aerogear-ups/app/pom.xml b/project-integrations/aerogear-ups/app/pom.xml index 87ec8086ba..9e0cea280f 100755 --- a/project-integrations/aerogear-ups/app/pom.xml +++ b/project-integrations/aerogear-ups/app/pom.xml @@ -22,17 +22,14 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.keycloak keycloak-jboss-adapter-core - ${project.version} net.iharder @@ -47,25 +44,21 @@ org.jboss.resteasy resteasy-jaxrs - ${resteasy.version} provided org.jboss.resteasy async-http-servlet-3.0 - ${resteasy.version} provided org.jboss.resteasy jaxrs-api - ${resteasy.version} provided org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version} provided @@ -125,7 +118,6 @@ org.keycloak keycloak-as7-adapter - ${project.version} @@ -135,7 +127,6 @@ org.keycloak keycloak-wildfly-adapter - ${project.version} diff --git a/project-integrations/aerogear-ups/auth-server/pom.xml b/project-integrations/aerogear-ups/auth-server/pom.xml index 66b192494b..373830bc94 100755 --- a/project-integrations/aerogear-ups/auth-server/pom.xml +++ b/project-integrations/aerogear-ups/auth-server/pom.xml @@ -18,14 +18,12 @@ org.keycloak keycloak-dependencies-server-min - ${project.version} pom org.jboss.resteasy resteasy-jaxrs - ${resteasy.version} provided @@ -36,27 +34,22 @@ org.keycloak keycloak-connections-jpa - ${project.version} org.keycloak keycloak-connections-jpa-liquibase - ${project.version} org.keycloak keycloak-model-jpa - ${project.version} org.keycloak keycloak-model-sessions-mem - ${project.version} org.keycloak keycloak-model-sessions-jpa - ${project.version} diff --git a/proxy/proxy-server/pom.xml b/proxy/proxy-server/pom.xml index 31dd5bb9c6..d7ce7a2903 100755 --- a/proxy/proxy-server/pom.xml +++ b/proxy/proxy-server/pom.xml @@ -17,27 +17,22 @@ org.jboss.logging jboss-logging - ${jboss.logging.version} org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-adapter-core - ${project.version} org.apache.httpcomponents httpclient - ${keycloak.apache.httpcomponents.version} net.iharder diff --git a/saml/saml-core/pom.xml b/saml/saml-core/pom.xml index c5242a4204..1fc4bddbb3 100755 --- a/saml/saml-core/pom.xml +++ b/saml/saml-core/pom.xml @@ -26,13 +26,6 @@ org.apache.santuario xmlsec - 1.5.1 - - - javax.servlet - servlet-api - - junit diff --git a/saml/saml-protocol/pom.xml b/saml/saml-protocol/pom.xml index 511f48dec0..702be9d783 100755 --- a/saml/saml-protocol/pom.xml +++ b/saml/saml-protocol/pom.xml @@ -21,7 +21,6 @@ org.keycloak keycloak-saml-core - ${project.version} provided @@ -32,49 +31,41 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-services - ${project.version} provided org.keycloak keycloak-forms-common-freemarker - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided org.keycloak keycloak-account-api - ${project.version} provided org.keycloak keycloak-email-api - ${project.version} provided org.keycloak keycloak-login-api - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided @@ -101,13 +92,6 @@ - org.jboss.resteasy jaxrs-api diff --git a/server/pom.xml b/server/pom.xml deleted file mode 100755 index 2784f4bac7..0000000000 --- a/server/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - - - 4.0.0 - keycloak-server - war - Keycloak Server - - - - - org.keycloak - keycloak-dependencies-server-all - ${project.version} - pom - - - - - auth-server - - - org.jboss.as.plugins - jboss-as-maven-plugin - - false - - - - org.wildfly.plugins - wildfly-maven-plugin - - false - - - - - diff --git a/server/src/main/resources/META-INF/keycloak-server.json b/server/src/main/resources/META-INF/keycloak-server.json deleted file mode 100755 index 1d7b17f0fa..0000000000 --- a/server/src/main/resources/META-INF/keycloak-server.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "providers": [ - "classpath:${jboss.server.config.dir}/providers/*" - ], - - "admin": { - "realm": "master" - }, - - "eventsStore": { - "provider": "jpa", - "jpa": { - "exclude-events": [ "REFRESH_TOKEN" ] - } - }, - - "eventsListener": { - "jboss-logging" : { - "success-level": "debug", - "error-level": "warn" - } - }, - - "realm": { - "provider": "jpa" - }, - - "user": { - "provider": "jpa" - }, - - "userSessions": { - "provider" : "mem" - }, - - "realmCache": { - "provider": "mem" - }, - - "userCache": { - "provider": "mem", - "mem": { - "maxSize": 20000 - } - }, - - "timer": { - "provider": "basic" - }, - - "theme": { - "default": "keycloak", - "staticMaxAge": 2592000, - "cacheTemplates": true, - "cacheThemes": true, - "folder": { - "dir": "${jboss.server.config.dir}/themes" - } - }, - - "login": { - "provider": "freemarker" - }, - - "account": { - "provider": "freemarker" - }, - - "email": { - "provider": "freemarker" - }, - - "scheduled": { - "interval": 900 - }, - - "connectionsJpa": { - "default": { - "dataSource": "java:jboss/datasources/KeycloakDS", - "databaseSchema": "update" - } - } -} \ No newline at end of file diff --git a/server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml deleted file mode 100755 index 267f9e511f..0000000000 --- a/server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/src/main/webapp/WEB-INF/web.xml b/server/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index 7228afe95f..0000000000 --- a/server/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - auth - - - Keycloak REST Interface - org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher - - javax.ws.rs.Application - org.keycloak.services.resources.KeycloakApplication - - - resteasy.servlet.mapping.prefix - / - - 1 - true - - - - org.keycloak.services.listeners.KeycloakSessionDestroyListener - - - - Keycloak Client Connection Filter - org.keycloak.services.filters.ClientConnectionFilter - - - - Keycloak Session Management - org.keycloak.services.filters.KeycloakSessionServletFilter - - - - Keycloak Session Management - /* - - - - Keycloak Client Connection Filter - /* - - - - Keycloak REST Interface - /* - - diff --git a/services/pom.xml b/services/pom.xml index ea6e90e600..bc5762f535 100755 --- a/services/pom.xml +++ b/services/pom.xml @@ -19,87 +19,78 @@ bcprov-jdk15on provided + + org.bouncycastle + bcpkix-jdk15on + provided + org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-core-jaxrs - ${project.version} provided org.keycloak keycloak-forms-common-freemarker - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided org.keycloak keycloak-account-api - ${project.version} provided org.keycloak keycloak-email-api - ${project.version} provided org.keycloak keycloak-login-api - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-invalidation-cache-model - ${project.version} provided org.keycloak keycloak-social-core - ${project.version} provided org.keycloak keycloak-broker-core - ${project.version} org.keycloak keycloak-timer-api - ${project.version} provided org.keycloak keycloak-timer-basic - ${project.version} provided org.keycloak keycloak-export-import-api - ${project.version} provided @@ -137,11 +128,6 @@ jaxrs-api provided - - org.jboss.resteasy - resteasy-crypto - provided - org.jboss.resteasy resteasy-multipart-provider @@ -197,7 +183,6 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 generate-service-docs diff --git a/social/core/pom.xml b/social/core/pom.xml index 76c631b839..9a4a5966b8 100755 --- a/social/core/pom.xml +++ b/social/core/pom.xml @@ -17,7 +17,6 @@ org.keycloak keycloak-broker-core - ${project.version} junit diff --git a/social/facebook/pom.xml b/social/facebook/pom.xml index ffe311c87f..aec733bde9 100755 --- a/social/facebook/pom.xml +++ b/social/facebook/pom.xml @@ -17,13 +17,11 @@ org.keycloak keycloak-social-core - ${project.version} provided org.keycloak keycloak-broker-oidc - ${project.version} provided diff --git a/social/github/pom.xml b/social/github/pom.xml index 1ffc6e5232..2ba04227cd 100755 --- a/social/github/pom.xml +++ b/social/github/pom.xml @@ -17,13 +17,11 @@ org.keycloak keycloak-social-core - ${project.version} provided org.keycloak keycloak-broker-oidc - ${project.version} provided diff --git a/social/google/pom.xml b/social/google/pom.xml index fdc80b90a6..a20380ab2b 100755 --- a/social/google/pom.xml +++ b/social/google/pom.xml @@ -17,13 +17,11 @@ org.keycloak keycloak-social-core - ${project.version} provided org.keycloak keycloak-broker-oidc - ${project.version} provided diff --git a/social/linkedin/pom.xml b/social/linkedin/pom.xml index 15322d786a..576ee3d51a 100755 --- a/social/linkedin/pom.xml +++ b/social/linkedin/pom.xml @@ -17,13 +17,11 @@ org.keycloak keycloak-social-core - ${project.version} provided org.keycloak keycloak-broker-oidc - ${project.version} provided diff --git a/social/stackoverflow/pom.xml b/social/stackoverflow/pom.xml index 46b24dee05..b3042d2db1 100755 --- a/social/stackoverflow/pom.xml +++ b/social/stackoverflow/pom.xml @@ -17,13 +17,11 @@ org.keycloak keycloak-social-core - ${project.version} provided org.keycloak keycloak-broker-oidc - ${project.version} provided diff --git a/social/twitter/pom.xml b/social/twitter/pom.xml index 591c66fbc1..d9953147ea 100755 --- a/social/twitter/pom.xml +++ b/social/twitter/pom.xml @@ -17,25 +17,21 @@ org.keycloak keycloak-social-core - ${project.version} provided org.keycloak keycloak-broker-oidc - ${project.version} provided org.keycloak keycloak-events-api - ${project.version} provided org.keycloak keycloak-services - ${project.version} provided diff --git a/testsuite/docker-cluster/pom.xml b/testsuite/docker-cluster/pom.xml index 9667e7ad72..3c9be322ed 100755 --- a/testsuite/docker-cluster/pom.xml +++ b/testsuite/docker-cluster/pom.xml @@ -42,28 +42,24 @@ org.keycloak keycloak-war-deployment - ${project.version} zip ${project.build.directory} org.keycloak keycloak-wildfly-adapter-dist - ${project.version} zip ${project.build.directory}/wildfly-adapter org.keycloak keycloak-as7-adapter-dist - ${project.version} zip ${project.build.directory}/as7-adapter org.keycloak keycloak-eap6-adapter-dist - ${project.version} zip ${project.build.directory}/eap63-adapter diff --git a/testsuite/integration/pom.xml b/testsuite/integration/pom.xml index 8aa46ca8ec..e6d674a409 100755 --- a/testsuite/integration/pom.xml +++ b/testsuite/integration/pom.xml @@ -13,16 +13,6 @@ Keycloak Integration TestSuite - - - - org.keycloak - keycloak-as7-adapter - ${project.version} - - - - org.bouncycastle @@ -35,18 +25,11 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.keycloak keycloak-admin-client - ${project.version} - - - org.keycloak - event-listener-sysout-example - ${project.version} log4j @@ -68,12 +51,14 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} + + + org.jboss.resteasy + async-http-servlet-3.0 org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} log4j @@ -92,27 +77,22 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-multipart-provider - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-jackson-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} + + + org.jboss.resteasy + resteasy-multipart-provider + + + org.jboss.resteasy + async-http-servlet-3.0 + + + org.jboss.resteasy + resteasy-jackson-provider com.google.zxing @@ -126,27 +106,22 @@ org.keycloak keycloak-ldap-federation - ${project.version} org.keycloak keycloak-kerberos-federation - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-jaxrs-oauth-client - ${project.version} org.keycloak federation-properties-example - ${project.version} org.jboss.logging diff --git a/testsuite/jetty/jetty81/pom.xml b/testsuite/jetty/jetty81/pom.xml index 572c85b53c..e81796900c 100755 --- a/testsuite/jetty/jetty81/pom.xml +++ b/testsuite/jetty/jetty81/pom.xml @@ -20,13 +20,11 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.keycloak keycloak-admin-client - ${project.version} log4j @@ -49,12 +47,10 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} log4j @@ -73,27 +69,18 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} org.jboss.resteasy resteasy-multipart-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} com.google.zxing @@ -111,22 +98,18 @@ org.keycloak keycloak-ldap-federation - ${project.version} org.keycloak keycloak-kerberos-federation - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-jetty81-adapter - ${project.version} org.jboss.logging @@ -207,13 +190,11 @@ org.keycloak keycloak-testsuite-integration - ${project.version} test org.keycloak keycloak-testsuite-integration - ${project.version} test-jar test diff --git a/testsuite/jetty/jetty91/pom.xml b/testsuite/jetty/jetty91/pom.xml index 1e7f04e5fd..9afec4acd1 100755 --- a/testsuite/jetty/jetty91/pom.xml +++ b/testsuite/jetty/jetty91/pom.xml @@ -20,13 +20,11 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.keycloak keycloak-admin-client - ${project.version} log4j @@ -49,12 +47,10 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} log4j @@ -73,27 +69,18 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} org.jboss.resteasy resteasy-multipart-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} com.google.zxing @@ -111,22 +98,18 @@ org.keycloak keycloak-ldap-federation - ${project.version} org.keycloak keycloak-kerberos-federation - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-jetty91-adapter - ${project.version} org.jboss.logging @@ -207,13 +190,11 @@ org.keycloak keycloak-testsuite-integration - ${project.version} test org.keycloak keycloak-testsuite-integration - ${project.version} test-jar test diff --git a/testsuite/jetty/jetty92/pom.xml b/testsuite/jetty/jetty92/pom.xml index 9d3fe4962b..12458c6608 100755 --- a/testsuite/jetty/jetty92/pom.xml +++ b/testsuite/jetty/jetty92/pom.xml @@ -20,13 +20,11 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.keycloak keycloak-admin-client - ${project.version} log4j @@ -49,12 +47,10 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} log4j @@ -73,27 +69,18 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} org.jboss.resteasy resteasy-multipart-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} com.google.zxing @@ -111,22 +98,18 @@ org.keycloak keycloak-ldap-federation - ${project.version} org.keycloak keycloak-kerberos-federation - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-jetty92-adapter - ${project.version} org.jboss.logging @@ -207,13 +190,11 @@ org.keycloak keycloak-testsuite-integration - ${project.version} test org.keycloak keycloak-testsuite-integration - ${project.version} test-jar test diff --git a/testsuite/performance-web/pom.xml b/testsuite/performance-web/pom.xml index cc60e759d1..ce3af75782 100755 --- a/testsuite/performance-web/pom.xml +++ b/testsuite/performance-web/pom.xml @@ -17,7 +17,6 @@ org.keycloak keycloak-testsuite-integration - ${project.version} org.jboss.spec.javax.servlet @@ -28,7 +27,6 @@ org.keycloak keycloak-testsuite-tools - ${project.version} classes @@ -43,12 +41,10 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} log4j @@ -67,27 +63,18 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} org.jboss.resteasy resteasy-multipart-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} org.apache.jmeter diff --git a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java index a57ee221ce..21de4261f3 100755 --- a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java +++ b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java @@ -9,7 +9,6 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; -import org.jboss.resteasy.security.PemUtils; import org.json.JSONObject; import org.keycloak.OAuth2Constants; import org.keycloak.RSATokenVerifier; @@ -20,6 +19,7 @@ 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.PemUtils; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.UriBuilder; diff --git a/testsuite/performance/pom.xml b/testsuite/performance/pom.xml index f9bb23e083..0c5783d990 100755 --- a/testsuite/performance/pom.xml +++ b/testsuite/performance/pom.xml @@ -18,32 +18,26 @@ org.keycloak keycloak-core - ${project.version} org.keycloak keycloak-core-jaxrs - ${project.version} org.keycloak keycloak-services - ${project.version} org.keycloak keycloak-model-api - ${project.version} org.keycloak keycloak-model-jpa - ${project.version} org.keycloak keycloak-model-mongo - ${project.version} org.jboss.resteasy @@ -145,23 +139,19 @@ org.keycloak keycloak-testsuite-performance - ${project.version} test-jar org.keycloak keycloak-services - ${project.version} org.jboss.resteasy jaxrs-api - ${resteasy.version} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version} log4j @@ -193,33 +183,14 @@ org.bouncycastle - >bcprov-jdk15on - ${bouncycastle.crypto.version} + bcprov-jdk15on - org.mongodb mongo-java-driver ${mongo.driver.version} - org.hibernate.javax.persistence hibernate-jpa-2.0-api @@ -246,7 +217,6 @@ ${slf4j.version} - mysql mysql-connector-java diff --git a/testsuite/proxy/pom.xml b/testsuite/proxy/pom.xml index cf993073e9..44f88942cc 100755 --- a/testsuite/proxy/pom.xml +++ b/testsuite/proxy/pom.xml @@ -21,18 +21,15 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.keycloak keycloak-admin-client - ${project.version} org.keycloak keycloak-proxy-server - ${project.version} log4j @@ -54,12 +51,10 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} log4j @@ -78,27 +73,18 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} org.jboss.resteasy resteasy-multipart-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} com.google.zxing @@ -116,22 +102,18 @@ org.keycloak keycloak-ldap-federation - ${project.version} org.keycloak keycloak-kerberos-federation - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-tomcat7-adapter - ${project.version} org.jboss.logging @@ -212,13 +194,11 @@ org.keycloak keycloak-testsuite-integration - ${project.version} test org.keycloak keycloak-testsuite-integration - ${project.version} test-jar test diff --git a/testsuite/tomcat6/pom.xml b/testsuite/tomcat6/pom.xml index 68d9899f4f..8408cc2d8d 100755 --- a/testsuite/tomcat6/pom.xml +++ b/testsuite/tomcat6/pom.xml @@ -20,201 +20,20 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom - - org.keycloak - keycloak-admin-client - ${project.version} - - - log4j - log4j - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - - - org.jboss.resteasy - jaxrs-api - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-jaxrs - ${resteasy.version.latest} - - - log4j - log4j - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-simple - - - - - org.jboss.resteasy - resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-multipart-provider - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-jackson-provider - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-undertow - ${resteasy.version.latest} - - - com.google.zxing - javase - - - org.bouncycastle - bcprov-jdk15on - - - org.apache.httpcomponents - httpclient - ${keycloak.apache.httpcomponents.version} - - - org.keycloak - keycloak-ldap-federation - ${project.version} - org.keycloak - keycloak-kerberos-federation - ${project.version} + keycloak-testsuite-integration org.keycloak - keycloak-undertow-adapter - ${project.version} + keycloak-testsuite-integration + test-jar org.keycloak keycloak-tomcat6-adapter - ${project.version} - - - org.jboss.logging - jboss-logging - - - io.undertow - undertow-servlet - - - io.undertow - undertow-core - - - org.codehaus.jackson - jackson-core-asl - - - org.codehaus.jackson - jackson-mapper-asl - - - org.codehaus.jackson - jackson-xc - - - junit - junit - - - org.hamcrest - hamcrest-all - - - org.hibernate.javax.persistence - hibernate-jpa-2.0-api - - - com.h2database - h2 - - - org.hibernate - hibernate-entitymanager - - - com.icegreen - greenmail - - - org.slf4j - slf4j-api - - - - - org.infinispan - infinispan-core - - - org.seleniumhq.selenium - selenium-java - - - xml-apis - xml-apis - - - org.seleniumhq.selenium - selenium-chrome-driver - - - org.wildfly - wildfly-undertow - ${wildfly.version} - test - - - org.keycloak - keycloak-testsuite-integration - ${project.version} - test - - - org.keycloak - keycloak-testsuite-integration - ${project.version} - test-jar - test org.apache.tomcat @@ -232,6 +51,7 @@ ${tomcat.version} + diff --git a/testsuite/tomcat7/pom.xml b/testsuite/tomcat7/pom.xml index 83e8143fa7..fd2f842420 100755 --- a/testsuite/tomcat7/pom.xml +++ b/testsuite/tomcat7/pom.xml @@ -21,13 +21,11 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.keycloak keycloak-admin-client - ${project.version} log4j @@ -49,12 +47,10 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} log4j @@ -73,27 +69,18 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} org.jboss.resteasy resteasy-multipart-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} com.google.zxing @@ -111,22 +98,18 @@ org.keycloak keycloak-ldap-federation - ${project.version} org.keycloak keycloak-kerberos-federation - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-tomcat7-adapter - ${project.version} org.jboss.logging @@ -207,13 +190,11 @@ org.keycloak keycloak-testsuite-integration - ${project.version} test org.keycloak keycloak-testsuite-integration - ${project.version} test-jar test diff --git a/testsuite/tomcat8/pom.xml b/testsuite/tomcat8/pom.xml index f6c0697a6e..598921e418 100755 --- a/testsuite/tomcat8/pom.xml +++ b/testsuite/tomcat8/pom.xml @@ -20,13 +20,11 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.keycloak keycloak-admin-client - ${project.version} log4j @@ -48,12 +46,10 @@ org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} log4j @@ -72,27 +68,18 @@ org.jboss.resteasy resteasy-client - ${resteasy.version.latest} - - - org.jboss.resteasy - resteasy-crypto - ${resteasy.version.latest} org.jboss.resteasy resteasy-multipart-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-jackson-provider - ${resteasy.version.latest} org.jboss.resteasy resteasy-undertow - ${resteasy.version.latest} com.google.zxing @@ -110,22 +97,18 @@ org.keycloak keycloak-ldap-federation - ${project.version} org.keycloak keycloak-kerberos-federation - ${project.version} org.keycloak keycloak-undertow-adapter - ${project.version} org.keycloak keycloak-tomcat8-adapter - ${project.version} org.jboss.logging @@ -206,13 +189,11 @@ org.keycloak keycloak-testsuite-integration - ${project.version} test org.keycloak keycloak-testsuite-integration - ${project.version} test-jar test diff --git a/testsuite/tools/pom.xml b/testsuite/tools/pom.xml index dc1fd578ff..cb4c3d2dcd 100755 --- a/testsuite/tools/pom.xml +++ b/testsuite/tools/pom.xml @@ -18,19 +18,16 @@ org.keycloak keycloak-dependencies-server-all - ${project.version} pom org.jboss.resteasy jaxrs-api - ${resteasy.version.latest} org.jboss.resteasy resteasy-jaxrs - ${resteasy.version.latest} org.jboss.spec.javax.servlet diff --git a/timer/api/pom.xml b/timer/api/pom.xml index 64bcec09fc..700b6ca87b 100755 --- a/timer/api/pom.xml +++ b/timer/api/pom.xml @@ -15,13 +15,11 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided diff --git a/timer/basic/pom.xml b/timer/basic/pom.xml index 06ee6d654e..177710d922 100755 --- a/timer/basic/pom.xml +++ b/timer/basic/pom.xml @@ -16,19 +16,16 @@ org.keycloak keycloak-core - ${project.version} provided org.keycloak keycloak-model-api - ${project.version} provided org.keycloak keycloak-timer-api - ${project.version} provided From f037aaa1afec5a961ed798bfe73d884ae502bba7 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 23 Apr 2015 11:19:20 +0200 Subject: [PATCH 10/16] Removed project-integrations as it's moved to a separate repo --- project-integrations/README.md | 4 - project-integrations/aerogear-ups/README.md | 50 ------- project-integrations/aerogear-ups/app/pom.xml | 135 ------------------ .../app/src/main/resources/META-INF/beans.xml | 24 ---- .../WEB-INF/jboss-deployment-structure.xml | 12 -- .../app/src/main/webapp/WEB-INF/jboss-web.xml | 5 - .../app/src/main/webapp/WEB-INF/keycloak.json | 8 -- .../app/src/main/webapp/WEB-INF/web.xml | 41 ------ .../app/src/main/webapp/admin/admin.html | 1 - .../app/src/main/webapp/index.html | 13 -- .../app/src/main/webapp/ups/view.jsp | 13 -- .../aerogear-ups/auth-server/pom.xml | 90 ------------ .../ups/security/UpsSecurityApplication.java | 41 ------ .../resources/META-INF/keycloak-server.json | 65 --------- .../resources/META-INF/keycloak-themes.json | 6 - .../account/resources/css/account.css | 8 -- .../aerogear/account/resources/img/logo.png | Bin 6329 -> 0 bytes .../theme/aerogear/account/theme.properties | 4 - .../aerogear/admin/resources/css/styles.css | 45 ------ .../aerogear/admin/resources/img/logo.png | Bin 6329 -> 0 bytes .../theme/aerogear/admin/theme.properties | 4 - .../aerogear/login/resources/css/login.css | 9 -- .../aerogear/login/resources/img/logo.png | Bin 6329 -> 0 bytes .../theme/aerogear/login/theme.properties | 4 - .../WEB-INF/jboss-deployment-structure.xml | 23 --- .../src/main/webapp/WEB-INF/testrealm.json | 80 ----------- .../src/main/webapp/WEB-INF/web.xml | 71 --------- project-integrations/aerogear-ups/pom.xml | 31 ---- project-integrations/pom.xml | 30 ---- 29 files changed, 817 deletions(-) delete mode 100644 project-integrations/README.md delete mode 100755 project-integrations/aerogear-ups/README.md delete mode 100755 project-integrations/aerogear-ups/app/pom.xml delete mode 100644 project-integrations/aerogear-ups/app/src/main/resources/META-INF/beans.xml delete mode 100755 project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/jboss-deployment-structure.xml delete mode 100755 project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/jboss-web.xml delete mode 100644 project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/keycloak.json delete mode 100755 project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml delete mode 100755 project-integrations/aerogear-ups/app/src/main/webapp/admin/admin.html delete mode 100755 project-integrations/aerogear-ups/app/src/main/webapp/index.html delete mode 100755 project-integrations/aerogear-ups/app/src/main/webapp/ups/view.jsp delete mode 100755 project-integrations/aerogear-ups/auth-server/pom.xml delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/UpsSecurityApplication.java delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/META-INF/keycloak-server.json delete mode 100644 project-integrations/aerogear-ups/auth-server/src/main/resources/META-INF/keycloak-themes.json delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/resources/css/account.css delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/resources/img/logo.png delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/theme.properties delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/resources/css/styles.css delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/resources/img/logo.png delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/theme.properties delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/resources/css/login.css delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/resources/img/logo.png delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/theme.properties delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/testrealm.json delete mode 100755 project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/web.xml delete mode 100755 project-integrations/aerogear-ups/pom.xml delete mode 100755 project-integrations/pom.xml diff --git a/project-integrations/README.md b/project-integrations/README.md deleted file mode 100644 index 02814ee58a..0000000000 --- a/project-integrations/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Keycloak External Project Integrations -========== - -Everthing in this directory is examples related to integration with non-keycloak projects. Its a sandbox we use to test integrations with third-party projects diff --git a/project-integrations/aerogear-ups/README.md b/project-integrations/aerogear-ups/README.md deleted file mode 100755 index 780081b7b0..0000000000 --- a/project-integrations/aerogear-ups/README.md +++ /dev/null @@ -1,50 +0,0 @@ -Self Bootstrapping Keycloak Server and Application -========================================================== - -To get this running boot up JBoss AS7, EAP or WildFly. - -To deploy to AS7 run: - - mvn clean install jboss-as:deploy - -To deploy to WildFly run: - - mvn -Pwildfly clean install wildfly:deploy - -This is an example of bundling two wars: a keycloak server war and application WAR together so that keycloak is bootstrapped out of the -box. The structure of the example is: - -* The aerogear UPS application [http://localhost:8080/aerogear-ups/ups/view.jsp](http://localhost:8080/aerogear-ups/ups/view.jsp) -* The aerogear UPS admin [http://localhost:8080/aerogear-ups/admin/admin.html](http://localhost:8080/aerogear-ups/admin/admin.html) -* The aerogear security admin (keycloak) [http://localhost:8080/auth/admin/aerogear/console/index.html](http://localhost:8080/auth/admin/aerogear/console/index.html) -* The aerogear user account page (keycloak) [http://localhost:8080/auth/realms/aerogear/account](http://localhost:8080/auth/realms/aerogear/account) -* All of these are managed under one realm "aerogear" -* The login page, admin console, and account pages all use the "aerogear" theme - -If you click on any of those URLS, you are brought to a log-in screen. Username: admin Password: admin. You will be asked -to change your password. Once you are logged in, you have SSO to any of those links. - -Notes on implementation: - -* There is a testrealm.json file that is used to bootstrap the realm in the auth-server/ project -* Notice that there is a context-param in auth-server/web.xml called keycloak.import.realm.resources. This sets up the import of the json file -* If you open up testrealm.json, notice that all urls are relative. Keycloak will now extrapolate the host and port based -on the request if the configured urls are just a path and don't have a schem, host, and port. -* In the auth project, there is a AerogearThemeProvider class. This sets up classloader access to the "aerogear" themes -* In the auth project, there is a UpsSecurityApplication class. The sole purpose of this class is to disable the "master" - realm by deleting the master realm's "admin" user -* In the auth project resources/, there are files there to set up all the themes -* In app, there is a BootstrapListener class. This obtains the config context of the adapter and initializes it. -* Notice that BootstrapListener class sets up a relative URL. Also notice that the application is a "public" client. This is so that -we don't have to query the database for the application's secret. Also notice that the realm key is not set. Keycloak adapter -will now query the auth server url for the public key of the realm. - -Problems: -* Biggest problem is SSL. You have to crack open web.xml to set up a confidential security constraint. You also have -to change the adapter config and the realm config to make SSL required. -* You need to set this logging config in standalone.xml otherwise you will get a lot of warning messages when accessing the admin console - - - - - diff --git a/project-integrations/aerogear-ups/app/pom.xml b/project-integrations/aerogear-ups/app/pom.xml deleted file mode 100755 index 9e0cea280f..0000000000 --- a/project-integrations/aerogear-ups/app/pom.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - ../../../pom.xml - - - 4.0.0 - ups-example-app - war - Keycloak Secured App EAP 6.x - - - - - org.bouncycastle - bcprov-jdk15on - - - org.keycloak - keycloak-core - - - org.keycloak - keycloak-adapter-core - - - org.keycloak - keycloak-jboss-adapter-core - - - net.iharder - base64 - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - provided - - - - org.jboss.resteasy - resteasy-jaxrs - provided - - - org.jboss.resteasy - async-http-servlet-3.0 - provided - - - org.jboss.resteasy - jaxrs-api - provided - - - org.jboss.resteasy - resteasy-jackson-provider - provided - - - - - javax.enterprise - cdi-api - 1.0-SP4 - provided - - - - - - aerogear-ups - - - org.jboss.as.plugins - jboss-as-maven-plugin - - false - - - - org.wildfly.plugins - wildfly-maven-plugin - - false - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - - - - - - - as7 - - true - - - - org.keycloak - keycloak-as7-adapter - - - - - wildfly - - - org.keycloak - keycloak-wildfly-adapter - - - - - - diff --git a/project-integrations/aerogear-ups/app/src/main/resources/META-INF/beans.xml b/project-integrations/aerogear-ups/app/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 57025b5976..0000000000 --- a/project-integrations/aerogear-ups/app/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/jboss-deployment-structure.xml deleted file mode 100755 index 6a8cb7f022..0000000000 --- a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/jboss-web.xml b/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/jboss-web.xml deleted file mode 100755 index f271d397e2..0000000000 --- a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/jboss-web.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.keycloak.adapters.jbossweb.KeycloakAuthenticatorValve - - \ No newline at end of file diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/keycloak.json b/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/keycloak.json deleted file mode 100644 index 70c79a191b..0000000000 --- a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/keycloak.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "realm" : "aerogear", - "auth-server-url" : "/auth", - "ssl-required" : "external", - "resource" : "unified-push-server", - "public-client" : true, - "disable-trust-manager" : true -} \ No newline at end of file diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml b/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index d569afe312..0000000000 --- a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - aerogear-ups - - - - UPS - /ups/* - - - user - - - - - - AdminConsole - /admin/* - - - admin - - - - - KEYCLOAK - demo - - - - admin - - - user - - - diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/admin/admin.html b/project-integrations/aerogear-ups/app/src/main/webapp/admin/admin.html deleted file mode 100755 index 8102dc0e3d..0000000000 --- a/project-integrations/aerogear-ups/app/src/main/webapp/admin/admin.html +++ /dev/null @@ -1 +0,0 @@ -

This would be the admin page for the UPS admin console.

\ No newline at end of file diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/index.html b/project-integrations/aerogear-ups/app/src/main/webapp/index.html deleted file mode 100755 index 83a804267a..0000000000 --- a/project-integrations/aerogear-ups/app/src/main/webapp/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - -

Aerogear UPS Portal

- -

Play with Aerogear UPS

- - - \ No newline at end of file diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/ups/view.jsp b/project-integrations/aerogear-ups/app/src/main/webapp/ups/view.jsp deleted file mode 100755 index ae21dbc3cc..0000000000 --- a/project-integrations/aerogear-ups/app/src/main/webapp/ups/view.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" %> - - - Aerogear - UPS View Page - - - - Protected page... - -

- - \ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/pom.xml b/project-integrations/aerogear-ups/auth-server/pom.xml deleted file mode 100755 index 373830bc94..0000000000 --- a/project-integrations/aerogear-ups/auth-server/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - ../../../pom.xml - - - 4.0.0 - ups-auth-server - war - UPS Auth Server - - - - - org.keycloak - keycloak-dependencies-server-min - pom - - - - org.jboss.resteasy - resteasy-jaxrs - provided - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - provided - - - org.keycloak - keycloak-connections-jpa - - - org.keycloak - keycloak-connections-jpa-liquibase - - - org.keycloak - keycloak-model-jpa - - - org.keycloak - keycloak-model-sessions-mem - - - org.keycloak - keycloak-model-sessions-jpa - - - - - auth-server - - - org.jboss.as.plugins - jboss-as-maven-plugin - - false - - - - org.wildfly.plugins - wildfly-maven-plugin - - false - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - - - - diff --git a/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/UpsSecurityApplication.java b/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/UpsSecurityApplication.java deleted file mode 100755 index c4f8c9be24..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/UpsSecurityApplication.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.aerogear.ups.security; - -import org.jboss.resteasy.core.Dispatcher; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.services.resources.KeycloakApplication; - -import javax.servlet.ServletContext; -import javax.ws.rs.core.Context; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public class UpsSecurityApplication extends KeycloakApplication { - public UpsSecurityApplication(@Context ServletContext context, @Context Dispatcher dispatcher) { - super(context, dispatcher); - } - - @Override - protected void setupDefaultRealm(String contextPath) { - super.setupDefaultRealm(contextPath); - - KeycloakSession session = sessionFactory.create(); - session.getTransaction().begin(); - - // disable master realm by deleting the admin user. - try { - RealmManager manager = new RealmManager(session); - RealmModel master = manager.getKeycloakAdminstrationRealm(); - UserModel admin = session.users().getUserByUsername("admin", master); - if (admin != null) session.users().removeUser(master, admin); - session.getTransaction().commit(); - } finally { - session.close(); - } - - } -} diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/META-INF/keycloak-server.json b/project-integrations/aerogear-ups/auth-server/src/main/resources/META-INF/keycloak-server.json deleted file mode 100755 index 3b7e193d47..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/resources/META-INF/keycloak-server.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "admin": { - "realm": "master" - }, - - "realm": { - "provider": "jpa" - }, - - "user": { - "provider": "jpa" - }, - - "userSessions": { - "provider" : "mem" - }, - - "realmCache": { - "provider": "mem" - }, - - "userCache": { - "provider": "mem", - "mem": { - "maxSize": 20000 - } - }, - - "timer": { - "provider": "basic" - }, - - "theme": { - "default": "keycloak", - "staticMaxAge": 2592000, - "cacheTemplates": true, - "cacheThemes": true, - "folder": { - "dir": "${jboss.server.config.dir}/themes" - } - }, - - "login": { - "provider": "freemarker" - }, - - "account": { - "provider": "freemarker" - }, - - "email": { - "provider": "freemarker" - }, - - "scheduled": { - "interval": 900 - }, - - "connectionsJpa": { - "default": { - "dataSource": "java:jboss/datasources/ExampleDS", - "databaseSchema": "update" - } - } -} \ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/META-INF/keycloak-themes.json b/project-integrations/aerogear-ups/auth-server/src/main/resources/META-INF/keycloak-themes.json deleted file mode 100644 index 09db937822..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/resources/META-INF/keycloak-themes.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "themes": [{ - "name" : "aerogear", - "types": [ "admin", "account", "login" ] - }] -} \ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/resources/css/account.css b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/resources/css/account.css deleted file mode 100755 index 28b20bbb38..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/resources/css/account.css +++ /dev/null @@ -1,8 +0,0 @@ -.navbar-title { - background-image: url('../img/logo.png'); - height: 65px; - background-repeat: no-repeat; - width: 203px; - margin: 3px 10px 5px; - text-indent: -99999px; -} \ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/resources/img/logo.png b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/resources/img/logo.png deleted file mode 100755 index d55812da2460a8d4aa504ccc7fc469a63eaedbcd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6329 zcmV;q7)IxbP)kZDq7|d{h*%mzbXWhN_+H372s!D`2i;rif4zrMn*!Dyb zCW1}`8K~&or1H9#`dh!V1&J8PnL|TH@^?k#ZiNe7y6jS4)TK#P?;SX$ik+o+`dfhr z;qmdzieLVoWxt~L-o$YwRQh>67O+F z5iyR_oL%YTll-P{1;`Dj=#~#8me>CH6y58zCbH%@jj7K}&Gwo8EvL{hP`LY4-RpEG z60PcIcFat<-cTM^;jkd@s%^h3@DXDCM9?XxS|5S!r~00!D-q-9M;fOmk2E~;EHGFU zK(7;#*4F-VclDiqy76g8#I5Q_)FUf_!TqgAM^q$Y9IZrVj((y(BQ-~aoBBvxlfp}) z^4}PCBbM$IqITl7Mg7(VDiSX$Nr>J6d=-dx6C}!1;ITf^>x?E6t?CErXC;pjOEv>> zy^$j->uj_nHp=sd^VV!R9L|_MbH>LtHT!N*k-LCvo%$$}lT=<))EnK-1|r7M4>Zh7 zeFfEj?70Ma6Wh8s@wu&k?v);ysW*Zy0j}zJUEz?8Tt2G2W_xespXo%5;}o+!bM#=7 z=$_vk4n!@KgTs|hSN#U;+^2^VXs}-3!`hkSCTi*nIG|cWtM0CcN}u20}%cRF&IDmep-O6*>Woe75=x z49#+C6G*O~l|1HD>C)ePX8pC)(z ziNJ>djWfnyY#aVG112KGVoNNdF$zaj*o`e44a=@dsI2=qtQ(6+{fvuK#V{_%HWCmW zDKOF&hKpjTU<+)=mTD3Eebe&3A78PhK9tyo%;XFa!%$28VyMp+({HHy63S~{?%cON z{nAUt^xt9_W<_Mp(N8pFq~3%CbyE&Ei~pjF%C`OelquDLhRm@Sfms81J6;!+hb_~3 z)v)DmkSTyTOK8U@@Qh;RySavq8OfO{k^@{#_cI3G5!DA0p4+To1ZT)lgobgfT_^cd7?*Jx1%U(~!t?DmCCxz(oXnz?7w5&fAE$Dn*MZam-MpbL3 za45q7@G8s&^X_Y=dOrCVG}iGf_p#8ZwgCH_l0n?bb-coKc^VGHZ~}U!&+_ zv>FBg%E*XY)n5pcg5(x9`MkdW?5XI#KeX@~vGqC;orE$LWDhEhV(5E{t{(oQ!d>CW zu?+J+J+}RwPM6&dcL>F~DpI*4BlRm6uB~~kV}n>y-3P1Ro76Yp$H0%mAEMtA7xNa; zgs|PJMZaA)M4NqGr>0Ic+s3|?^U@E6ui$5o?U|{gO!O^axKq2r^GW5k)4D5n&%<|K zES9wt=Tg`<{0fyGkKQxnhlOGI>nR(7E4!)q| zg3hO}xVlxrc_D0jwVL!5Tg{I`eLNzMbW@4X4kFSpGx<&v{TnWZ0f0(HcSZmG!G$-8 zWxY>u!vOFIWLkdNyk|-7H$n^eIP!{jPj*~?iLm! z!!nLVt16N~FAGbg$aD$M7yV38KP!1mLuSg$s60W4ghRu!tGXk5_s?=JGgM1~sBR1! zEbz>}2XZokbrPryLspHdq>If2kegKGcHkqo&W2_DQ^18aY6-jz)PVd6k=39NA^L65 zOi`UCFkjH00-pv`#DZ~Q=o=2{(YG;U+#gho4Zr|LU9kJYI6hF3CE>YMO3+`I&e)xU~z?W8+Y$6PTOmtxHWRt9de{apV-0#cNCaIedilo+@~@BIu?t zdv@#WDAnE{h#Vw$pW0jqi?rUB<&+w>DcD*#nU^qH;^p6?K;+ zl-EAZ8nqyt9dfTXo$jw8#xE*fH|Ez_(?0BhqGu&4vMDUrR70kew6i~dK>{B0s?a?{ z-BLeKe!hpiJik-Bh&HL)BcLQVW~OX+5q*y1Rq0)3hJeqtO`Q$WwZHK5gb8&&B2T-F z3#p`_nXX?<5G?E&K)A_uXFX!uo3!icoLx}if^cQphWC7zALs58yT{!101xD@RKq%W z)aU(5c-Iybo>t3ln)TK&u!$6b%Fk3Jsf|DtKiwq>`b1um+ij=hI(phbs*A}56K-2xT+ zJh!J-kjD&<{S)>|K)ki{bYde7CiEV7NMkNtf@S zdd~Q$K|cSFA^CQJFxO{}SiKkVFh;1_&4}z0_{31H{q?-`x}L}lMRrN$B##>Vdg2l`5Aqj?a=UFQ zIVDxQP~C{i6NU5AUQAfiaI9fwaxE%dA~l^DUOi`g)Fo@SG>5vMA#$F&_-eLkJU;A) z%RU8OZ2fRBfBw)W({sHDlR>9|TpUDv!-+r2{=PgaNIMzmwy9&I&xtnIDNOFIY`1kz zPYCW-sRUVA8!vu3@Yq{J4#yk-hB$OE{gyW!C=OSdoT4JHct^}o$N`;R~C=g z`>4VoF|4}^Z_8*;q{}U-ny$+2?VVc|ozoG$7`OyLkS7)XJ;c`_gM8Mtv_8TgDWznT+UU;QV$aw8P?(WwSHLvU4BsYB=}n zK)`Oe+I+9?wvF}VyH$-zhyKxU&yqYAb2#cR0D|!XsH1V9I^~X46@xK3GS#O&uE@9c=~+LhMD^i0J!>C@Kcn=|Nn=KASmQ zqXs7KE|s8ve(XCpw^+X?=r3HfX%IAlE~lt!fFgyV6b*q#RSL37UXBUWGw5S`0WRql zg57!MnAjWTRHZz-q~dM?S-84tWOi|7+Je;;mjfiNt$Pf3xsw7hCehyvN48;5Oy@%#Dfm+wT%GZM_pi$g{GCHW1;V~wfgO2qA z-No+gR*CkuOf^PSevw^VdC<1BQJ~VW&Bp}YU&-pkxpYAOI15F^uB`Efp2%Z ze6FC2Rryn#C;GtNB@6$!Z^^=Y_db|2k^KA~B!`QuaR^*mpLV&^n$wZJGg1Q5T*ON- z^2mx2YQ`FDjFC{6!@@@)}tL04hLH33W3S``??PsGgB8U`gn)- zNjttiZrX*LfXSCR1wUlh1n3^vfQ{MM48i0ij| zMdO_DLlf3)*$?e5*gPcIGb1N=&0!hVbaD4cb}qYPT0m}#t@?t9YZ}AAXgPch4vWM) ze_a|!Y>ewM`-09b$Vz{@cxSv z%01l`5*~V8&Z?>$=A{)Rcx#t6_>v!?Ljb|Bji(zj$6giA$s@z>FIv3!f!u9~E`}gK zY%omGVQQMMhpS~$Wp#C9M)D5#%|1C_;88UoI@)XrDYia7ZI6A2v*QCQAPviYM?J33 znpb`Px`xb@THtfh(dGz3WHhTfZ|L;|$0^nbvfcpcvgj4Ryh4zCd{yW7O!#7AZ@~Rf zW54>0F0(+vZD}t7AGnN3UHDYFX2iVPt z=X0;Ziz3`M{QiQ;PNCi)qE%IY8Fv5RjM|l+++NGlnt|;0{|PO1FJGo56+PtH!g4Y< z0T-;OINvbEJrPa1F2D=3(~jn>s(cl3iB+pi1Mcg5*?{wdxGM(=v(t_`tH43Gakk|h z3Us6PS{nu9C-L=fKbe=8XA6i`Qu!##jS!Peh#hTOLYa@^JN`sr_UwRKg9R%p&Nn?W z2jyD|Uv&Pr$P)l+bCu&{tz7Oi4i^Fc9M(T)_8My#JWb07^5;Z-5*2su1^2Dm6V`Ya zBA<+-w=JDL`xvd;6!TYCT!u<` zZj|!iF>myPtLNU>c`*&Z^7-kzfyaTzb5>O?M)aY;;XGfMl~xR(23NU-OGUV)Av5Kp z#4GCZ-12~2$y?KW0rbi+020KN-&p-cbCo0bo^BoHC_mMBO~O(yR#-<;2SQV^SUR??G|=*i(z!o(=xsg z-dG+ioHzY`H^b;m;k>km1(^r5XTFMP$q9KHENTPruMO`ezq}(or7t3TJtDrMZf|0F z%?*ft6WmkPgRoc7DjTT@l)Le$VVHA4cLyJ?yAgfRZx~|`o_6YCbTjcV7y&cK_ex7+ zA=m<$1KF!8Z+BKogqC%O^BSVX=zihYb{ZjSe?fyLp@OI`FPN8pe|KdUWTh47uBwVw z(PaRtTn>~12)a~TB5}bE0{DuUY;MR%xjS)fZP;l!eNAFn-7~w=ud48S4yCKgG(pA! zgA{ERqzR!3wVMQ*RHaeT*A0*PdcyCkUDp;PpRIml+tjh+Vxo=jDqI6HULmeEQn(FR zv*&Yz%C9Wk=mXd`b?iMc(dGt3V^Jfsb5+2+jT>J{jF&|J$}F2Tv~me>`dzBK`7#$D&5K_`v)~G?5R%i4RI@W zUU=wUl+l7*n^RQeEzHjLC6w3wb!W!Kms#Rj0o>@S9t=WQ)i5(9Ly)Bjp4wO2igQjS z@f9170?)L5`h<(0|KK2y@7A8wwXfss(V4{Z+GRb_C%~;z)stDl=kXucfK56T9E)rE z6_sUxbHY68HBwc8pJ%WH2E(QL;OQ`I*N z(JO4*nh5#|Ha}?arM%aenOxYIkvz3}&iG#KR!0b=-8foPE!>jl`UL5;c_Y~F4`E9P za(8z>mSy+K;0orYtrqMnLEm+1x5WtS*D4s&yt4#o%bS{@!dvrKRYew~gC)dq4 zYyXVH+parD|i);KKvjD+_Hj*vt{t5+LXwVh`l1j;izaja3_GDsLfvd#{uWGYSp6bRaM7q^}b@6(MQ{o z7w>v}eYAg|Zp=}PO4X^Z- z+z5S#2f$WOde9nSmC~ZDw70?)nq5+{UQ}|OTO}cW^sL0iBJF1x&C9={#a{g+~Fq`TSP?=L_|eZq-8BHjz{FTQJ9ss zVoqskaa+2`oYGQr@Zsot1^Fp3{qUifKjsuwWfW$oxgKmB;mqZ8CgUH)tdw?4Dn_@|aV+2~Sqosve)BCN?B0}F1c@KFHSbl5z vdtiS_gvA1DXeq|oB)+D*`dhaMeaHU;?X5uB)4D@000000NkvXXu0mjf{O@)V diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/theme.properties b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/theme.properties deleted file mode 100755 index 04feb70eda..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/account/theme.properties +++ /dev/null @@ -1,4 +0,0 @@ -parent=keycloak -import=common/keycloak - -styles= ../patternfly/lib/patternfly/css/patternfly.css ../patternfly/css/account.css ../keycloak/css/account.css css/account.css \ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/resources/css/styles.css b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/resources/css/styles.css deleted file mode 100755 index 84300fe265..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/resources/css/styles.css +++ /dev/null @@ -1,45 +0,0 @@ -@import url("../lib/patternfly/css/patternfly.css"); -@import url("../lib/select2-3.4.1/select2.css"); - -@import url("admin-console.css"); -@import url("tables.css"); -@import url("sprites.css"); - -.navbar-pf { - background-image: url('../img/header-bkgrnd.png'); - border-top: 3px solid rgba(255, 255, 255, 0.15); -} - -.navbar-pf .navbar-primary { - font-size: 13px; - background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,.4) 100%); - background-image: linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,.4) 100%); -} - -.navbar-pf .navbar-header { - border-bottom: 1px solid rgba(255,255,255,.15); -} - -.navbar-pf .navbar-primary li.dropdown.context > a, -.navbar-pf .navbar-primary li.dropdown.context > a:hover, -.navbar-pf .navbar-primary li.dropdown.context.open > a, -.navbar-pf .navbar-primary > .active > a, -.navbar-pf .navbar-primary > .active > a:hover{ - background-color: rgba(0,0,0,0.1); - background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%); - background-image: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%); - border-bottom: none; - border-right-color: rgba(255,255,255,0.15); - border-top-color: rgba(255,255,255,0.05); -} - -/* this is what I added */ - -.navbar-title { - background-image: url('../img/logo.png'); - height: 65px; - background-repeat: no-repeat; - width: 203px; - margin: 3px 10px 5px; - text-indent: -99999px; -} diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/resources/img/logo.png b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/resources/img/logo.png deleted file mode 100755 index d55812da2460a8d4aa504ccc7fc469a63eaedbcd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6329 zcmV;q7)IxbP)kZDq7|d{h*%mzbXWhN_+H372s!D`2i;rif4zrMn*!Dyb zCW1}`8K~&or1H9#`dh!V1&J8PnL|TH@^?k#ZiNe7y6jS4)TK#P?;SX$ik+o+`dfhr z;qmdzieLVoWxt~L-o$YwRQh>67O+F z5iyR_oL%YTll-P{1;`Dj=#~#8me>CH6y58zCbH%@jj7K}&Gwo8EvL{hP`LY4-RpEG z60PcIcFat<-cTM^;jkd@s%^h3@DXDCM9?XxS|5S!r~00!D-q-9M;fOmk2E~;EHGFU zK(7;#*4F-VclDiqy76g8#I5Q_)FUf_!TqgAM^q$Y9IZrVj((y(BQ-~aoBBvxlfp}) z^4}PCBbM$IqITl7Mg7(VDiSX$Nr>J6d=-dx6C}!1;ITf^>x?E6t?CErXC;pjOEv>> zy^$j->uj_nHp=sd^VV!R9L|_MbH>LtHT!N*k-LCvo%$$}lT=<))EnK-1|r7M4>Zh7 zeFfEj?70Ma6Wh8s@wu&k?v);ysW*Zy0j}zJUEz?8Tt2G2W_xespXo%5;}o+!bM#=7 z=$_vk4n!@KgTs|hSN#U;+^2^VXs}-3!`hkSCTi*nIG|cWtM0CcN}u20}%cRF&IDmep-O6*>Woe75=x z49#+C6G*O~l|1HD>C)ePX8pC)(z ziNJ>djWfnyY#aVG112KGVoNNdF$zaj*o`e44a=@dsI2=qtQ(6+{fvuK#V{_%HWCmW zDKOF&hKpjTU<+)=mTD3Eebe&3A78PhK9tyo%;XFa!%$28VyMp+({HHy63S~{?%cON z{nAUt^xt9_W<_Mp(N8pFq~3%CbyE&Ei~pjF%C`OelquDLhRm@Sfms81J6;!+hb_~3 z)v)DmkSTyTOK8U@@Qh;RySavq8OfO{k^@{#_cI3G5!DA0p4+To1ZT)lgobgfT_^cd7?*Jx1%U(~!t?DmCCxz(oXnz?7w5&fAE$Dn*MZam-MpbL3 za45q7@G8s&^X_Y=dOrCVG}iGf_p#8ZwgCH_l0n?bb-coKc^VGHZ~}U!&+_ zv>FBg%E*XY)n5pcg5(x9`MkdW?5XI#KeX@~vGqC;orE$LWDhEhV(5E{t{(oQ!d>CW zu?+J+J+}RwPM6&dcL>F~DpI*4BlRm6uB~~kV}n>y-3P1Ro76Yp$H0%mAEMtA7xNa; zgs|PJMZaA)M4NqGr>0Ic+s3|?^U@E6ui$5o?U|{gO!O^axKq2r^GW5k)4D5n&%<|K zES9wt=Tg`<{0fyGkKQxnhlOGI>nR(7E4!)q| zg3hO}xVlxrc_D0jwVL!5Tg{I`eLNzMbW@4X4kFSpGx<&v{TnWZ0f0(HcSZmG!G$-8 zWxY>u!vOFIWLkdNyk|-7H$n^eIP!{jPj*~?iLm! z!!nLVt16N~FAGbg$aD$M7yV38KP!1mLuSg$s60W4ghRu!tGXk5_s?=JGgM1~sBR1! zEbz>}2XZokbrPryLspHdq>If2kegKGcHkqo&W2_DQ^18aY6-jz)PVd6k=39NA^L65 zOi`UCFkjH00-pv`#DZ~Q=o=2{(YG;U+#gho4Zr|LU9kJYI6hF3CE>YMO3+`I&e)xU~z?W8+Y$6PTOmtxHWRt9de{apV-0#cNCaIedilo+@~@BIu?t zdv@#WDAnE{h#Vw$pW0jqi?rUB<&+w>DcD*#nU^qH;^p6?K;+ zl-EAZ8nqyt9dfTXo$jw8#xE*fH|Ez_(?0BhqGu&4vMDUrR70kew6i~dK>{B0s?a?{ z-BLeKe!hpiJik-Bh&HL)BcLQVW~OX+5q*y1Rq0)3hJeqtO`Q$WwZHK5gb8&&B2T-F z3#p`_nXX?<5G?E&K)A_uXFX!uo3!icoLx}if^cQphWC7zALs58yT{!101xD@RKq%W z)aU(5c-Iybo>t3ln)TK&u!$6b%Fk3Jsf|DtKiwq>`b1um+ij=hI(phbs*A}56K-2xT+ zJh!J-kjD&<{S)>|K)ki{bYde7CiEV7NMkNtf@S zdd~Q$K|cSFA^CQJFxO{}SiKkVFh;1_&4}z0_{31H{q?-`x}L}lMRrN$B##>Vdg2l`5Aqj?a=UFQ zIVDxQP~C{i6NU5AUQAfiaI9fwaxE%dA~l^DUOi`g)Fo@SG>5vMA#$F&_-eLkJU;A) z%RU8OZ2fRBfBw)W({sHDlR>9|TpUDv!-+r2{=PgaNIMzmwy9&I&xtnIDNOFIY`1kz zPYCW-sRUVA8!vu3@Yq{J4#yk-hB$OE{gyW!C=OSdoT4JHct^}o$N`;R~C=g z`>4VoF|4}^Z_8*;q{}U-ny$+2?VVc|ozoG$7`OyLkS7)XJ;c`_gM8Mtv_8TgDWznT+UU;QV$aw8P?(WwSHLvU4BsYB=}n zK)`Oe+I+9?wvF}VyH$-zhyKxU&yqYAb2#cR0D|!XsH1V9I^~X46@xK3GS#O&uE@9c=~+LhMD^i0J!>C@Kcn=|Nn=KASmQ zqXs7KE|s8ve(XCpw^+X?=r3HfX%IAlE~lt!fFgyV6b*q#RSL37UXBUWGw5S`0WRql zg57!MnAjWTRHZz-q~dM?S-84tWOi|7+Je;;mjfiNt$Pf3xsw7hCehyvN48;5Oy@%#Dfm+wT%GZM_pi$g{GCHW1;V~wfgO2qA z-No+gR*CkuOf^PSevw^VdC<1BQJ~VW&Bp}YU&-pkxpYAOI15F^uB`Efp2%Z ze6FC2Rryn#C;GtNB@6$!Z^^=Y_db|2k^KA~B!`QuaR^*mpLV&^n$wZJGg1Q5T*ON- z^2mx2YQ`FDjFC{6!@@@)}tL04hLH33W3S``??PsGgB8U`gn)- zNjttiZrX*LfXSCR1wUlh1n3^vfQ{MM48i0ij| zMdO_DLlf3)*$?e5*gPcIGb1N=&0!hVbaD4cb}qYPT0m}#t@?t9YZ}AAXgPch4vWM) ze_a|!Y>ewM`-09b$Vz{@cxSv z%01l`5*~V8&Z?>$=A{)Rcx#t6_>v!?Ljb|Bji(zj$6giA$s@z>FIv3!f!u9~E`}gK zY%omGVQQMMhpS~$Wp#C9M)D5#%|1C_;88UoI@)XrDYia7ZI6A2v*QCQAPviYM?J33 znpb`Px`xb@THtfh(dGz3WHhTfZ|L;|$0^nbvfcpcvgj4Ryh4zCd{yW7O!#7AZ@~Rf zW54>0F0(+vZD}t7AGnN3UHDYFX2iVPt z=X0;Ziz3`M{QiQ;PNCi)qE%IY8Fv5RjM|l+++NGlnt|;0{|PO1FJGo56+PtH!g4Y< z0T-;OINvbEJrPa1F2D=3(~jn>s(cl3iB+pi1Mcg5*?{wdxGM(=v(t_`tH43Gakk|h z3Us6PS{nu9C-L=fKbe=8XA6i`Qu!##jS!Peh#hTOLYa@^JN`sr_UwRKg9R%p&Nn?W z2jyD|Uv&Pr$P)l+bCu&{tz7Oi4i^Fc9M(T)_8My#JWb07^5;Z-5*2su1^2Dm6V`Ya zBA<+-w=JDL`xvd;6!TYCT!u<` zZj|!iF>myPtLNU>c`*&Z^7-kzfyaTzb5>O?M)aY;;XGfMl~xR(23NU-OGUV)Av5Kp z#4GCZ-12~2$y?KW0rbi+020KN-&p-cbCo0bo^BoHC_mMBO~O(yR#-<;2SQV^SUR??G|=*i(z!o(=xsg z-dG+ioHzY`H^b;m;k>km1(^r5XTFMP$q9KHENTPruMO`ezq}(or7t3TJtDrMZf|0F z%?*ft6WmkPgRoc7DjTT@l)Le$VVHA4cLyJ?yAgfRZx~|`o_6YCbTjcV7y&cK_ex7+ zA=m<$1KF!8Z+BKogqC%O^BSVX=zihYb{ZjSe?fyLp@OI`FPN8pe|KdUWTh47uBwVw z(PaRtTn>~12)a~TB5}bE0{DuUY;MR%xjS)fZP;l!eNAFn-7~w=ud48S4yCKgG(pA! zgA{ERqzR!3wVMQ*RHaeT*A0*PdcyCkUDp;PpRIml+tjh+Vxo=jDqI6HULmeEQn(FR zv*&Yz%C9Wk=mXd`b?iMc(dGt3V^Jfsb5+2+jT>J{jF&|J$}F2Tv~me>`dzBK`7#$D&5K_`v)~G?5R%i4RI@W zUU=wUl+l7*n^RQeEzHjLC6w3wb!W!Kms#Rj0o>@S9t=WQ)i5(9Ly)Bjp4wO2igQjS z@f9170?)L5`h<(0|KK2y@7A8wwXfss(V4{Z+GRb_C%~;z)stDl=kXucfK56T9E)rE z6_sUxbHY68HBwc8pJ%WH2E(QL;OQ`I*N z(JO4*nh5#|Ha}?arM%aenOxYIkvz3}&iG#KR!0b=-8foPE!>jl`UL5;c_Y~F4`E9P za(8z>mSy+K;0orYtrqMnLEm+1x5WtS*D4s&yt4#o%bS{@!dvrKRYew~gC)dq4 zYyXVH+parD|i);KKvjD+_Hj*vt{t5+LXwVh`l1j;izaja3_GDsLfvd#{uWGYSp6bRaM7q^}b@6(MQ{o z7w>v}eYAg|Zp=}PO4X^Z- z+z5S#2f$WOde9nSmC~ZDw70?)nq5+{UQ}|OTO}cW^sL0iBJF1x&C9={#a{g+~Fq`TSP?=L_|eZq-8BHjz{FTQJ9ss zVoqskaa+2`oYGQr@Zsot1^Fp3{qUifKjsuwWfW$oxgKmB;mqZ8CgUH)tdw?4Dn_@|aV+2~Sqosve)BCN?B0}F1c@KFHSbl5z vdtiS_gvA1DXeq|oB)+D*`dhaMeaHU;?X5uB)4D@000000NkvXXu0mjf{O@)V diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/theme.properties b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/theme.properties deleted file mode 100755 index e328b3f5c6..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/admin/theme.properties +++ /dev/null @@ -1,4 +0,0 @@ -parent=keycloak -import=common/keycloak - -styles= ../keycloak/css/styles.css css/styles.css \ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/resources/css/login.css b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/resources/css/login.css deleted file mode 100755 index 3b9207c170..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/resources/css/login.css +++ /dev/null @@ -1,9 +0,0 @@ -#kc-logo-wrapper { - background-image: url("../img/logo.png"); - background-repeat: no-repeat; - background-position: top right; - - height: 65px; - - margin: 100px; -} diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/resources/img/logo.png b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/resources/img/logo.png deleted file mode 100755 index d55812da2460a8d4aa504ccc7fc469a63eaedbcd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6329 zcmV;q7)IxbP)kZDq7|d{h*%mzbXWhN_+H372s!D`2i;rif4zrMn*!Dyb zCW1}`8K~&or1H9#`dh!V1&J8PnL|TH@^?k#ZiNe7y6jS4)TK#P?;SX$ik+o+`dfhr z;qmdzieLVoWxt~L-o$YwRQh>67O+F z5iyR_oL%YTll-P{1;`Dj=#~#8me>CH6y58zCbH%@jj7K}&Gwo8EvL{hP`LY4-RpEG z60PcIcFat<-cTM^;jkd@s%^h3@DXDCM9?XxS|5S!r~00!D-q-9M;fOmk2E~;EHGFU zK(7;#*4F-VclDiqy76g8#I5Q_)FUf_!TqgAM^q$Y9IZrVj((y(BQ-~aoBBvxlfp}) z^4}PCBbM$IqITl7Mg7(VDiSX$Nr>J6d=-dx6C}!1;ITf^>x?E6t?CErXC;pjOEv>> zy^$j->uj_nHp=sd^VV!R9L|_MbH>LtHT!N*k-LCvo%$$}lT=<))EnK-1|r7M4>Zh7 zeFfEj?70Ma6Wh8s@wu&k?v);ysW*Zy0j}zJUEz?8Tt2G2W_xespXo%5;}o+!bM#=7 z=$_vk4n!@KgTs|hSN#U;+^2^VXs}-3!`hkSCTi*nIG|cWtM0CcN}u20}%cRF&IDmep-O6*>Woe75=x z49#+C6G*O~l|1HD>C)ePX8pC)(z ziNJ>djWfnyY#aVG112KGVoNNdF$zaj*o`e44a=@dsI2=qtQ(6+{fvuK#V{_%HWCmW zDKOF&hKpjTU<+)=mTD3Eebe&3A78PhK9tyo%;XFa!%$28VyMp+({HHy63S~{?%cON z{nAUt^xt9_W<_Mp(N8pFq~3%CbyE&Ei~pjF%C`OelquDLhRm@Sfms81J6;!+hb_~3 z)v)DmkSTyTOK8U@@Qh;RySavq8OfO{k^@{#_cI3G5!DA0p4+To1ZT)lgobgfT_^cd7?*Jx1%U(~!t?DmCCxz(oXnz?7w5&fAE$Dn*MZam-MpbL3 za45q7@G8s&^X_Y=dOrCVG}iGf_p#8ZwgCH_l0n?bb-coKc^VGHZ~}U!&+_ zv>FBg%E*XY)n5pcg5(x9`MkdW?5XI#KeX@~vGqC;orE$LWDhEhV(5E{t{(oQ!d>CW zu?+J+J+}RwPM6&dcL>F~DpI*4BlRm6uB~~kV}n>y-3P1Ro76Yp$H0%mAEMtA7xNa; zgs|PJMZaA)M4NqGr>0Ic+s3|?^U@E6ui$5o?U|{gO!O^axKq2r^GW5k)4D5n&%<|K zES9wt=Tg`<{0fyGkKQxnhlOGI>nR(7E4!)q| zg3hO}xVlxrc_D0jwVL!5Tg{I`eLNzMbW@4X4kFSpGx<&v{TnWZ0f0(HcSZmG!G$-8 zWxY>u!vOFIWLkdNyk|-7H$n^eIP!{jPj*~?iLm! z!!nLVt16N~FAGbg$aD$M7yV38KP!1mLuSg$s60W4ghRu!tGXk5_s?=JGgM1~sBR1! zEbz>}2XZokbrPryLspHdq>If2kegKGcHkqo&W2_DQ^18aY6-jz)PVd6k=39NA^L65 zOi`UCFkjH00-pv`#DZ~Q=o=2{(YG;U+#gho4Zr|LU9kJYI6hF3CE>YMO3+`I&e)xU~z?W8+Y$6PTOmtxHWRt9de{apV-0#cNCaIedilo+@~@BIu?t zdv@#WDAnE{h#Vw$pW0jqi?rUB<&+w>DcD*#nU^qH;^p6?K;+ zl-EAZ8nqyt9dfTXo$jw8#xE*fH|Ez_(?0BhqGu&4vMDUrR70kew6i~dK>{B0s?a?{ z-BLeKe!hpiJik-Bh&HL)BcLQVW~OX+5q*y1Rq0)3hJeqtO`Q$WwZHK5gb8&&B2T-F z3#p`_nXX?<5G?E&K)A_uXFX!uo3!icoLx}if^cQphWC7zALs58yT{!101xD@RKq%W z)aU(5c-Iybo>t3ln)TK&u!$6b%Fk3Jsf|DtKiwq>`b1um+ij=hI(phbs*A}56K-2xT+ zJh!J-kjD&<{S)>|K)ki{bYde7CiEV7NMkNtf@S zdd~Q$K|cSFA^CQJFxO{}SiKkVFh;1_&4}z0_{31H{q?-`x}L}lMRrN$B##>Vdg2l`5Aqj?a=UFQ zIVDxQP~C{i6NU5AUQAfiaI9fwaxE%dA~l^DUOi`g)Fo@SG>5vMA#$F&_-eLkJU;A) z%RU8OZ2fRBfBw)W({sHDlR>9|TpUDv!-+r2{=PgaNIMzmwy9&I&xtnIDNOFIY`1kz zPYCW-sRUVA8!vu3@Yq{J4#yk-hB$OE{gyW!C=OSdoT4JHct^}o$N`;R~C=g z`>4VoF|4}^Z_8*;q{}U-ny$+2?VVc|ozoG$7`OyLkS7)XJ;c`_gM8Mtv_8TgDWznT+UU;QV$aw8P?(WwSHLvU4BsYB=}n zK)`Oe+I+9?wvF}VyH$-zhyKxU&yqYAb2#cR0D|!XsH1V9I^~X46@xK3GS#O&uE@9c=~+LhMD^i0J!>C@Kcn=|Nn=KASmQ zqXs7KE|s8ve(XCpw^+X?=r3HfX%IAlE~lt!fFgyV6b*q#RSL37UXBUWGw5S`0WRql zg57!MnAjWTRHZz-q~dM?S-84tWOi|7+Je;;mjfiNt$Pf3xsw7hCehyvN48;5Oy@%#Dfm+wT%GZM_pi$g{GCHW1;V~wfgO2qA z-No+gR*CkuOf^PSevw^VdC<1BQJ~VW&Bp}YU&-pkxpYAOI15F^uB`Efp2%Z ze6FC2Rryn#C;GtNB@6$!Z^^=Y_db|2k^KA~B!`QuaR^*mpLV&^n$wZJGg1Q5T*ON- z^2mx2YQ`FDjFC{6!@@@)}tL04hLH33W3S``??PsGgB8U`gn)- zNjttiZrX*LfXSCR1wUlh1n3^vfQ{MM48i0ij| zMdO_DLlf3)*$?e5*gPcIGb1N=&0!hVbaD4cb}qYPT0m}#t@?t9YZ}AAXgPch4vWM) ze_a|!Y>ewM`-09b$Vz{@cxSv z%01l`5*~V8&Z?>$=A{)Rcx#t6_>v!?Ljb|Bji(zj$6giA$s@z>FIv3!f!u9~E`}gK zY%omGVQQMMhpS~$Wp#C9M)D5#%|1C_;88UoI@)XrDYia7ZI6A2v*QCQAPviYM?J33 znpb`Px`xb@THtfh(dGz3WHhTfZ|L;|$0^nbvfcpcvgj4Ryh4zCd{yW7O!#7AZ@~Rf zW54>0F0(+vZD}t7AGnN3UHDYFX2iVPt z=X0;Ziz3`M{QiQ;PNCi)qE%IY8Fv5RjM|l+++NGlnt|;0{|PO1FJGo56+PtH!g4Y< z0T-;OINvbEJrPa1F2D=3(~jn>s(cl3iB+pi1Mcg5*?{wdxGM(=v(t_`tH43Gakk|h z3Us6PS{nu9C-L=fKbe=8XA6i`Qu!##jS!Peh#hTOLYa@^JN`sr_UwRKg9R%p&Nn?W z2jyD|Uv&Pr$P)l+bCu&{tz7Oi4i^Fc9M(T)_8My#JWb07^5;Z-5*2su1^2Dm6V`Ya zBA<+-w=JDL`xvd;6!TYCT!u<` zZj|!iF>myPtLNU>c`*&Z^7-kzfyaTzb5>O?M)aY;;XGfMl~xR(23NU-OGUV)Av5Kp z#4GCZ-12~2$y?KW0rbi+020KN-&p-cbCo0bo^BoHC_mMBO~O(yR#-<;2SQV^SUR??G|=*i(z!o(=xsg z-dG+ioHzY`H^b;m;k>km1(^r5XTFMP$q9KHENTPruMO`ezq}(or7t3TJtDrMZf|0F z%?*ft6WmkPgRoc7DjTT@l)Le$VVHA4cLyJ?yAgfRZx~|`o_6YCbTjcV7y&cK_ex7+ zA=m<$1KF!8Z+BKogqC%O^BSVX=zihYb{ZjSe?fyLp@OI`FPN8pe|KdUWTh47uBwVw z(PaRtTn>~12)a~TB5}bE0{DuUY;MR%xjS)fZP;l!eNAFn-7~w=ud48S4yCKgG(pA! zgA{ERqzR!3wVMQ*RHaeT*A0*PdcyCkUDp;PpRIml+tjh+Vxo=jDqI6HULmeEQn(FR zv*&Yz%C9Wk=mXd`b?iMc(dGt3V^Jfsb5+2+jT>J{jF&|J$}F2Tv~me>`dzBK`7#$D&5K_`v)~G?5R%i4RI@W zUU=wUl+l7*n^RQeEzHjLC6w3wb!W!Kms#Rj0o>@S9t=WQ)i5(9Ly)Bjp4wO2igQjS z@f9170?)L5`h<(0|KK2y@7A8wwXfss(V4{Z+GRb_C%~;z)stDl=kXucfK56T9E)rE z6_sUxbHY68HBwc8pJ%WH2E(QL;OQ`I*N z(JO4*nh5#|Ha}?arM%aenOxYIkvz3}&iG#KR!0b=-8foPE!>jl`UL5;c_Y~F4`E9P za(8z>mSy+K;0orYtrqMnLEm+1x5WtS*D4s&yt4#o%bS{@!dvrKRYew~gC)dq4 zYyXVH+parD|i);KKvjD+_Hj*vt{t5+LXwVh`l1j;izaja3_GDsLfvd#{uWGYSp6bRaM7q^}b@6(MQ{o z7w>v}eYAg|Zp=}PO4X^Z- z+z5S#2f$WOde9nSmC~ZDw70?)nq5+{UQ}|OTO}cW^sL0iBJF1x&C9={#a{g+~Fq`TSP?=L_|eZq-8BHjz{FTQJ9ss zVoqskaa+2`oYGQr@Zsot1^Fp3{qUifKjsuwWfW$oxgKmB;mqZ8CgUH)tdw?4Dn_@|aV+2~Sqosve)BCN?B0}F1c@KFHSbl5z vdtiS_gvA1DXeq|oB)+D*`dhaMeaHU;?X5uB)4D@000000NkvXXu0mjf{O@)V diff --git a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/theme.properties b/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/theme.properties deleted file mode 100755 index d1b98ed842..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/resources/theme/aerogear/login/theme.properties +++ /dev/null @@ -1,4 +0,0 @@ -parent=keycloak -import=common/keycloak - -styles= ../patternfly/lib/patternfly/css/patternfly.css ../patternfly/css/login.css ../patternfly/lib/zocial/zocial.css ../keycloak/css/login.css css/login.css \ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml deleted file mode 100755 index f99561130c..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/testrealm.json b/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/testrealm.json deleted file mode 100755 index e087a1beb9..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/testrealm.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "realm": "aerogear", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "adminTheme": "aerogear", - "accountTheme": "aerogear", - "loginTheme": "aerogear", - "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" : "admin", - "enabled": true, - "firstName": "Meister", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "admin" } - ], - "requiredActions": [ - "UPDATE_PASSWORD" - ], - "realmRoles": [ "user","admin" ], - "applicationRoles": { - "realm-management": [ "realm-admin" ], - "account": [ "manage-account" ] - } - - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "unified-push-server", - "roles": ["user", "admin"] - } - ], - "applications": [ - { - "name": "unified-push-server", - "enabled": true, - "publicClient": true, - "adminUrl": "/aerogear-ups", - "baseUrl": "/aerogear-ups", - "redirectUris": [ - "/aerogear-ups/*" - ] - } - ] - -} diff --git a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/web.xml b/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index bb58ec087b..0000000000 --- a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - auth - - - keycloak.import.realm.resources - /WEB-INF/testrealm.json - - - - Keycloak REST Interface - org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher - - javax.ws.rs.Application - org.aerogear.ups.security.UpsSecurityApplication - - - resteasy.servlet.mapping.prefix - / - - 1 - true - - - - org.keycloak.services.listeners.KeycloakSessionDestroyListener - - - - Keycloak Client Connection Filter - org.keycloak.services.filters.ClientConnectionFilter - - - - Keycloak Session Management - org.keycloak.services.filters.KeycloakSessionServletFilter - - - - Keycloak Session Management - /* - - - - Keycloak Client Connection Filter - /* - - - - Keycloak REST Interface - /* - - - - - - diff --git a/project-integrations/aerogear-ups/pom.xml b/project-integrations/aerogear-ups/pom.xml deleted file mode 100755 index be70cac384..0000000000 --- a/project-integrations/aerogear-ups/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - ../../pom.xml - - Aerogear UPS Parent - - 4.0.0 - - aerogear-ups-project-integrations-pom - pom - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - auth-server - app - - diff --git a/project-integrations/pom.xml b/project-integrations/pom.xml deleted file mode 100755 index 76d5b87940..0000000000 --- a/project-integrations/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - keycloak-parent - org.keycloak - 1.2.0.RC1-SNAPSHOT - ../pom.xml - - Third-party Integration Parent - - 4.0.0 - - keycloak-project-integrations-pom - pom - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - aerogear-ups - - From 9d5cd2091e992d79fa9ba7a40754c915ee2a7ac6 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 23 Apr 2015 13:23:22 +0200 Subject: [PATCH 11/16] Updates to deps --- misc/Testsuite.md | 6 +- pom.xml | 22 +++ testsuite/integration/pom.xml | 23 +-- ...cloak.models.UserFederationProviderFactory | 1 - .../DummyUserFederationProvider.java | 2 +- .../DummyUserFederationProviderFactory.java | 2 +- .../keycloak/testsuite}/KeycloakServer.java | 2 +- .../org/keycloak/testsuite}/MailServer.java | 2 +- .../keycloak/testsuite}/TotpGenerator.java | 2 +- .../adapter/AdapterTestStrategy.java | 2 +- .../adapter/CookieTokenStoreAdapterTest.java | 2 +- .../testsuite/adapter/MultiTenancyTest.java | 2 +- .../adapter/RelativeUriAdapterTest.java | 2 +- .../testsuite/admin/AdminAPITest.java | 2 +- .../broker/IdentityProviderHintTest.java | 2 +- .../OIDCKeyCloakServerBrokerBasicTest.java | 3 +- .../SAMLKeyCloakServerBrokerBasicTest.java | 2 +- ...KeyCloakServerBrokerWithSignatureTest.java | 2 +- .../composites/CompositeImportRoleTest.java | 2 +- .../federation/KerberosLdapTest.java | 1 - .../federation/KerberosStandaloneTest.java | 5 - .../federation/SyncProvidersTest.java | 2 +- .../ldap/EmbeddedServersFactory.java | 5 +- .../ldap/InMemoryDirectoryServiceFactory.java | 2 +- .../ldap/InMemorySchemaPartition.java | 2 +- .../ldap/KerberosEmbeddedServer.java | 2 +- .../ldap/KerberosKeytabCreator.java | 4 +- .../testsuite}/ldap/LDAPConfiguration.java | 2 +- .../testsuite}/ldap/LDAPEmbeddedServer.java | 2 +- .../testsuite/rule/AbstractKeycloakRule.java | 2 +- .../keycloak/testsuite/rule/KerberosRule.java | 6 +- .../org/keycloak/testsuite/rule/LDAPRule.java | 6 +- .../resources/META-INF/keycloak-server.json | 0 ...cloak.models.UserFederationProviderFactory | 1 + .../resources/kerberos/http.keytab | Bin .../kerberos-ldap-connection.properties | 0 .../kerberos-standalone-connection.properties | 0 .../resources/kerberos/test-krb5.conf | 0 .../resources/kerberos/users-kerberos.ldif | 0 .../resources/ldap/ldap-connection.properties | 0 .../{main => test}/resources/ldap/users.ldif | 0 .../{main => test}/resources/log4j.properties | 0 testsuite/jetty/jetty81/pom.xml | 6 +- testsuite/jetty/jetty91/pom.xml | 6 +- testsuite/jetty/jetty92/pom.xml | 6 +- testsuite/pom.xml | 2 - testsuite/proxy/pom.xml | 6 +- .../org/keycloak/testsuite/ProxyTest.java | 1 - testsuite/tomcat6/pom.xml | 173 +++++++++++++++++- testsuite/tomcat7/pom.xml | 6 +- testsuite/tomcat8/pom.xml | 6 +- .../keycloak/test/tools/DestroyListener.java | 0 .../test/tools/KeycloakTestApplication.java | 0 .../java/org/keycloak/test/tools/Mail.java | 0 .../org/keycloak/test/tools/PerfTools.java | 0 .../test/tools/jobs/CreateUsersJob.java | 0 .../test/tools/jobs/DeleteUsersJob.java | 0 .../test/tools/jobs/UpdateUsersJob.java | 0 .../keycloak/test/tools/jobs/UsersJob.java | 0 .../test/tools/jobs/UsersJobInitializer.java | 0 .../resources/META-INF/keycloak-server.json | 0 .../WEB-INF/jboss-deployment-structure.xml | 0 .../src/{main => test}/webapp/WEB-INF/web.xml | 0 .../src/{main => test}/webapp/index.html | 0 .../tools/src/{main => test}/webapp/js/app.js | 0 .../src/{main => test}/webapp/pages/home.html | 0 .../src/{main => test}/webapp/pages/mail.html | 0 .../src/{main => test}/webapp/pages/perf.html | 0 68 files changed, 251 insertions(+), 86 deletions(-) delete mode 100755 testsuite/integration/src/main/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/DummyUserFederationProvider.java (94%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/DummyUserFederationProviderFactory.java (95%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/KeycloakServer.java (99%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/MailServer.java (97%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/TotpGenerator.java (97%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/ldap/EmbeddedServersFactory.java (97%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/ldap/InMemoryDirectoryServiceFactory.java (99%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/ldap/InMemorySchemaPartition.java (98%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/ldap/KerberosEmbeddedServer.java (99%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/ldap/KerberosKeytabCreator.java (96%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/ldap/LDAPConfiguration.java (99%) rename testsuite/integration/src/{main/java/org/keycloak/testutils => test/java/org/keycloak/testsuite}/ldap/LDAPEmbeddedServer.java (99%) rename testsuite/integration/src/{main => test}/resources/META-INF/keycloak-server.json (100%) create mode 100755 testsuite/integration/src/test/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory rename testsuite/integration/src/{main => test}/resources/kerberos/http.keytab (100%) rename testsuite/integration/src/{main => test}/resources/kerberos/kerberos-ldap-connection.properties (100%) rename testsuite/integration/src/{main => test}/resources/kerberos/kerberos-standalone-connection.properties (100%) rename testsuite/integration/src/{main => test}/resources/kerberos/test-krb5.conf (100%) rename testsuite/integration/src/{main => test}/resources/kerberos/users-kerberos.ldif (100%) rename testsuite/integration/src/{main => test}/resources/ldap/ldap-connection.properties (100%) rename testsuite/integration/src/{main => test}/resources/ldap/users.ldif (100%) rename testsuite/integration/src/{main => test}/resources/log4j.properties (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/DestroyListener.java (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/KeycloakTestApplication.java (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/Mail.java (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/PerfTools.java (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/jobs/CreateUsersJob.java (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/jobs/UsersJob.java (100%) rename testsuite/tools/src/{main => test}/java/org/keycloak/test/tools/jobs/UsersJobInitializer.java (100%) rename testsuite/tools/src/{main => test}/resources/META-INF/keycloak-server.json (100%) rename testsuite/tools/src/{main => test}/webapp/WEB-INF/jboss-deployment-structure.xml (100%) rename testsuite/tools/src/{main => test}/webapp/WEB-INF/web.xml (100%) rename testsuite/tools/src/{main => test}/webapp/index.html (100%) rename testsuite/tools/src/{main => test}/webapp/js/app.js (100%) rename testsuite/tools/src/{main => test}/webapp/pages/home.html (100%) rename testsuite/tools/src/{main => test}/webapp/pages/mail.html (100%) rename testsuite/tools/src/{main => test}/webapp/pages/perf.html (100%) diff --git a/misc/Testsuite.md b/misc/Testsuite.md index 658a0427cb..ebaee4bfce 100644 --- a/misc/Testsuite.md +++ b/misc/Testsuite.md @@ -23,7 +23,7 @@ To start a basic Keycloak server for testing run: mvn exec:java -Pkeycloak-server -or run org.keycloak.testutils.KeycloakServer from your favourite IDE! +or run org.keycloak.testsuite.KeycloakServer from your favourite IDE! When starting the server it can also import a realm from a json file: @@ -64,7 +64,7 @@ To generate totp codes without Google authenticator run: mvn exec:java -Ptotp -or run org.keycloak.testutils.TotpGenerator from your favourite IDE! +or run org.keycloak.testsuite.TotpGenerator from your favourite IDE! Once started copy/paste the totp secret and press enter. To use a new secret just copy/paste and press enter again. @@ -75,7 +75,7 @@ To start a test mail server for testing email sending run: mvn exec:java -Pmail-server -or run org.keycloak.testutils.MailServer from your favourite IDE! +or run org.keycloak.testsuite.MailServer from your favourite IDE! To configure Keycloak to use the above server add the following system properties: diff --git a/pom.xml b/pom.xml index 237f13d720..8bf033d326 100755 --- a/pom.xml +++ b/pom.xml @@ -188,11 +188,13 @@ org.jboss.resteasy resteasy-undertow ${resteasy.version} + test
org.jboss.resteasy async-http-servlet-3.0 ${resteasy.version} + test io.undertow @@ -233,6 +235,7 @@ org.picketlink picketlink-wildfly-common ${picketlink.version} + test org.jboss.logging @@ -270,6 +273,7 @@ com.h2database h2 ${h2.version} + test org.hibernate @@ -323,6 +327,7 @@ com.icegreen greenmail ${greenmail.version} + test @@ -337,21 +342,25 @@ org.apache.directory.server apacheds-core-annotations ${apacheds.version} + test
org.apache.directory.server apacheds-interceptor-kerberos ${apacheds.version} + test org.apache.directory.server apacheds-server-annotations ${apacheds.version} + test org.apache.directory.api api-ldap-codec-standalone ${apacheds.codec.version} + test @@ -359,6 +368,7 @@ org.seleniumhq.selenium selenium-java ${selenium.version} + test
org.seleniumhq.selenium @@ -375,16 +385,19 @@ org.apache.jmeter ApacheJMeter_java ${jmeter.version} + test dom4j dom4j ${dom4j.version} + test xml-apis xml-apis ${xml-apis.version} + test @@ -396,12 +409,20 @@ org.slf4j slf4j-simple ${slf4j.version} + test + + + org.slf4j + slf4j-log4j12 + ${slf4j.version} + test mysql mysql-connector-java ${mysql.version} + test org.apache.httpcomponents @@ -456,6 +477,7 @@ org.jboss.logging jboss-logging-processor ${jboss-logging-tools.version} + compile org.infinispan diff --git a/testsuite/integration/pom.xml b/testsuite/integration/pom.xml index e6d674a409..d763ca1155 100755 --- a/testsuite/integration/pom.xml +++ b/testsuite/integration/pom.xml @@ -42,7 +42,6 @@ org.slf4j slf4j-log4j12 - ${slf4j.version} org.jboss.spec.javax.servlet @@ -86,10 +85,6 @@ org.jboss.resteasy resteasy-multipart-provider - - org.jboss.resteasy - async-http-servlet-3.0 - org.jboss.resteasy resteasy-jackson-provider @@ -101,7 +96,6 @@ org.apache.httpcomponents httpclient - ${keycloak.apache.httpcomponents.version} org.keycloak @@ -240,7 +234,6 @@ org.wildfly wildfly-undertow - ${wildfly.version} test @@ -306,7 +299,8 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.KeycloakServer + org.keycloak.testsuite.KeycloakServer + test
@@ -320,7 +314,8 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.MailServer + org.keycloak.testsuite.MailServer + test
@@ -334,7 +329,8 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.TotpGenerator + org.keycloak.testsuite.TotpGenerator + test @@ -348,7 +344,8 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.ldap.LDAPEmbeddedServer + org.keycloak.testsuite.ldap.LDAPEmbeddedServer + test @@ -362,7 +359,8 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.ldap.KerberosEmbeddedServer + org.keycloak.testsuite.ldap.KerberosEmbeddedServer + test @@ -529,7 +527,6 @@ mysql mysql-connector-java - ${mysql.version} diff --git a/testsuite/integration/src/main/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory b/testsuite/integration/src/main/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory deleted file mode 100755 index 82b852c8e0..0000000000 --- a/testsuite/integration/src/main/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testutils.DummyUserFederationProviderFactory \ No newline at end of file diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProvider.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/DummyUserFederationProvider.java similarity index 94% rename from testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProvider.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/DummyUserFederationProvider.java index 99644214bc..4e85972a0b 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProvider.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/DummyUserFederationProvider.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils; +package org.keycloak.testsuite; import org.keycloak.models.CredentialValidationOutput; import org.keycloak.models.RealmModel; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/DummyUserFederationProviderFactory.java similarity index 95% rename from testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/DummyUserFederationProviderFactory.java index fba6c56d7c..536a5b7595 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/DummyUserFederationProviderFactory.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils; +package org.keycloak.testsuite; import org.jboss.logging.Logger; import org.keycloak.Config; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/KeycloakServer.java similarity index 99% rename from testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/KeycloakServer.java index a57f317963..2d630e92c4 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/KeycloakServer.java @@ -19,7 +19,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.keycloak.testutils; +package org.keycloak.testsuite; import io.undertow.Undertow; import io.undertow.Undertow.Builder; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/MailServer.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/MailServer.java similarity index 97% rename from testsuite/integration/src/main/java/org/keycloak/testutils/MailServer.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/MailServer.java index fd9ad225e0..1acaafb2a9 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/MailServer.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/MailServer.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils; +package org.keycloak.testsuite; import com.icegreen.greenmail.util.GreenMail; import com.icegreen.greenmail.util.ServerSetup; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/TotpGenerator.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/TotpGenerator.java similarity index 97% rename from testsuite/integration/src/main/java/org/keycloak/testutils/TotpGenerator.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/TotpGenerator.java index 455c190da4..1e2449b842 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/TotpGenerator.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/TotpGenerator.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils; +package org.keycloak.testsuite; import org.keycloak.models.utils.Base32; import org.keycloak.models.utils.TimeBasedOTP; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTestStrategy.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTestStrategy.java index 550de17315..f9f82dcaf4 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTestStrategy.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTestStrategy.java @@ -49,7 +49,7 @@ import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.KeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.keycloak.util.BasicAuthHelper; import org.keycloak.util.Time; import org.openqa.selenium.WebDriver; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/CookieTokenStoreAdapterTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/CookieTokenStoreAdapterTest.java index 632202d542..405609cf24 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/CookieTokenStoreAdapterTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/CookieTokenStoreAdapterTest.java @@ -19,7 +19,7 @@ import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.keycloak.util.Time; import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/MultiTenancyTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/MultiTenancyTest.java index 235d5f54c4..83f3ff6289 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/MultiTenancyTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/MultiTenancyTest.java @@ -30,7 +30,7 @@ import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.openqa.selenium.WebDriver; /** diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/RelativeUriAdapterTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/RelativeUriAdapterTest.java index 4c22533aba..4ec20a87db 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/RelativeUriAdapterTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/RelativeUriAdapterTest.java @@ -45,7 +45,7 @@ import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.openqa.selenium.WebDriver; import javax.ws.rs.client.Client; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminAPITest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminAPITest.java index b3a7ca614e..03124461e3 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminAPITest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminAPITest.java @@ -41,7 +41,7 @@ import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.services.managers.RealmManager; import org.keycloak.services.resources.admin.AdminRoot; import org.keycloak.testsuite.rule.AbstractKeycloakRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/IdentityProviderHintTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/IdentityProviderHintTest.java index 96818736b7..18f3cc549a 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/IdentityProviderHintTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/IdentityProviderHintTest.java @@ -11,7 +11,7 @@ import org.keycloak.testsuite.pages.OAuthGrantPage; import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/OIDCKeyCloakServerBrokerBasicTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/OIDCKeyCloakServerBrokerBasicTest.java index 87c1b3be2b..44cd749f2f 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/OIDCKeyCloakServerBrokerBasicTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/OIDCKeyCloakServerBrokerBasicTest.java @@ -1,6 +1,5 @@ package org.keycloak.testsuite.broker; -import org.junit.After; import org.junit.ClassRule; import org.junit.Test; import org.keycloak.models.KeycloakSession; @@ -13,7 +12,7 @@ import org.keycloak.testsuite.pages.AccountAccessPage; import org.keycloak.testsuite.pages.OAuthGrantPage; import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.WebResource; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.keycloak.util.JsonSerialization; import org.openqa.selenium.NoSuchElementException; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/SAMLKeyCloakServerBrokerBasicTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/SAMLKeyCloakServerBrokerBasicTest.java index c7589ac18e..9796d3a285 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/SAMLKeyCloakServerBrokerBasicTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/SAMLKeyCloakServerBrokerBasicTest.java @@ -8,7 +8,7 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.rule.AbstractKeycloakRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.keycloak.saml.processing.api.saml.v2.request.SAML2Request; import org.keycloak.dom.saml.v2.protocol.ResponseType; import org.keycloak.saml.processing.web.util.PostBindingUtil; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/SAMLKeyCloakServerBrokerWithSignatureTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/SAMLKeyCloakServerBrokerWithSignatureTest.java index cc553d7ba7..8d7fb7163c 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/SAMLKeyCloakServerBrokerWithSignatureTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/SAMLKeyCloakServerBrokerWithSignatureTest.java @@ -8,7 +8,7 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.rule.AbstractKeycloakRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.keycloak.saml.processing.api.saml.v2.request.SAML2Request; import org.keycloak.dom.saml.v2.protocol.ResponseType; import org.keycloak.saml.processing.web.util.PostBindingUtil; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/composites/CompositeImportRoleTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/composites/CompositeImportRoleTest.java index 47d1ff5204..ad61241031 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/composites/CompositeImportRoleTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/composites/CompositeImportRoleTest.java @@ -38,7 +38,7 @@ import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.openqa.selenium.WebDriver; import java.security.PublicKey; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosLdapTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosLdapTest.java index 1d94c68e2e..8086500cde 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosLdapTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosLdapTest.java @@ -16,7 +16,6 @@ import org.keycloak.federation.kerberos.CommonKerberosConfig; import org.keycloak.federation.ldap.LDAPFederationProviderFactory; import org.keycloak.federation.ldap.kerberos.LDAPProviderKerberosConfig; import org.keycloak.models.RealmModel; -import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserFederationProvider; import org.keycloak.models.UserFederationProviderModel; import org.keycloak.services.managers.RealmManager; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosStandaloneTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosStandaloneTest.java index c665f44c3c..699d85be87 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosStandaloneTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosStandaloneTest.java @@ -17,17 +17,12 @@ import org.keycloak.federation.kerberos.KerberosFederationProviderFactory; import org.keycloak.constants.KerberosConstants; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; -import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserFederationProviderModel; -import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.AssertEvents; -import org.keycloak.testsuite.adapter.CustomerServlet; -import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.KerberosRule; import org.keycloak.testsuite.rule.KeycloakRule; import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.testutils.KeycloakServer; /** * Test of KerberosFederationProvider (Kerberos not backed by LDAP) diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/SyncProvidersTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/SyncProvidersTest.java index f628519af7..3aa1954ac8 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/SyncProvidersTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/SyncProvidersTest.java @@ -23,7 +23,7 @@ import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.UsersSyncManager; import org.keycloak.testsuite.rule.KeycloakRule; import org.keycloak.testsuite.rule.LDAPRule; -import org.keycloak.testutils.DummyUserFederationProviderFactory; +import org.keycloak.testsuite.DummyUserFederationProviderFactory; import org.keycloak.timer.TimerProvider; import org.keycloak.util.Time; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/EmbeddedServersFactory.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/EmbeddedServersFactory.java similarity index 97% rename from testsuite/integration/src/main/java/org/keycloak/testutils/ldap/EmbeddedServersFactory.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/EmbeddedServersFactory.java index 3cfb36c20d..40106b5df7 100644 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/EmbeddedServersFactory.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/EmbeddedServersFactory.java @@ -1,7 +1,4 @@ -package org.keycloak.testutils.ldap; - -import java.net.InetAddress; -import java.net.UnknownHostException; +package org.keycloak.testsuite.ldap; import org.ietf.jgss.GSSException; import org.ietf.jgss.GSSManager; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/InMemoryDirectoryServiceFactory.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/InMemoryDirectoryServiceFactory.java similarity index 99% rename from testsuite/integration/src/main/java/org/keycloak/testutils/ldap/InMemoryDirectoryServiceFactory.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/InMemoryDirectoryServiceFactory.java index bba4954a3f..a5eb2aad11 100644 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/InMemoryDirectoryServiceFactory.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/InMemoryDirectoryServiceFactory.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils.ldap; +package org.keycloak.testsuite.ldap; import java.io.File; import java.io.IOException; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/InMemorySchemaPartition.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/InMemorySchemaPartition.java similarity index 98% rename from testsuite/integration/src/main/java/org/keycloak/testutils/ldap/InMemorySchemaPartition.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/InMemorySchemaPartition.java index a5fed44ec7..227d257abd 100644 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/InMemorySchemaPartition.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/InMemorySchemaPartition.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils.ldap; +package org.keycloak.testsuite.ldap; import java.net.URL; import java.util.Map; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosEmbeddedServer.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/KerberosEmbeddedServer.java similarity index 99% rename from testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosEmbeddedServer.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/KerberosEmbeddedServer.java index 63cc027f7f..325f19b4ec 100644 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosEmbeddedServer.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/KerberosEmbeddedServer.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils.ldap; +package org.keycloak.testsuite.ldap; import java.io.IOException; import java.lang.reflect.Field; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosKeytabCreator.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/KerberosKeytabCreator.java similarity index 96% rename from testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosKeytabCreator.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/KerberosKeytabCreator.java index aa26153fb1..7631019d63 100644 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosKeytabCreator.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/KerberosKeytabCreator.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils.ldap; +package org.keycloak.testsuite.ldap; import java.io.File; import java.io.IOException; @@ -34,7 +34,7 @@ public class KerberosKeytabCreator { System.out.println("-------------------------"); System.out.println("Arguments missing or invalid. Required arguments are: "); System.out.println("Example of usage:"); - System.out.println("mvn exec:java -Dexec.mainClass=\"org.keycloak.testutils.ldap.KerberosKeytabCreator\" -Dexec.args=\"HTTP/localhost@KEYCLOAK.ORG httppwd src/main/resources/kerberos/http.keytab\""); + System.out.println("mvn exec:java -Dexec.mainClass=\"org.keycloak.testsuite.ldap.KerberosKeytabCreator\" -Dexec.args=\"HTTP/localhost@KEYCLOAK.ORG httppwd src/main/resources/kerberos/http.keytab\""); } else { final File keytabFile = new File(args[2]); createKeytab(args[0], args[1], keytabFile); diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPConfiguration.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/LDAPConfiguration.java similarity index 99% rename from testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPConfiguration.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/LDAPConfiguration.java index 94b767233d..226c993335 100644 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPConfiguration.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/LDAPConfiguration.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils.ldap; +package org.keycloak.testsuite.ldap; import java.io.File; import java.io.InputStream; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPEmbeddedServer.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/LDAPEmbeddedServer.java similarity index 99% rename from testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPEmbeddedServer.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/LDAPEmbeddedServer.java index ce7b56b413..4f89d11976 100644 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPEmbeddedServer.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/ldap/LDAPEmbeddedServer.java @@ -1,4 +1,4 @@ -package org.keycloak.testutils.ldap; +package org.keycloak.testsuite.ldap; import java.io.File; import java.io.InputStream; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java index fbd47bc383..7641d6fbd2 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java @@ -20,7 +20,7 @@ import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.Retry; -import org.keycloak.testutils.KeycloakServer; +import org.keycloak.testsuite.KeycloakServer; import org.keycloak.util.JsonSerialization; import org.keycloak.util.Time; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/KerberosRule.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/KerberosRule.java index 61d7f322cb..d2f0ed7ecd 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/KerberosRule.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/KerberosRule.java @@ -4,9 +4,9 @@ import java.io.File; import java.net.URL; import org.jboss.logging.Logger; -import org.keycloak.testutils.ldap.EmbeddedServersFactory; -import org.keycloak.testutils.ldap.LDAPConfiguration; -import org.keycloak.testutils.ldap.LDAPEmbeddedServer; +import org.keycloak.testsuite.ldap.EmbeddedServersFactory; +import org.keycloak.testsuite.ldap.LDAPConfiguration; +import org.keycloak.testsuite.ldap.LDAPEmbeddedServer; /** * @author Marek Posolda diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/LDAPRule.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/LDAPRule.java index 2fa5f01faf..290341cb4b 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/LDAPRule.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/LDAPRule.java @@ -3,9 +3,9 @@ package org.keycloak.testsuite.rule; import java.util.Map; import org.junit.rules.ExternalResource; -import org.keycloak.testutils.ldap.EmbeddedServersFactory; -import org.keycloak.testutils.ldap.LDAPConfiguration; -import org.keycloak.testutils.ldap.LDAPEmbeddedServer; +import org.keycloak.testsuite.ldap.EmbeddedServersFactory; +import org.keycloak.testsuite.ldap.LDAPConfiguration; +import org.keycloak.testsuite.ldap.LDAPEmbeddedServer; /** * @author Marek Posolda diff --git a/testsuite/integration/src/main/resources/META-INF/keycloak-server.json b/testsuite/integration/src/test/resources/META-INF/keycloak-server.json similarity index 100% rename from testsuite/integration/src/main/resources/META-INF/keycloak-server.json rename to testsuite/integration/src/test/resources/META-INF/keycloak-server.json diff --git a/testsuite/integration/src/test/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory b/testsuite/integration/src/test/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory new file mode 100755 index 0000000000..d79421f7d6 --- /dev/null +++ b/testsuite/integration/src/test/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory @@ -0,0 +1 @@ +org.keycloak.testsuite.DummyUserFederationProviderFactory \ No newline at end of file diff --git a/testsuite/integration/src/main/resources/kerberos/http.keytab b/testsuite/integration/src/test/resources/kerberos/http.keytab similarity index 100% rename from testsuite/integration/src/main/resources/kerberos/http.keytab rename to testsuite/integration/src/test/resources/kerberos/http.keytab diff --git a/testsuite/integration/src/main/resources/kerberos/kerberos-ldap-connection.properties b/testsuite/integration/src/test/resources/kerberos/kerberos-ldap-connection.properties similarity index 100% rename from testsuite/integration/src/main/resources/kerberos/kerberos-ldap-connection.properties rename to testsuite/integration/src/test/resources/kerberos/kerberos-ldap-connection.properties diff --git a/testsuite/integration/src/main/resources/kerberos/kerberos-standalone-connection.properties b/testsuite/integration/src/test/resources/kerberos/kerberos-standalone-connection.properties similarity index 100% rename from testsuite/integration/src/main/resources/kerberos/kerberos-standalone-connection.properties rename to testsuite/integration/src/test/resources/kerberos/kerberos-standalone-connection.properties diff --git a/testsuite/integration/src/main/resources/kerberos/test-krb5.conf b/testsuite/integration/src/test/resources/kerberos/test-krb5.conf similarity index 100% rename from testsuite/integration/src/main/resources/kerberos/test-krb5.conf rename to testsuite/integration/src/test/resources/kerberos/test-krb5.conf diff --git a/testsuite/integration/src/main/resources/kerberos/users-kerberos.ldif b/testsuite/integration/src/test/resources/kerberos/users-kerberos.ldif similarity index 100% rename from testsuite/integration/src/main/resources/kerberos/users-kerberos.ldif rename to testsuite/integration/src/test/resources/kerberos/users-kerberos.ldif diff --git a/testsuite/integration/src/main/resources/ldap/ldap-connection.properties b/testsuite/integration/src/test/resources/ldap/ldap-connection.properties similarity index 100% rename from testsuite/integration/src/main/resources/ldap/ldap-connection.properties rename to testsuite/integration/src/test/resources/ldap/ldap-connection.properties diff --git a/testsuite/integration/src/main/resources/ldap/users.ldif b/testsuite/integration/src/test/resources/ldap/users.ldif similarity index 100% rename from testsuite/integration/src/main/resources/ldap/users.ldif rename to testsuite/integration/src/test/resources/ldap/users.ldif diff --git a/testsuite/integration/src/main/resources/log4j.properties b/testsuite/integration/src/test/resources/log4j.properties similarity index 100% rename from testsuite/integration/src/main/resources/log4j.properties rename to testsuite/integration/src/test/resources/log4j.properties diff --git a/testsuite/jetty/jetty81/pom.xml b/testsuite/jetty/jetty81/pom.xml index e81796900c..16bb906fc2 100755 --- a/testsuite/jetty/jetty81/pom.xml +++ b/testsuite/jetty/jetty81/pom.xml @@ -275,7 +275,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.KeycloakServer + org.keycloak.testsuite.KeycloakServer @@ -289,7 +289,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.MailServer + org.keycloak.testsuite.MailServer @@ -303,7 +303,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.TotpGenerator + org.keycloak.testsuite.TotpGenerator diff --git a/testsuite/jetty/jetty91/pom.xml b/testsuite/jetty/jetty91/pom.xml index 9afec4acd1..c7f4395b46 100755 --- a/testsuite/jetty/jetty91/pom.xml +++ b/testsuite/jetty/jetty91/pom.xml @@ -275,7 +275,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.KeycloakServer + org.keycloak.testsuite.KeycloakServer @@ -289,7 +289,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.MailServer + org.keycloak.testsuite.MailServer @@ -303,7 +303,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.TotpGenerator + org.keycloak.testsuite.TotpGenerator diff --git a/testsuite/jetty/jetty92/pom.xml b/testsuite/jetty/jetty92/pom.xml index 12458c6608..899cdb1927 100755 --- a/testsuite/jetty/jetty92/pom.xml +++ b/testsuite/jetty/jetty92/pom.xml @@ -282,7 +282,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.KeycloakServer + org.keycloak.testsuite.KeycloakServer @@ -296,7 +296,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.MailServer + org.keycloak.testsuite.MailServer @@ -310,7 +310,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.TotpGenerator + org.keycloak.testsuite.TotpGenerator diff --git a/testsuite/pom.xml b/testsuite/pom.xml index d42ec7533a..8ad09a9e2d 100755 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -41,8 +41,6 @@ jetty/jetty92 jetty/jetty91 performance - tools - performance-web diff --git a/testsuite/proxy/pom.xml b/testsuite/proxy/pom.xml index 44f88942cc..0e6d04b0d3 100755 --- a/testsuite/proxy/pom.xml +++ b/testsuite/proxy/pom.xml @@ -268,7 +268,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.KeycloakServer + org.keycloak.testsuite.KeycloakServer @@ -282,7 +282,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.MailServer + org.keycloak.testsuite.MailServer @@ -296,7 +296,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.TotpGenerator + org.keycloak.testsuite.TotpGenerator diff --git a/testsuite/proxy/src/test/java/org/keycloak/testsuite/ProxyTest.java b/testsuite/proxy/src/test/java/org/keycloak/testsuite/ProxyTest.java index a93d416793..f3dd46f5ca 100755 --- a/testsuite/proxy/src/test/java/org/keycloak/testsuite/ProxyTest.java +++ b/testsuite/proxy/src/test/java/org/keycloak/testsuite/ProxyTest.java @@ -41,7 +41,6 @@ import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.testutils.KeycloakServer; import org.openqa.selenium.WebDriver; import javax.servlet.ServletException; diff --git a/testsuite/tomcat6/pom.xml b/testsuite/tomcat6/pom.xml index 8408cc2d8d..08033d275d 100755 --- a/testsuite/tomcat6/pom.xml +++ b/testsuite/tomcat6/pom.xml @@ -22,18 +22,173 @@ keycloak-dependencies-server-all pom
+ + org.keycloak + keycloak-admin-client + + + log4j + log4j + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-log4j12 + + + org.jboss.spec.javax.servlet + jboss-servlet-api_3.0_spec + + + org.jboss.resteasy + jaxrs-api + + + org.jboss.resteasy + resteasy-jaxrs + + + log4j + log4j + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-simple + + + + + org.jboss.resteasy + resteasy-client + + + org.jboss.resteasy + resteasy-multipart-provider + + + org.jboss.resteasy + resteasy-jackson-provider + + + org.jboss.resteasy + resteasy-undertow + + + com.google.zxing + javase + + + org.bouncycastle + bcprov-jdk15on + + + org.apache.httpcomponents + httpclient + + + org.keycloak + keycloak-ldap-federation + + + org.keycloak + keycloak-kerberos-federation + + + org.keycloak + keycloak-undertow-adapter + + + org.keycloak + keycloak-tomcat6-adapter + + + org.jboss.logging + jboss-logging + + + io.undertow + undertow-servlet + + + io.undertow + undertow-core + + + org.codehaus.jackson + jackson-core-asl + + + org.codehaus.jackson + jackson-mapper-asl + + + org.codehaus.jackson + jackson-xc + + + org.hamcrest + hamcrest-all + + + org.hibernate.javax.persistence + hibernate-jpa-2.0-api + + + com.h2database + h2 + + + org.hibernate + hibernate-entitymanager + + + com.icegreen + greenmail + + + org.slf4j + slf4j-api + + + + + org.infinispan + infinispan-core + + + org.seleniumhq.selenium + selenium-java + + + xml-apis + xml-apis + + + org.seleniumhq.selenium + selenium-chrome-driver + + + org.wildfly + wildfly-undertow + test + org.keycloak keycloak-testsuite-integration + test org.keycloak keycloak-testsuite-integration test-jar - - - org.keycloak - keycloak-tomcat6-adapter + test org.apache.tomcat @@ -50,6 +205,10 @@ jasper ${tomcat.version} + + junit + junit + @@ -100,7 +259,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.KeycloakServer + org.keycloak.testsuite.KeycloakServer @@ -114,7 +273,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.MailServer + org.keycloak.testsuite.MailServer @@ -128,7 +287,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.TotpGenerator + org.keycloak.testsuite.TotpGenerator diff --git a/testsuite/tomcat7/pom.xml b/testsuite/tomcat7/pom.xml index fd2f842420..8f79b6228c 100755 --- a/testsuite/tomcat7/pom.xml +++ b/testsuite/tomcat7/pom.xml @@ -264,7 +264,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.KeycloakServer + org.keycloak.testsuite.KeycloakServer @@ -278,7 +278,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.MailServer + org.keycloak.testsuite.MailServer @@ -292,7 +292,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.TotpGenerator + org.keycloak.testsuite.TotpGenerator diff --git a/testsuite/tomcat8/pom.xml b/testsuite/tomcat8/pom.xml index 598921e418..35d9667b67 100755 --- a/testsuite/tomcat8/pom.xml +++ b/testsuite/tomcat8/pom.xml @@ -263,7 +263,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.KeycloakServer + org.keycloak.testsuite.KeycloakServer @@ -277,7 +277,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.MailServer + org.keycloak.testsuite.MailServer @@ -291,7 +291,7 @@ org.codehaus.mojo exec-maven-plugin - org.keycloak.testutils.TotpGenerator + org.keycloak.testsuite.TotpGenerator diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/DestroyListener.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/DestroyListener.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/DestroyListener.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/DestroyListener.java diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/KeycloakTestApplication.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/KeycloakTestApplication.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/KeycloakTestApplication.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/KeycloakTestApplication.java diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/Mail.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/Mail.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/Mail.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/Mail.java diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/PerfTools.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/PerfTools.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/PerfTools.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/PerfTools.java diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/CreateUsersJob.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/CreateUsersJob.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/CreateUsersJob.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/CreateUsersJob.java diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UsersJob.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/UsersJob.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UsersJob.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/UsersJob.java diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UsersJobInitializer.java b/testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/UsersJobInitializer.java similarity index 100% rename from testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UsersJobInitializer.java rename to testsuite/tools/src/test/java/org/keycloak/test/tools/jobs/UsersJobInitializer.java diff --git a/testsuite/tools/src/main/resources/META-INF/keycloak-server.json b/testsuite/tools/src/test/resources/META-INF/keycloak-server.json similarity index 100% rename from testsuite/tools/src/main/resources/META-INF/keycloak-server.json rename to testsuite/tools/src/test/resources/META-INF/keycloak-server.json diff --git a/testsuite/tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/testsuite/tools/src/test/webapp/WEB-INF/jboss-deployment-structure.xml similarity index 100% rename from testsuite/tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml rename to testsuite/tools/src/test/webapp/WEB-INF/jboss-deployment-structure.xml diff --git a/testsuite/tools/src/main/webapp/WEB-INF/web.xml b/testsuite/tools/src/test/webapp/WEB-INF/web.xml similarity index 100% rename from testsuite/tools/src/main/webapp/WEB-INF/web.xml rename to testsuite/tools/src/test/webapp/WEB-INF/web.xml diff --git a/testsuite/tools/src/main/webapp/index.html b/testsuite/tools/src/test/webapp/index.html similarity index 100% rename from testsuite/tools/src/main/webapp/index.html rename to testsuite/tools/src/test/webapp/index.html diff --git a/testsuite/tools/src/main/webapp/js/app.js b/testsuite/tools/src/test/webapp/js/app.js similarity index 100% rename from testsuite/tools/src/main/webapp/js/app.js rename to testsuite/tools/src/test/webapp/js/app.js diff --git a/testsuite/tools/src/main/webapp/pages/home.html b/testsuite/tools/src/test/webapp/pages/home.html similarity index 100% rename from testsuite/tools/src/main/webapp/pages/home.html rename to testsuite/tools/src/test/webapp/pages/home.html diff --git a/testsuite/tools/src/main/webapp/pages/mail.html b/testsuite/tools/src/test/webapp/pages/mail.html similarity index 100% rename from testsuite/tools/src/main/webapp/pages/mail.html rename to testsuite/tools/src/test/webapp/pages/mail.html diff --git a/testsuite/tools/src/main/webapp/pages/perf.html b/testsuite/tools/src/test/webapp/pages/perf.html similarity index 100% rename from testsuite/tools/src/main/webapp/pages/perf.html rename to testsuite/tools/src/test/webapp/pages/perf.html From e64a2d8de575d2e6c3b00e3292bdad1ea2151523 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 23 Apr 2015 14:19:27 +0200 Subject: [PATCH 12/16] Fixes --- distribution/server-overlay/assembly.xml | 2 +- pom.xml | 41 ++++++++++++-------- services/pom.xml | 49 ++++++++++-------------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/distribution/server-overlay/assembly.xml b/distribution/server-overlay/assembly.xml index 88d8fe9d3f..a85813a2b4 100755 --- a/distribution/server-overlay/assembly.xml +++ b/distribution/server-overlay/assembly.xml @@ -57,7 +57,7 @@ docs/javadocs - ../../services/target/site/apidocs + ../../services/target/apidocs docs/rest-api diff --git a/pom.xml b/pom.xml index 8bf033d326..c0985079f3 100755 --- a/pom.xml +++ b/pom.xml @@ -1042,22 +1042,6 @@ - - - - org.apache.maven.plugins - maven-javadoc-plugin - - 128m - 1024m - false - true - - se.unlogic.*:com.restfully.*:org.jboss.resteasy.examples.*:org.jboss.resteasy.tests.* - - - - @@ -1067,6 +1051,31 @@ docbook distribution + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + aggregate + package + + aggregate + + + 128m + 1024m + true + + se.unlogic.*:com.restfully.*:org.jboss.resteasy.examples.*:org.jboss.resteasy.tests.* + + + + + + + diff --git a/services/pom.xml b/services/pom.xml index bc5762f535..2fa148d848 100755 --- a/services/pom.xml +++ b/services/pom.xml @@ -183,35 +183,26 @@ org.apache.maven.plugins maven-javadoc-plugin - - - generate-service-docs - generate-resources - - org.keycloak.services.resources.admin:org.keycloak.protocol.oidc - com.lunatech.doclets.jax.jaxrs.JAXRSDoclet - - - com.lunatech.jax-doclets - doclets - 0.10.2 - - - false - - - ../javadocs - ${project.basedir}/../target/site/apidocs - - - -disablejavascriptexample - -pathexcludefilter '/admin/.*index.*' -pathexcludefilter '/admin' -pathexcludefilter '/admin/\\{realm\\}/console.*' - - - javadoc - - - + + org.keycloak.services.resources.admin:org.keycloak.protocol.oidc + com.lunatech.doclets.jax.jaxrs.JAXRSDoclet + + + com.lunatech.jax-doclets + doclets + 0.10.2 + + + false + + + ../javadocs + ${project.basedir}/../target/site/apidocs + + + -disablejavascriptexample + -pathexcludefilter '/admin/.*index.*' -pathexcludefilter '/admin' -pathexcludefilter '/admin/\\{realm\\}/console.*' + From 927032997ed4de9ad9f4670453f72027153a2faa Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 23 Apr 2015 14:20:33 +0200 Subject: [PATCH 13/16] Updated release instructions --- misc/ReleaseProcess.md | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/misc/ReleaseProcess.md b/misc/ReleaseProcess.md index 08fd1b6db4..6cf5c9d941 100644 --- a/misc/ReleaseProcess.md +++ b/misc/ReleaseProcess.md @@ -14,22 +14,12 @@ $ git@github.com:keycloak/keycloak.git * Build everything to make sure its kosher. ``` $ cd keycloak -$ mvn install -``` - -* Build javadoc and jaxrs-doc -``` -$ mvn javadoc:javadoc -# This is for jaxrs-docs -$ cd services -$ mvn package -# back to root keycloak dir -$ cd .. +$ mvn -Pjboss-release install ``` * Upload to Nexus (from project root) ``` -$ mvn -Pdistribution deploy +$ mvn -Pjboss-release deploy ``` * Login to Nexus and release the maven repository uploads in the staging area. @@ -77,4 +67,4 @@ Releases are automatically synced to Maven central, but this can take up to one ## Announce * Update Magnolia site to link keycloak docs and announcements. -* Write a blog and email about release including links to download, migration guide, docs, and blurb about what's new \ No newline at end of file +* Write a blog and email about release including links to download, migration guide, docs, and blurb about what's new From 37243d058ccf2de94034e119ad4dbc1e0c914ccf Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 23 Apr 2015 15:00:22 +0200 Subject: [PATCH 14/16] Fixes --- .../modules/org/keycloak/keycloak-saml-protocol/main/module.xml | 1 - .../modules/org/keycloak/keycloak-services/main/module.xml | 1 - distribution/server-overlay/pom.xml | 2 +- .../src/main/webapp/WEB-INF/jboss-deployment-structure.xml | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-saml-protocol/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-saml-protocol/main/module.xml index 687cb6b4c2..45a63fa612 100755 --- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-saml-protocol/main/module.xml +++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-saml-protocol/main/module.xml @@ -20,7 +20,6 @@ - diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml index 9864a070c1..e6fe0ba310 100755 --- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml +++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml @@ -65,7 +65,6 @@ - diff --git a/distribution/server-overlay/pom.xml b/distribution/server-overlay/pom.xml index 68a38a137c..a4ef9a04bc 100755 --- a/distribution/server-overlay/pom.xml +++ b/distribution/server-overlay/pom.xml @@ -27,7 +27,7 @@ - keycloak-${project.version} + keycloak-overlay-${project.version} org.apache.maven.plugins diff --git a/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index f44d7d67a0..44ecae0c2f 100755 --- a/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -55,6 +55,7 @@ + From f74e1463dff80c48f706a5bfc8e062cac26622e9 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 23 Apr 2015 15:30:15 +0200 Subject: [PATCH 15/16] Updated docs for server dist changes --- .../en/en-US/modules/server-installation.xml | 205 +++--------------- 1 file changed, 29 insertions(+), 176 deletions(-) diff --git a/docbook/reference/en/en-US/modules/server-installation.xml b/docbook/reference/en/en-US/modules/server-installation.xml index 223c3303d8..5b4b043fe9 100755 --- a/docbook/reference/en/en-US/modules/server-installation.xml +++ b/docbook/reference/en/en-US/modules/server-installation.xml @@ -8,21 +8,21 @@ - keycloak-appliance-dist-all-&project.version;.zip + keycloak-&project.version;.zip - keycloak-war-dist-all-&project.version;.zip + keycloak-overlay-&project.version;.zip -
- Appliance Install +
+ Server Install The - keycloak-appliance-dist-all-&project.version;.zip + keycloak-&project.version;.zip is quite large, but contains a complete server (backed by Wildfly) that runs out of the box. The only thing you'll have to enable and configure is SSL. Unzipping it, the directory layout looks @@ -31,15 +31,13 @@ -keycloak-appliance-dist-all-&project.version;/ - keycloak/ - bin/ - standalone.sh - standalone.bat - standalone/configuration/ - keycloak-server.json - themes/ - examples/ +keycloak-&project.version;/ + bin/ + standalone.sh + standalone.bat + standalone/configuration/ + keycloak-server.json + themes/ docs/ @@ -58,51 +56,32 @@ keycloak-appliance-dist-all-&project.version;/
- WAR Distribution Installation + Server Overlay Installation The - keycloak-war-dist-all-&project.version;.zip + keycloak-overlay-&project.version;.zip contains - just the bits you need to install keycloak on your favorite web container. We currently only support - installing it on top of an existing Wildfly 8 or JBoss EAP 6.x distribution. We may in the - future provide directions on how to install it on another web container like Tomcat or Jetty. If anybody - in the community is interested in pulling this together, please contact us. Its mostly Maven pom work. + just the bits you need to install keycloak on an existing WildFly 8.2.0.Final installation. The directory structure of this distro looks like this: -keycloak-war-dist-all-&project.version;/ - deployments/ - auth-server.war/ - keycloak-ds.xml - configuration/ - keycloak-server.json - themes/ - examples/ + standalone/ + configuration/ + keycloak-server.json + themes/ + providers/ + modules docs/ - After unzipping this file, copy everything in deployments directory into the - standalone/deployments of your JBoss or Wildfly distro. Also, copy everything in - configuration directory into the standalone/configuration directory. + Unzip this archive into the root of your WildFly installation. - - $ cd keycloak-war-dist-all-&project.version; - $ cp -r deployments $JBOSS_HOME/standalone/deployments - $ cp -r configuration $JBOSS_HOME/standalone/configuration - - - - After these steps you MUST then download and install the client adapter - as this may contain modules the server needs (like Bouncycastle). You will also need to install the adapter - to run the examples on the same server. - - - After booting up the JBoss or Wildfly distro, you can then make sure it is installed properly + After booting up the Wildfly distro, you can then make sure it is installed properly by logging into the admin console at http://localhost:8080/auth/admin/index.html. @@ -110,9 +89,6 @@ keycloak-war-dist-all-&project.version;/ Password: admin. Keycloak will then prompt you to enter in a new password. - - You can no longer run Keycloak on JBoss AS 7.1.1. You must run on EAP 6.x or Wildfly. -
Configuring the Server @@ -137,56 +113,12 @@ keycloak-war-dist-all-&project.version;/
Relational Database Configuration - By default, Keycloak uses a relational database to store Keycloak data. This datasource is the standalone/deployments/keycloak-ds.xml - file of your Keycloak Server installation if you used or in standalone/configuration/standalone.xml - if you used . File keycloak-ds.xml is used in WAR - distribution, so that you have datasource available out of the box and you don't need to edit standalone.xml file. - However a good thing is to always delete the file keycloak-ds.xml and move its configuration text - into the centrally managed standalone.xml file. - This will allow you to manage the database connection pool from the Wildfly/JBoss administration console. Here's what - standalone/configuration/standalone.xml should look like after you've done this: + You might want to use a better relational database for Keycloak like PostgreSQL or MySQL. You might also + want to tweak the configuration settings of the datasource. Please see the Wildfly + documentation on how to do this. - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - h2 - - sa - sa - - - - jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - -]]> - - - - Besides moving the database config into the central standalone.xml configuration file - you might want to use a better relational database for Keycloak like PostgreSQL or MySQL. You might also - want to tweak the configuration settings of the datasource. Please see the Wildfly, - JBoss AS7, - or JBoss EAP 6.x documentation on how to do this. - - - Keycloak also runs on a Hibernate/JPA backend which is configured in the + Keycloak runs on a Hibernate/JPA backend which is configured in the standalone/configuration/keycloak-server.json. By default the setting is like this:
-
- EAP6.x Logging - - Accessing the admin console will get these annoying log messages: - - - WARN [org.jboss.resteasy.core.ResourceLocator] (http-/127.0.0.1:8080-3) - Field providers of subresource xxx will not be injected according to spec - - - - - These can be ignored by editing standalone.xml of your jboss installation: - - - - - -]]> - -
-
SSL/HTTPS Requirement/Modes @@ -553,7 +462,7 @@ All configuration options are optional. Default value for directory is - Enable JBoss or Wildfly to use this certificate and turn on SSL/HTTPS. + Enable Wildfly to use this certificate and turn on SSL/HTTPS. @@ -674,29 +583,6 @@ All configuration options are optional. Default value for directory is Check the Wildfly Undertow documentation for more information on fine tuning the socket connections.
-
- Installing the keystore to JBoss EAP6 - - Now that you have a Java keystore with the appropriate certificates, you need to configure your - JBoss EAP6 installation to use it. First step is to move the keystore file to a directory - you can reference in configuration. I like to put it in standalone/configuration. - Then you need to edit standalone/configuration/standalone.xml to enable SSL/HTTPS. - - - - - - - - ... -]]> - - - Check the JBoss documentation for more information on fine tuning the socket connections. - -
@@ -710,7 +596,7 @@ All configuration options are optional. Default value for directory is
- WildFly + Configure WildFly Open standalone/configuration/standalone.xml in your favorite editor. @@ -742,39 +628,6 @@ All configuration options are optional. Default value for directory is Check the WildFly documentation for more information.
- -
- EAP - - - Open standalone/configuration/standalone.xml in your favorite editor. - - - - You need to add redirect-port to http connector element and - add the RemoteIpValve valve: - - - - - - - - - - -]]> - - - - -
-
From 35b6c88500533b95a5ec0ef0c7a281ce1356b7ce Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 23 Apr 2015 15:44:29 +0200 Subject: [PATCH 16/16] Don't replace welcome-content in server-overlay --- distribution/server-dist/assembly.xml | 7 ++ .../server-dist/src/main/providers/README.txt | 2 - .../server-dist/src/main/themes/README.txt | 3 - .../server-dist/src/main/xslt/standalone.xsl | 89 ------------------- distribution/server-overlay/assembly.xml | 15 ---- .../src/main/welcome-content/index.html | 32 ------- 6 files changed, 7 insertions(+), 141 deletions(-) delete mode 100644 distribution/server-dist/src/main/providers/README.txt delete mode 100644 distribution/server-dist/src/main/themes/README.txt delete mode 100755 distribution/server-dist/src/main/xslt/standalone.xsl delete mode 100644 distribution/server-overlay/src/main/welcome-content/index.html diff --git a/distribution/server-dist/assembly.xml b/distribution/server-dist/assembly.xml index 03adcc2ab2..8cbea2dc7b 100755 --- a/distribution/server-dist/assembly.xml +++ b/distribution/server-dist/assembly.xml @@ -26,6 +26,13 @@ 0755 + + src/main/welcome-content + welcome-content + + *.* + + diff --git a/distribution/server-dist/src/main/providers/README.txt b/distribution/server-dist/src/main/providers/README.txt deleted file mode 100644 index a6d523b43f..0000000000 --- a/distribution/server-dist/src/main/providers/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Any provider implementation jars and libraries in this folder will be loaded by Keycloak. See the providers -section in the documentation for more details. \ No newline at end of file diff --git a/distribution/server-dist/src/main/themes/README.txt b/distribution/server-dist/src/main/themes/README.txt deleted file mode 100644 index 705b73ac69..0000000000 --- a/distribution/server-dist/src/main/themes/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -Themes to configure the look and feel of login pages and account management console. It's not recommended to -modify existing the built-in themes, instead you should create a new theme that extends a built-in theme. See the theme -section in the documentation for more details. \ No newline at end of file diff --git a/distribution/server-dist/src/main/xslt/standalone.xsl b/distribution/server-dist/src/main/xslt/standalone.xsl deleted file mode 100755 index 8973a4d71a..0000000000 --- a/distribution/server-dist/src/main/xslt/standalone.xsl +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE - h2 - - sa - sa - - - - - - - - - - - - true - auth - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/distribution/server-overlay/assembly.xml b/distribution/server-overlay/assembly.xml index a85813a2b4..8764a7d3ba 100755 --- a/distribution/server-overlay/assembly.xml +++ b/distribution/server-overlay/assembly.xml @@ -19,14 +19,6 @@ ${project.build.directory}/unpacked/docs docs - - ${project.build.directory}/unpacked/wildfly-${wildfly.version} - - - **/*.sh - - 0755 - ${project.build.directory}/unpacked/modules modules/system/layers/base @@ -38,13 +30,6 @@ **/** - - src/main/welcome-content - welcome-content - - *.* - - ../../ diff --git a/distribution/server-overlay/src/main/welcome-content/index.html b/distribution/server-overlay/src/main/welcome-content/index.html deleted file mode 100644 index ad7660ed03..0000000000 --- a/distribution/server-overlay/src/main/welcome-content/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - Welcome to Keycloak - - - - - -