简体   繁体   中英

Universal user profile for subproject sites – securely trasfering user data from main server

I have a site ( A ) for main project with user system (which is supposed to display all student competitions and academic events in my country for registred users. The site is also enabling users to sign them to these events and some other things. The A account includes just basic information as name, school, email, field of interest, ... )

Also I'm building a site ( B ) as "subproject" (for finding part-time jobs and collaboration with bigger organizations in subject field. Also, there are going to be more of similiar future subprojects, so ( B ) represent a set of child sites). The B sites requires the same data as in A and a few more to be filled in. All subproject will be maintained by the same group of people as the one from main project.

I thought that it would be nice to enable users to login to B sites with account from A but also make it possible to register to B with individual account because users don't have to generally come only from the main A site and may be only interested only in B .


Both servers are running PHP and MySQL service. The B sites will not be hosted on the same server as A so they will have to communicate through Internet, obviously.

I planned following scenario, so far:

  1. User logs in to B with credentials from A
  2. B hashes password and send it with user name through secured channel to A
  3. A compares user and hashed password with its database and either send message with error back or
  4. B logs user in

But my main problem is the part with secure communication, I've looked up some of the basics like that the servers would need a certificate to recognize each other but I haven't found any concrete piece of code to start with.

Also there is a problem with storing the user data, because B needs to be able to show certain field on public website, it would be nonsence to look for them on remote DB, I think. But that leads to storing A user profile fields on B server, so it would be useless to do the whole thing anyway.

I would appreciate any advice!

Well if you have admin access your servers, then you can set up a site to site vpn for securing the communication between the servers.

You can also install SSL certificates on your servers and send data over the SSL secured channels

Another option is to encrypt the messages being sent between the servers using Php.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM