# Keycloak SPI Implementation Details

**URL:** <https://forum.keycloak.org/t/keycloak-spi-implementation-details/1078>\
**Category:** Getting advice\
**Created:** [January 27, 2020, 4:09pm UTC](https://forum.keycloak.org/t/keycloak-spi-implementation-details/1078 "2020-01-27T16:09:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vladanv](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/vladanv/32/1299_2.png) [@vladanv](https://forum.keycloak.org/u/vladanv)\
**Post date:** [January 27, 2020, 4:09pm UTC](https://forum.keycloak.org/t/keycloak-spi-implementation-details/1078/1 "2020-01-27T16:09:50Z")

</div>

We created custom user storage federation adapter to migrate users from our legacy system into Keycloak.  
What we saw when we did it - users are well migrated and after unlinking from user federation logging in still works…  
When we tried to look what’s going on in in the database we saw that new users are stored in _user\_entity_ and credentials into _credential_ table.  
The question would be for the Keycloak engineers - since there are a lot of user federation related tables in the Keycloak (_federated\_user, fed\_user\_credential. etc_) we expected them to be used in this process of migration… user details would be placed in these tables and later upon unlink action they would migrate to the main tables… instead, we just have _federation\_link_ value set as a sign that user is connected to some provider.  
So, is there any mistake in our SPI implementation and usage or these tables are irrelevant and part of some legacy code, and they shouldn’t worry us?  
Also, is there any ‘consultancy’ or ‘code review’ that official Keycloak team can provide?  
Thanks
