开发者

GWT RPC Data Encryption and gwt-crypto issue

开发者 https://www.devze.com 2023-03-31 09:43 出处:网络
I have a GWT app, which is deployed on the app engine. The application is basically an exam simulator. All the exam questions and answers are stored in an XML file on the server. I use JAXB parser to

I have a GWT app, which is deployed on the app engine. The application is basically an exam simulator. All the exam questions and answers are stored in an XML file on the server. I use JAXB parser to parse the XML file and send a list of objects to the client through GWT RPC.

I noticed that during the transit (server -> client), the entire data is visible in plain text in Firebug. Since the data (exam questions and answers) are my intellectual property (IP) and something that I give lot of value to, I'm concerned that it's very easy to steal that data. Therefore, I'm trying to find ways to do some basic encryption and obfuscate the content when it's being sent over from the server to the client.

After Googling, I came across 开发者_运维问答gwt-crypto project, and within a few minutes, I was able to achieve the exact result that I wanted. The server would encrypt the data, and the client would decrypt it. In Firebug, it would show the data in encrypted format, and not as plain text.

However, I ran into an issue. After implementing encryption/decryption, I noticed that my application would not load inside my company's network, which is obviously protected by a firewall. The application works perfectly from home or even on a 3G network on my phone. Another version of the application, which does not use encryption/decryption works perfectly from within my company's network. I confirmed this by creating 2 exact same versions of the app, with the only difference between a boolean flag, that determines whether encryption/decryption is enabled or disabled.

I have the following questions here:

  1. What is the best way to achieve the result that I want to achieve? Is gwt-crypto a good solution for that? I'm fine with any simple approach to obfuscate the data during transit. It doesn't have to be a sophisticated algorithm.

  2. What could be the possible reason for a GWT app, with encryption/decryption enabled, not working inside a firewall? I'm really clueless on this.

I'll appreciate any help on this issue.


Using SSL is the right way to go.

In your case, given AppEngine SSL limitations, you should load your HTML normally from non-SSL domain and use cross-site RPC to load your data via SSL domain.

Update:

What is the best way to achieve the result that I want to achieve?

If you want to secure the data in transit then the only secure option is SSL/HTTP. Usually it's also the simplest one as it does not require you to change the application code, just server configuration. In your particular case (appengine with private domain), it takes more work as described above.

 Is gwt-crypto a good solution for that?

No. gwt-crypto uses a key to encrpt/decrypt the data. You also need a secure way to discribute this key.

I'm fine with any simple approach to obfuscate the data during transit.

Security through obscurity in not security. It's a false sense of security, which is even more dangerous than no security. It's enough that only one of the technically capable students cracks this and soon everybody would do it.

Possible attack would go like this:

  1. Snoop the network, get username/password of user.
  2. Login as that user, have browser load exam data, which is now unencrypted in memory.
  3. Dump the DOM and inspect it for exam questions.

-

What could be the possible reason for a GWT app, with encryption/decryption
enabled, not working inside a firewall?

Use firebug to make sure network connections are identical, except for the encrypted content. Firewalls should not work that deep. Talk to sysadmin about it.

0

精彩评论

暂无评论...
验证码 换一张
取 消