Wso2 Userstore migration from LDAP to DB (Custom user store) - wso2-identity-server

We are using WSO2 identity server with LDAP as a user store. Now we would like to replace LDAP with database because of huge load (> 10 Millions) and growing. I have migrated the users but how tenant details in wso2 core database could be set with the new user store. That is the user store xml details are stored in their tenant table. How this could be migrated. Or what are all the changes, configurations, needs to be set in wso2 identity server level.

At the moment we don't have exact mechanism to migrate data from one DB type to another. What we have is upgrading one version to another using same DB.
But you can do this migrating data from an LDAP to any DB like MySQL manually. If you can write an shell script to convert LDAP data toa csv file, its easy for you to move to a MySQL like DB in one import command.
Furthermore, I was able to find out some similar articles which can help you to migrate content from LDAP to MySQL [2],[3],[4]
The table structures of DB types can be found from [1].
Once you migrate the data to JDBC, you can change the custom-userstore.xml file with new connection values and restart the server. If you changed your primary user store, you need to change the user store configurations in user-mgt.xml file.
Please let me know if you need further help in migrating.
[1]https://docs.wso2.com/display/IS550/Data+Dictionary
[2] https://social.msdn.microsoft.com/Forums/sqlserver/en-US/dfae020f-a3bf-4e9b-9614-eccf7890f8c6/how-to-extract-data-from-ldap-and-then-import-it-into-sql-database-for-quicker-retrieval?forum=transactsql
[3]Active Directory data into SQL table
[4] https://www.egnyte.com/blog/2014/01/how-we-migrated-millions-of-users-from-ldap-to-mysql-using-feature-flags/

Related

Migrate users from database to another on Django

I already have an existing website running and want to transfer just the users (usernames, passwords and emails) to another database for a separate Django website as I am rebuilding it.
You can configure both databases in your django configuration file. select the user data from one database and then put the records in the other.
Multiple Databases in Django.
Moving an object from one database to another

Sitecore WFFM 8.2 rev. 160801 is not storing data in reporting database

I have installed Sitecore 8.2 rev. 160801 in my machine and worked on forms. On submission of form, I didn't get any error but the values are not stored in Database. In log also I didn't find any error.
I followed the post installation steps and ran the WFFM_Analytics.sql script on my reporting database.
Could you please someone help me to resolve this issue?
Thanks,
Bala
By default the WFFM data is stored in Mongo (in a collection called FormData). You should find your data there. If you want the data to be stored in SQL, you can change that by using anothor provider: https://doc.sitecore.net/web_forms_for_marketers/setting_up_web_forms/installing/use_a_custom_sql_provider_to_store_form_data
In the Web Forms for Marketers module, you can use your own SQL Server
storage location, if, for example, you would like to store form data
in a different, more secure location.
By default, the xDB data provider stores and exports data from the xDB
analyticsFormsDataProvider class. However, you can change the data
provider to a custom SQL Server database data provider, or to a
combined reporting and custom SQL Server database data provider

Django: Saving oauth provider data

I set up a simple django site using django-allauth.
I created some oauth providers in the database.
Everything is fine and working on my laptop now.
I would like to store the created database tables somehow.
Use case: I want to set up a new development environments on a different PC painlessly.
How to store the initial data of django_allauth, so that after checking out the app from git the command manage.py migrate is all I need to have the relevant database tables filled?
Django_allauth already save those data to the database, you will find them in a table *_SocialApp, here is the model code from django_auth source

Best way to keep ldap in sync with sql database

We are using an LDAP for user administration and authorization/authentication for a set of applications.
But there are also some applications were we need to have the LDAP user/group data accessible in an sql db2.
I'm using django to connect all these datasources and I was planning to use django celery to keep the LDAP and db2 in sync, where LDAP should be leading.
The following applies:
- The db2 user/groups tables cannot be written to, except from the scheduled celery task.
- The ldap model and db2 model both use "userid" as the primary key.
- The db2 table will insert if a userid cannot be found, and update only the changed fields, which are different on ldap then are on db2.
I was thinking of hashing the fields on LDAP and DB2 into a saved field, to check if the objects are in sync?
But what are the best practices to keep data integrity in this example?

Using .csv as user model in Django

I have a django app that works with .csv files as database, in these files i have the users of the system (i can't change that), i need to implement security (a login) in the site. Any idea?
Your question is very vague and you didn't ask for specifics so here is a general overview of what you'll need to do.
If you intend to use django's built-in authentication system then you'll have to setup a database; even if its sqlite. Once you have setup a database, run manage.py syncdb to create the necessary authentication tables (by default, the settings.py that django creates is already setup for the authentication system, so you don't have to make any other changes).
Once you have that done, you'll have to write a fixture to load the users from the csv file into the authentication tables. You can read up on that in the documentation under providing initial data for models.
Now you are ready to set passwords and permissions. Your next task will be to make sure that the csv file is in sync with the authentication tables if there a change in the csv file.