[keycloak-dev] Changing database for maintaining user history

Stan Silvert ssilvert at redhat.com
Mon Mar 23 08:22:10 EDT 2015


On 3/23/2015 3:27 AM, Marek Posolda wrote:
> Hi,
>
> the database is re-created after each start just if you're using 
> in-memory H2 database. This is the case by default if you're using 
> KeycloakServer from testsuite for development. You can change it to 
> use either File-based H2 (this is used by keycloak-appliance 
> distribution by default) or point to some other DB like MySQL for 
> example.
>
> To change this, you just need to add few system properties when 
> running server. See this file for details of what needs to be changed: 
> https://github.com/keycloak/keycloak/blob/master/testsuite/integration/src/main/resources/META-INF/keycloak-server.json
>
> I am personally usually using mongo for development with 
> KeycloakServer. Data are persistent among server restarts, so DB 
> doesn't need to be initialized after restart and server startup 
> usually takes about 2 seconds on my laptop.
I'm doing the same thing with the file persistence.  The file is written 
to the /target directory.  After a test, it should be about 17K if it 
was cleaned up properly.  If not, you immediately know something went 
wrong with the test.
>
> Marek
>
> On 22.3.2015 14:27, Prakhash siva wrote:
>> Hi all,
>> I have a issue related to how the KC database works. According to my 
>> understanding it is a sqlite kind of database and whenever I run the 
>> server it get initiates. so when logging the events with the purpose 
>> of detecting intrusions is it 100% possible to use the inbuilt 
>> database of  KC.
>>
>> for example If I'm going to maintain a history for a specific client 
>> to identify his activities it can't be locally tested. So its trivial 
>> that I need to change the database. So I need to get to know if I 
>> change the database to mongo will the same re initialization process 
>> will happen? and where I need to work for this
>>
>> Thanks
>>
>> -- 
>> /*Sivakumar Prakhash*/
>> /*Undergraduate*/
>> /*Computer Science & Engineering*/
>> /*University of Moratuwa.*/
>>
>>
>>
>>
>> _______________________________________________
>> keycloak-dev mailing list
>> keycloak-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20150323/23c5b243/attachment.html 


More information about the keycloak-dev mailing list