Home > Back-end >  How to do the Datasnap safer?
How to do the Datasnap safer?

Time:09-19

Consult a DataSnap problem, help that ace to give directions:
Datasnap how to obtain the client request message, so, I hope to do the datasnap safer, hope in TDSTCPServerTransport or TDSAuthenticationManager stage will filter out illegal connections, up to the onConnect TDSServer will filter out illegal connections, but found that can get a different client information,
TDSTCPServerTransport (Event: TDSTCPConnectEventObject), TDSAuthenticationManager only (const Protocol, Context, User, Password: string) a few information, and the Context is empty, TDSServer. OnConnecte (DSConnectEventObject: TDSConnectEventObject), the information obtained from three places is different, I think I should is DataSnap dropped the illegal connection block in the first place, according to the DataSnap join order, for TCP/IP Protocol, the first TDSTCPServerTransport - & gt; TDSAuthenticationManager - & gt; TDSServer, whereas the Http protocol directly to TDSAuthenticationManager - & gt; TDSServer, then in TDSAuthenticationManager should at least get the client's IP address, had better be all message,
Who have the means to, or have other guarantee safe way, please advise,

CodePudding user response:

DataSnap server and client, is built on a GUID coding, to establish a connection, therefore, basic does not exist, illegal client access,
So, to ensure safety of connections:
1, not correct GUID yards, can't be connected; The first layer security ()
2, login to confirm the legitimacy of the people, achieve this accounted for, first of all need to be able to log in to the server and upload the user name of the input, SN, after comparing database, can enter the system, (the second layer security)
3, in a database table, inputting a series of "user name" and "SN", log on, by comparison, to determine whether the user can access, and its authority, (the third layer security)
4, to strengthen security, can be by IP address or network card address and user name SN double inspection, the premise is logged in to upload, IP address, network card address and user name, SN,

You said through the onConnect will filter out illegal connections, not seen,
  • Related