Using LDAP as a frontend for central login based on existing MySQL database - mysql

In my company, there is an "all purpose" application which is central and that we want to use as our central diary for users accounts and authentication.
Every users and ACLs are declared in this DB (which is a MySQL DB) but we are now using more and more external application and would like to connect them to this DB for authentication purpose (mainly).
LDAP is quite common for this and is well integrated in many external applications so I was wondering if it would be possible to build an LDAP frontend on top of that DB so that accounts creation and ACLs can be done as it is currently and external applications can connect with a standard interface.
Is it possible ?
Can somebody point me to tutorials or informations about that kind of operation ?
Thanks.

OpenLDAP and OpenDS can be configured to use an SQL database as backend. A mapping can (at least in OpenLDAP) be defined between LDAP data and SQL data.
So, the remaining question seems to be: Can the mapping be defined so flexibly that it suits your existing database structure?
EDIT:
MyVD creates a Virtual Directory that you can feed with a database - and seems to be more light-weight.

Related

in ejabberd, is it possible to specifiy a database schema name for a postgresql backend?

My scenario is hosting multiple domains (virtual hosts). The ejabberd doc says ...
"Important note about virtual hosting: if you define several domains in ejabberd.yml (see
section Host Names), you probably want that each virtual host uses a different
configuration of database, authentication and storage, so that usernames do not conflict
and mix between different virtual hosts."
I plan to host on AWS RDS, which means a lot of admin to onboard a new virtual host.
A simpler alternative would be for all virtual hosts to live in the same postgresql instance, but under individual schema names to create isolation within the db. Currently no schema is specified so tables are created under the default public schema.
Is this possible?
PS. I'm aware that the "new schema" supports multi-homing, but for the ease of admin I'd still prefer to keep each domain isolated.
Is this possible?
Well, your question is clear and specific. And the answer is, too: not possible, at least according to ejabberd documentation and implementation.

Replicate mnesia database to Mysql

I have installed ejabberd on an AWS EC2 instance and am using the smack library to connect to it with my android app. At the moment the ejabberd server is using mnesia as the database, however I want to perform some complex queries on some of the data (mainly the MUC room names), as SQL will predominantly the best solution for this, I was wondering if it was possible to replicate the required data to an external MySQL database that I could then query.
Is this possible or am i better looking at a different approach to this problem?
There is no module built into ejabberd to replicate data in Mnesia to MySQL. However, the usual approach is to use the backend you need for each feature. If you want mod_muc to store data into MySQL instead of Mnesia, you can just change the backend to odbc (which means it will store data for that module in a relational database).
You can refer to ejabberd documentation for MUC module: http://docs.ejabberd.im/admin/guide/configuration/#modmuc
Once your MySQL is configured and schema is loaded, you can set db_type to odbc on a case by case basis to choose MySQL for that module.

MySQL database hosted online

So I have created a mysql database hosted at db4free.net, and am able to access it easily from the command line or from java. My concern however, is I can only access it using my own username, password credentials. I tried to create user, but it appears I cannot as I get Access Denied. I'm assuming I don't have privileges to create users from this hosted database.
Now I want to include access to this online database in my application, but I don't know how without having major security issues. The only apparent way for another user to connect would be to include my own username, password credentials for the database but that is very unsafe.
Any ideas on how I can provide database access to users safely ?
From the front door page of the service you're using:
What db4free.net is not
db4free.net is a testing service which means it is not suitable for
production. There can be outages, data loss and security features do
not meet the standards which you expect from a professional data
hosting provider. If you need a MySQL database for production use,
please do not use db4free.net!
This seems pretty clear to me. Don't do what you're hoping to do!
Plus, it's not a good idea security-wise to open up a MySQL server to the public internet without using secured connections. Even then it's questionable. Somebody who reverse-engineers your app can pwn your database.

How split MySQL database into multiple host, keeping remote references

I'm developing a web application that will handle user and data.
One requirement for this project is that the data collected must be stored in another host than the one with webserver.
My first idea was to deploy a single database with user data, login info and preferences all together into one host and keep the webserver into another one, using remote connection for each query. But this is not required, only user data must be stored in a remote host and other info can be locally accessed by webserver.
Does exists a way to manually split a MySQL database in two different host leaving to the framework to keep remote reference and coherence?
I think you can do this:
Can MySql 5.0 have a view of a table located on another server
In the local DB define the view of the table you want to be remotelly hosted.

Creating MySQL database and user to be hosted on one.com

I'm attempting to create a MySQL database and administrator user to this database and I intend on hosting the database on one.com. I noticed that in other webhosts e.g. bluehost, the option of creating a MySQL database and a user is available but this is not available on one.com.
My question is how does someone using code create a MySQL database and user which can be hosted on a webhost in my case one.com?
Any ideas are appreciated.
Thanks.
Most hosting providers use CPanel or ZPanel for providing services to their clients. Both the panels come with services that allow creation of a database and assigning an user to the database.
It is possible to query MySQL to do the same, but hosting providers always restricts the clients from direct querying of their database servers.