#1 Re: mORMot 1 » Stucked on encryption over websockets » 2015-08-19 08:36:09

so never mind encryption. i need this answers

--------------------

i used browser on your chat sampe like this
http://localhost:8888/root/ChatService/blabla?pseudo=Browser&msg=Test%20Message

result: message "Test Message" sended to all clients

questions
1- how can i prevent broswer or un authorized service calls like browser call above. because each call creates a null callback interface so that is
a big security issue for everyone.
2- is there any other ways using callbacks with your servers except websocket
3- is there any way to learn client ip from your rest servers?. all servicecontext.request.call.inhead is empty.
---

#2 mORMot 1 » Stucked on encryption over websockets » 2015-08-18 14:40:57

ulutepe
Replies: 3

in your 31 - WebSockets samples with both chat and longwork project i tried to use encryption over http and couldn't find how to
encrypt my request and responses. simply i changed chat server run method like this

...
  Server := TSQLRestServerFullMemory.CreateWithOwnModel([]);
  try
    Server.CreateMissingTables;
    Server.ServiceDefine(TChatService, [IChatService], sicShared).
      SetOptions([], [optExecLockedPerInterface]). // thread-safe fConnected[]
      ByPassAuthentication := true;
    HttpServer             := TSQLHttpServer.Create('8888', [Server], '+', useBidirSocket, 32, secSynShaAes);
    try
      HttpServer.WebSocketsEnable(Server, PROJECT31_TRANSMISSION_KEY).
        Settings.SetFullLog; // full verbose logs for this demo
      CompressShaAesSetKey('asdqwe123', TAESECB);
...

then client run method like this

....
  Client := TSQLHttpClientWebsockets.Create('127.0.0.1', '8888', TSQLModel.Create([]));
  try
    Client.Compression := [hcSynShaAes];
    Client.Model.Owner := Client;
    Client.WebSocketsUpgrade(PROJECT31_TRANSMISSION_KEY);
   
    CompressShaAesSetKey('asdqwe123', TAESECB);

    if not Client.ServerTimeStampSynchronize then
        raise EServiceException.Create(
        'Error connecting to the server: please run Project31ChatServer.exe');
    Client.ServiceDefine([IChatService], sicShared);
    if not Client.Services.Resolve(IChatService, Service) then
        raise EServiceException.Create('Service IChatService unavailable');
.....

then i used broser like this
http://localhost:8888/root/ChatService/blabla?pseudo=Browser&msg=Test%20Message

result: message "Test Message" sended to all clients

questions
1- how can i prevent broswer or un authorized service calls like browser call above. because each call creates a null callback interface so that is
a bit security issue for everyone.

2- is there any other ways using callbacks with your servers except websocket

3- is there any way to learn client ip from your rest servers?. all servicecontext.request.call.inhead is empty.

thank you

#3 Re: mORMot 1 » implement push notifications » 2015-07-31 13:58:09

i thing mormot needs more examples about using interface based websocket services with callbacks and sending binary data's

#4 Re: mORMot 1 » My mORMot Videos » 2015-06-18 12:50:16

can i get source code of 23.Delphi mORMot + Websockets = DO MACARENA pls

#5 Re: mORMot 1 » Need Suggestion About Structure » 2014-05-25 14:52:05

Thanks for reply.

i already used http.sys structure i really liked it bu i want to use a TCP based and encrypted structure and i read all 1.17 documantation and i saw coparation of wininet,http.sys and socket speeds
i will read now 1.18 SAD. i only dont  know which mormot objects will i use smile

#6 mORMot 1 » Need Suggestion About Structure » 2014-05-25 14:32:03

ulutepe
Replies: 5

Explanation:
i want to design a server which will use only socket or wininet like indy's TIdTCPServer. Not want REST because of http.sys's needs admin privileges so;

i will transport my own datasets and objects with encryption (Not SSL i will write it myself) to client side and maybe i will declare a few event.
also i will transport files too. the database which will i use is not important on server side.

Question:
so can anyone suggest me that which mormot objects i can use with his scenario? an example will be better:)

Board footer

Powered by FluxBB