You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Samara, Fadi N Mr ACSIM/ASPEX" <Fa...@hqda.army.mil> on 2006/01/17 16:23:18 UTC
RE: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)
Classification: UNCLASSIFIED
Caveats: NONE
Which code are you exactly trying to protect ? By struts code, I am assuimg
you mean your classes ?
-----Original Message-----
From: Tom Burke [mailto:tom.burke@expensys.com]
Sent: Tuesday, January 17, 2006 10:19 AM
To: Tomcat Users List
Subject: Encrypting/Protecting JSP/Struts source code
My company is has developed and is now marketing/selling a line-of-business
TSP/Tomcat application which we sell to corporate customers to runs on their
servers in their intranets.
It's suddenly become clear to my company that when we deploy a WAR on a
customers' site, the source code is completely visible to anyone who has
access to the server's drives, and this is belatedly causing some concern.
Obviously there are clauses in our license that formally protect our
intellectual property and at a corporate level we are relaxed, but my boss
is quite concerned about the delinquent administrator who simply downloads &
walks away with the code.
Is there any way in which the deployed WAR file, and all the files that
explode out of it, can be hidden/encrypted/protected on the server, while
still allowing them to be executed by Tomcat? The app is almost completely
JSP/Struts, there is hardly any HTML at all (if any in fact).
Tom Burke
Classification: UNCLASSIFIED
Caveats: NONE
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)
Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Rob Gregory wrote:
>Good comments, but how would you encrypt the config files when Struts needs
>these to run out code (hence before I can decrypt). While I personally
>prefer Cocoon over struts these are pretty much 'Sister' projects so the
>same solution would help me also.
>
>
This is a valid question. You would have to override some of Struts
functionality, locate where it loads config files and add a hook for
decryption. Not a trivial task, but should not be impossible. The
biggest issue with this is that by doing so, you're creating your own
Struts port/branch and you would have to maintain it plus all upgrades.
Switching over to a newer release of Struts would require you to build
your Struts again, with the your changes.
Not something I would recomend. And again, it is not impossible to
crack. In my oppinion, it is not worth the time, unless your securtity
requirements are really high. But then, the machine's security is
probably more important than encrypting config files.
Nix.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)
Posted by Rob Gregory <Ro...@RosesGroup.co.uk>.
Good comments, but how would you encrypt the config files when Struts needs
these to run out code (hence before I can decrypt). While I personally
prefer Cocoon over struts these are pretty much 'Sister' projects so the
same solution would help me also.
Discussion appreciated.
Rob
-----Original Message-----
From: Nikola Milutinovic [mailto:Nikola.Milutinovic@ev.co.yu]
Sent: 17 January 2006 21:28
To: Tomcat Users List
Subject: Re: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)
Samara, Fadi N Mr ACSIM/ASPEX wrote:
>Classification: UNCLASSIFIED
>Caveats: NONE
>-----Original Message-----
>From: Tom Burke [mailto:tom.burke@expensys.com]
>Sent: Tuesday, January 17, 2006 10:19 AM
>To: Tomcat Users List
>Subject: Encrypting/Protecting JSP/Struts source code
>
>My company is has developed and is now marketing/selling a line-of-business
>TSP/Tomcat application which we sell to corporate customers to runs on
their
>servers in their intranets.
>
>It's suddenly become clear to my company that when we deploy a WAR on a
>customers' site, the source code is completely visible to anyone who has
>access to the server's drives, and this is belatedly causing some concern.
>Obviously there are clauses in our license that formally protect our
>intellectual property and at a corporate level we are relaxed, but my boss
>is quite concerned about the delinquent administrator who simply downloads
&
>walks away with the code.
>
>Is there any way in which the deployed WAR file, and all the files that
>explode out of it, can be hidden/encrypted/protected on the server, while
>still allowing them to be executed by Tomcat? The app is almost completely
>JSP/Struts, there is hardly any HTML at all (if any in fact).
>
>
There is some nonsense here, so let us clear it out.
First of all, Java classes are compiled binary entities, no source
there. Sure, there are tools for reverse engineering, decompilers. You
can make life harder for them by using obfuscators, I believe Jakarta
has a good one.
Next, for JSPs, well, yes they are source, but in Struts applications,
they should have a limited role. Even so, there are JSP precompilers,
Ant has a task for that. Couple it with an obfuscator and your source is
unreadable. The only thing that remains are the config files. You could
theoretically encrypt them, keeping the key inside your code, which will
get obfuscated, anyway.
Does that satisfy you?
Nix.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)
Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Samara, Fadi N Mr ACSIM/ASPEX wrote:
>Classification: UNCLASSIFIED
>Caveats: NONE
>-----Original Message-----
>From: Tom Burke [mailto:tom.burke@expensys.com]
>Sent: Tuesday, January 17, 2006 10:19 AM
>To: Tomcat Users List
>Subject: Encrypting/Protecting JSP/Struts source code
>
>My company is has developed and is now marketing/selling a line-of-business
>TSP/Tomcat application which we sell to corporate customers to runs on their
>servers in their intranets.
>
>It's suddenly become clear to my company that when we deploy a WAR on a
>customers' site, the source code is completely visible to anyone who has
>access to the server's drives, and this is belatedly causing some concern.
>Obviously there are clauses in our license that formally protect our
>intellectual property and at a corporate level we are relaxed, but my boss
>is quite concerned about the delinquent administrator who simply downloads &
>walks away with the code.
>
>Is there any way in which the deployed WAR file, and all the files that
>explode out of it, can be hidden/encrypted/protected on the server, while
>still allowing them to be executed by Tomcat? The app is almost completely
>JSP/Struts, there is hardly any HTML at all (if any in fact).
>
>
There is some nonsense here, so let us clear it out.
First of all, Java classes are compiled binary entities, no source
there. Sure, there are tools for reverse engineering, decompilers. You
can make life harder for them by using obfuscators, I believe Jakarta
has a good one.
Next, for JSPs, well, yes they are source, but in Struts applications,
they should have a limited role. Even so, there are JSP precompilers,
Ant has a task for that. Couple it with an obfuscator and your source is
unreadable. The only thing that remains are the config files. You could
theoretically encrypt them, keeping the key inside your code, which will
get obfuscated, anyway.
Does that satisfy you?
Nix.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org