From 7232535729b18ef41fc9071c41cc9a68ae0316c3 Mon Sep 17 00:00:00 2001 From: mposolda Date: Wed, 21 May 2014 11:34:12 +0200 Subject: [PATCH] More mongo fixes --- .../keycloak/models/mongo/keycloak/adapters/RealmAdapter.java | 2 ++ testsuite/integration/README.md | 2 ++ testsuite/integration/pom.xml | 4 ++-- .../src/main/resources/META-INF/keycloak-server.json | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java index da010222f2..da20338ebc 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java @@ -299,6 +299,7 @@ public class RealmAdapter extends AbstractMongoAdapter impleme @Override public void setSsoSessionIdleTimeout(int seconds) { realm.setSsoSessionIdleTimeout(seconds); + updateRealm(); } @Override @@ -309,6 +310,7 @@ public class RealmAdapter extends AbstractMongoAdapter impleme @Override public void setSsoSessionMaxLifespan(int seconds) { realm.setSsoSessionMaxLifespan(seconds); + updateRealm(); } @Override diff --git a/testsuite/integration/README.md b/testsuite/integration/README.md index 003c2151bf..a2033eb399 100644 --- a/testsuite/integration/README.md +++ b/testsuite/integration/README.md @@ -58,6 +58,8 @@ By default it's using database `keycloak` on localhost/27017 and it uses already mvn exec:java -Pkeycloak-server -Dkeycloak.model.provider=mongo -Dkeycloak.model.mongo.host=localhost -Dkeycloak.model.mongo.port=27017 -Dkeycloak.model.mongo.db=keycloak -Dkeycloak.model.mongo.clearOnStartup=false +Note that if you are using Mongo model, it would mean that Mongo will be used for audit as well. You may need to use audit related properties for configuration of Mongo if you want to override default ones (For example keycloak.audit.mongo.host, keycloak.audit.mongo.port etc) + TOTP codes ---------- diff --git a/testsuite/integration/pom.xml b/testsuite/integration/pom.xml index 423b421577..513666f617 100755 --- a/testsuite/integration/pom.xml +++ b/testsuite/integration/pom.xml @@ -471,13 +471,13 @@ ${keycloak.model.mongo.host} ${keycloak.model.mongo.port} ${keycloak.model.mongo.db} + ${keycloak.model.mongo.clearOnStartup} mongo ${keycloak.model.mongo.host} ${keycloak.model.mongo.port} ${keycloak.model.mongo.db} - - ${keycloak.model.mongo.clearOnStartup} + ${keycloak.model.mongo.clearOnStartup} diff --git a/testsuite/integration/src/main/resources/META-INF/keycloak-server.json b/testsuite/integration/src/main/resources/META-INF/keycloak-server.json index 29172c23fa..251dfa48b4 100644 --- a/testsuite/integration/src/main/resources/META-INF/keycloak-server.json +++ b/testsuite/integration/src/main/resources/META-INF/keycloak-server.json @@ -9,7 +9,7 @@ "host": "${keycloak.audit.mongo.host:127.0.0.1}", "port": "${keycloak.audit.mongo.port:27017}", "db": "${keycloak.audit.mongo.db:keycloak-audit}", - "clearOnStartup": "${keycloak.model.mongo.clearOnStartup:false}" + "clearOnStartup": "${keycloak.audit.mongo.clearOnStartup:false}" } },