How do I protect my JNLP, my JARs etc. (with Basic Authentication)???

hi all,
i know that there is a FAQ ( [see here|http://lopica.sourceforge.net/faq.html#obfuscate] ) answering a related question with "You can use an obfuscator...". ok, but is there really no other solution?
this is the simplified folder structure of my application on the server:
[application]
  [etc]
    xyz.xml
  [jars]
    myapp.jar
  launch.jnlp
website.jsp
initial start and basic authentication:*
my first idea was to secure everything underneath "application" with basic authentication via my web.xml (yes, i'm aware of the security concerns). this means everybody can access my website (here: website.jsp) which contains a start button that links to "launch.jnlp". as soon as the user clicks on it, the browser opens its standard authentication dialog since launch.jsp is in a protected area. after entering the correct credentials the jnlp-file is downloaded and java web start takes over control. first of all it seems as it tries to access the same jnlp-file again (??? --> probably in order to check for changes in the jnlp file --> this is certainly not the case for the initial startup) and then wants to download the relevant jar (myapp.jar). because both resources are protected jws opens its own basic authentication dialog where i have to enter the same credentials the second time. as far as i know, there is no solution to pass the credentials between the browser and the jvm.
second start and basic authentication:*
if the user starts my application for the 2nd, 3rd, ... time via desktop-link (set in jnlp-file) there is no need for accessing my website with a browser. therefore only the authentication dialog of jws gets displayed. so far, so good!
and now the actual problem:*
during runtime my application (signed with verisign certificate and having all permissions) uses commons-vfs and commons-httpclient to access resources on the same server (e.g. etc/xyz.xml). since they're underneath the protected "application" directory as well, my application needs the same credentials the user already entered in the authentication dialog of jws. now i could retrieve these credentials by calling Authenticator.requestPasswordAuthentication() within my application and passing them to vfs and httpclient. however, doing so opens up jws' authentication dialog again. grrr!!! is there a way to prevent this?
related thougts:*
i know i could disable jws' default Authenticatior and set my own Authenticator which might be able to return already entered credentials without opening the dialog a second time. however, it seems that even with <property name="javaws.cfg.jauthenticator" value="none" /> jws still opens its own dialog when acessing the JNLP file and the relevant JARs during the startup/download phase. of course, who else if not jws could handle that phase? my application might not even be downloaded at this point. so i guess setting my own Authenticator would not be a solution either (at least not if i want to secure my jnlp and my jars, too). quite the contrary, it would have to open another dialog... :-(
my current solution:*
for the moment i use jws' default Authenticatior which allows me to easily protect all my stuff on the server side (jnlp, jar, etc). i can live with the two login dialogs at the initial startup. and instead of querying the credentials from jws' default Authenticatior at runtime, i set two system properties for username and password in the (protected) jnlp-file, query them at runtime and hand it to vfs and httpclient. this prevents the 2nd (or 3rd) dialog but is definitely not a great solution. most of all i'm not happy with the fact that this somehow "destroys" the container-based security advantage of easily configuring authorized users via a separate mechanism e.g. tomcat-users.xml. now there has to be one master-password that has to be set in the jnlp-file! grrr!
a possible alternative:*
i'm not sure but would it be better to secure everything with form-based authentication on the website, and dynamically generate username and password into the jnlp-file? but what happens when the admin changes the password on the server and the user starts its application via desktop-link??? in case of basic authentication i think jws would popup the login dialog again. however, if i use the old username and password generated into the jnlp it won't work. i think the user then has to access the website again. this is not good at all! :-(
the only real solution:*
should i write a small application which can be downloaded by everybody and on startup queries the user's credentials, validates them with the help of our server, and uses the javax.jnlp-api to download the secured JARs of my real application? this seems so much overkill! does anybody have experiences with this approach? how difficult is it to implement the whole download/update stuff with javax.jnlp?
WHAT HAVE I MISSED???
AM I COMPLETELY WRONG???
WHAT IS THE EASIEST WAY???
AND WHAT IS THE BEST WAY???
thank you so much,
stephan

Not sure, whether I understood correctly, what you wanna do - but up to now I can't see any problem.
if you have a structure like this:
/ctxroot/
       launch.jnlp
       /app/
           *.jar
           *.whateveryou may use in your web.xml:
     <servlet>
          <servlet-name>JnlpDownloadServlet</servlet-name>
          <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
     </servlet>
     <servlet-mapping>
          <servlet-name>JnlpDownloadServlet</servlet-name>
          <url-pattern>*.jnlp</url-pattern>
          <url-pattern>/app/*</url-pattern>
     </servlet-mapping>
     <security-constraint>
          <web-resource-collection>
               <web-resource-name>Application</web-resource-name>
               <url-pattern>/app/*</url-pattern>
               <http-method>GET</http-method>
               <http-method>POST</http-method>
          </web-resource-collection>
          <auth-constraint>
               <role-name>bla</role-name>
               <role-name>fahsel</role-name>
          </auth-constraint>
          <user-data-constraint>
               <transport-guarantee>CONFIDENTIAL</transport-guarantee>
          </user-data-constraint>
     </security-constraint>
     <security-constraint>
          <web-resource-collection>
               <web-resource-name>Subscription</web-resource-name>
               <url-pattern>*.jnlp</url-pattern>
          </web-resource-collection>
          <user-data-constraint>
               <transport-guarantee>CONFIDENTIAL</transport-guarantee>
          </user-data-constraint>
     </security-constraint>
     <login-config>
          <auth-method>BASIC</auth-method>
          <realm-name>whatever-realm</realm-name>
     </login-config>
     <security-role><role-name>bla</role-name></security-role>
     <security-role><role-name>fahsel</role-name></security-role>
...Than you may use the Service stuff like:
     BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
     URL codeBase = bs.getCodeBase();
     URL pu = new URL(codeBase.toString() + "whatever.bla");
     HttpURLConnection res = (HttpURLConnection) pu.openConnection();
     res.setInstanceFollowRedirects(true);
     res.setRequestMethod("GET");
     res.setConnectTimeout(10 * 60 * 1000);
     res.connect();
     String enc = res.getContentType();
...Where is the problem? If you wanna intercept certain "calls" to an app resource, just use a filter, which decides, whether to answer the request directly by itself or to pass it to the JnlpDownloadServlet ...

Similar Messages

  • How do I protect audio that I put up with iweb?

    How do I protect audio that I put up with iweb? I want them to be able to play it but not download it.
    Any advice gratefully received!

    It's impossible to do with iWeb.
    If anyone says otherwise and suggests something like 'use a Flash player - more info on my ad-filled website' they simply don't know any better.
    Just remember that whatever you upload to a website can be downloaded by others. The best deterrent is to only play a small portion of the music file and if you want to sell the song then provide the option for the user to purchase the full version. To enable download purchases and assure that the method can not be circumvented requires some rather involved server side scripting. The typical iWeb user that possesses little-to-no knowledge of web coding may find the limited and costly alternative of using a third party service their best method of delivery.

  • How can i acces the images from jar to with in jar

    I want to now make a executable jar file which contain all class files and one jar file (which contain all images).
    before jar i use
    icon=new ImageIcon(getClass().getResource("image.gif"));
    now what can i do and it is possible that no change in the path of image icon.

    A jar inside a jar wouldn't be a good idea I don't think- you'd end up having to code around some things to get at the internal jar instead of being able to use code like "getResource()" like you posted.
    Consider an ANT task that will handle building your jar for you, if this is a logistics issue. The task can unzip the image jar and shove it in with the application jar.

  • I received a text regarding visa check card deactivation.  Obviously some scam, but is the info on my iPhone compromised?  How can I protect it from bots/trojens/etc?

    I received a text on my IPhone 5C that is obviously malware, erased it, powered off iPhone, installed IOS 8.1.3.  Has information on my IPhone been compromised? What should I do to protect the information and rid it of any loaded malware? Message was a "Seaboard Federal Credit Union Alert" that my Visa check card had been deactivated, with an 1-801-209-1388 call back number. 

    Nothing to worry about. There is no malware that can infect an iPhone. Nothing has been compromised unless you clicked on a link in the email and entered personal information.

  • How to single sign on with  webApplication with Basic Authenticated in IIS

    Dear Sir,
    Our server is EP6 SP14, we will link iview with BW URL which using basic authen in IIS. . Please kindly advise howto single sign on with  webApplication with Basic Authenticated in IIS
    Thank you and best regards,
    Vimol

    Are you sure the BW is using IIS? Most recent versions are using ABAP style authentication. What version are you running?
    You may want to investigate IISProxy - it's no longer supported, but it might help you out. It basically takes an SSO cookie and allows IIS to "know" who the user is.
    Cheers

  • Protecting jnlp and jar files

    Hi
    I would like to know how to protect the jnlp and jar files against anyone who just types the URL in the browser Address bar.
    Thanks
    Steven

    Haven't tried, but if your jnlp app must check for updates on every startup and your files (both jnlp file and jars) are in a password protected folder (using digest or plain authentication over a SSL connection, for example) then you may be in trouble. Will JWS recognize this situation on an update check and prompt for login/password? (related to web server's folders).
    Regards

  • Due to virus attack i had to format my windows laptop...now when i installed new itunes software i had to sync my ipod touch again but it says that if do the same then the data on my ipod touch will be erased....how should i protect my ipod touch data?

    due to the virus attack i had to format my windows laptop...now when i installed new itunes software i had to sync my ipod touch again but it says that if i do it then the data present on my ipod touch will be erased as it is syncd to some older library... how should i protect my ipod touch data?

    With all you media (apps, music) in the iTunes library connect the iPod to the computer and make a backup. Do that by right clicking on the iPod under Devices in iTunes and select Back Up. Then restore the iPod from that backup.
    Note the the iPod backup that iTunes makes does not included synced media like apps and music.

  • If I want to set -Xbootclasspath , how to do it in jnlp file

    if I want to set -Xbootclasspath to let jvm know my classpath, how to do it in jnlp file. or have other way to do it.

    If I want to orb, (now I am using openOrb) , I had to
    let jvm load Orb which I want to use. Did you put those Orb classes into jars and list them in the jnlp file of your Web Start app?
    Regards,
    Marc

  • How can I download two jnlp files by sequence?

    Hi,
    I want to download two jnlp files by sequence.
    When I click a link,first download a file,finish the operation.
    then download another.
    How can I do this?
    Thanks.

    Why do you want to do this ?
    I don't think that could work that way... But it is possible to reference others JNLP files inside a JNLP file.
    Example in my own jnlp file:
    <jar href="jte4.jar" main="true"/>
    <extension name="JTDS JDBC Driver" href="jtds.jnlp"/>

  • How to run dynamically created jnlp?

    Hi,
    I'm learning how to run a dynamic jnlp file create by a cgi program.
    I have a jnlp file, which can be executed by the in the
    HTML file. Then my experiment is to write a perl script to print
    exactly the same content as the jnlp file, and then the href is
    re-directed to the cgi. But Then I got an error complaining
    the first line:
    Bad header = <?xml version="1.0+" .... ?>Is there anything else I should add in the header?
    Thanks.

    To be more specific about my question, here is the perl script I used
    to generate the jnlp file. What should I add to it?
    Thanks.
    #!/usr/bin/perl
    use CGI;
    ## Read parameters
    $query = new CGI;
    $SecID    = $query->param("SECID");
    $PlayName = $query->param("PlayName");
    $PlayFile = $query->param("PlayFile");
    $PlayFrom = $query->param("PlayFrom");
    $PlayTo   = $query->param("PlayTo");
    $CodeBase = $query->param("CodeBase");
    # Generating jnlp
    print "Content-Type: application/x-java-jnlp-file \n";
    #print '<%page contentType="application/x-java-jnlp-file" %>'."\n";
    print '<?xml version="1.0" encoding="utf-8"?>'."\n";
    print "<jnlp spec=\"1.0+\"  codebase= \"$CodeBase\" />\n";
    print "  <information> \n";
    print "    <title> $PlayName </title> ";
    print "    <vender>  </vender> \n";
    print "    <description> </description>
    print "    <offline-allowed/>
    print "  </information> \n";
    print "  <security>\n";
    print "     <all-permissions> \n";
    print "  </security>\n";
    print "  <resource>\n";
    print '     <jar href="Java/Piano/MidiBox.jar" />'."\n";
    print '     <j2se version="1.2+"
    href="http://java.sun.com/products/autodl/j2se"/> '."\n";
    print "  </resource>\n";
    print '  <application-desc main-class="eng.midi.MidiBoxGUI">'."\n";
    print "     <argument>-px</argument> \n";
    print "     <argument>-Ud</argument> \n";
    print "     <argument>$PlayFile</argument> \n";
    if ($PlayFrom)
    print "     <argument>-from $PlayFrom </argument> \n";
    if ($playTo)
    print "     <argument>-to $PlayTo </argument> \n";
    print "  </application-desc> \n";
    print "</jnlp> \n";

  • How to protect an application running on IIS with OAM 11gR2

    Hello Gurus,
    I have a question regarding protecting an application running on IIS with OAM 11gR2. We have an OHS server running and all the requests from the users are coming to this OHS server webgate for them to login using the SSO login page. These is all solaris. I am protecting other applications like pplsoft moduels with this OHS instance and OAM server. There is another application that I need to protect which is itself running on IIS windows machine. I need guidance as to -
    1.) Do I need to install a windows version of webgate to protect this IIS based application?
    2.) Or I can still protect and proxy requests from this application to current OHS instance? How can I do this?
    3.) Or Do I need to proxy requests directly from IIS to OAM weblogic server?
    Please advise to the earliest as this is an urgent issue.
    Thanks !!

    From your description it is not clear how exactly architecture looks like
    We have an OHS server running and all the requests from the users are coming to this OHS server webgate for them to login using the SSO login page.
    is this OHS centralized login farm ? (Case 1)
    OR is this OHS server (with webgate) acting as virtual web server hosting multiple web sites so that request to any site passes through this OHS/webgate (Case 2)
    1.) Do I need to install a windows version of webgate to protect this IIS based application?
    If case 1 then you need to install 10g webgate on top of IIS server to protect this application
    If case 2 then you can just proxy request from OHS to IIS server. As every request passes through OHS user will be authenticated before request hits IIS
    Look at Product documentation for virtual web sites : http://docs.oracle.com/cd/E27559_01/admin.1112/e27239/shared.htm#autoId12
    It has steps to protect virtual web sites.
    Also you need to make sure no one hits IIIS web sites directly.
    Hope this helps

  • How can I protect my data in numbers from unintentional user of my iPad by other family members? In other words, how can I password protect my numbers and other apps from apple computer company?

    I have other members of my family use my iPad for educational/recreational use, young children who may want to play kid games. I don't want them to accdently get into my data stored in the three business apps from apple. I would like to password protect these files.
    I would also like to log out of the email systems that I use, so some one else can use this device to access their own emails. By leaving my accounts open al the time, is really asking for trouble from a host of sources.
    I can't believe that the iPad is not designed to protect the privacy and data from prying eyes ... Un intuitional as it may be.
    Please fix this issue so I create my info on this device and enjoy it fully. Or tell me how I can protect my data.
    Thnax.

    Thanx for your response. Any data stored anywhere should be able to be protected from stealing, malicious destruction or unintentional destruction. Theo ad an be stolen and without any kind ofpassword protection, the thief could get into your sensitive data.
    If Apple wants iPad to become a business tool that can be used with ideas, thots, data protected, then Apple needs to provide this protection to it's customers. Now it's unto the users to use it or not.
    I know iPad is being considered to be used by doctors, and can u imagine the confidentiality requirements of HIPPA rules... It will make this device not usable without data protection. I am sureweall have heard about hacking going on at all levels. It's surprising that this device's software is left unprotected.
    My iPad may be sitting on my desk and my 3 year old grand daughter would pick it up and start "playing" with it. That means I can't store anything on this machine that may possibly be changed.
    I have discussed this with specialists in apple stores, and those who have been around info technology understand my concerns and they may forward this request further up. They do not have the answer for it..... So far.
    I think data security should be everyone's concern... Be it a one person device or multiple user device.
    I hope that some responsible people at Apple would read this and provide the protection that will make this device lot more acceptable in the business world.

  • I have a document that in Word required a password to open. I copied and pasted it to Pages. Put the password protection on. Now if I click on that filename in Finder it automatically opens.Why. Anyone can read it. How do I protect it again?

    I have a document that in Word required a password to open. I copied and pasted it to Pages. Put the password protection on. Now if I click on that filename in Finder it automatically opens.Why. Anyone can read it. How do i protect it again?

    You saved it after setting the Password? :
    Inspector > Document > Document > Require Password to Open
    I just tested it and it shows up ijn The Finder with a padlock on the file icon and does require a password to open.
    Peter

  • I love Apple and I use all product. iPhone 3,3s,4,4s,5, iPad and Mac Air(now no more 3,3s and 4)... Only one thing I want to know is... What can I do if some one spy on my phone? How do I protect all my stuff that I put in my phone?

    I love Apple and I use all product. iPhone 3,3s,4,4s,5, iPad and Mac Air(now no more 3,3s and 4)... Only one thing I want to know is... What can I do if some one spy on my phone? How do I protect all my stuff that I put in my phone?

    the only way that anyone would be able to see anything at all on your phone is if they knew your apple id password, or they were looking over your shoulder
    if you are concerned that someone may know your apple id password, please change it at appleid.apple.com

  • How can i protect J2EE applications from piracy?

    I m looking for solution to protect Web application from piracy.
    I want my application run on web server for which it is built, &
    it musn't run on any other web server.
    how can i protect my web application from piracy?.
    Our .Net applications we protect using Hardware ID binding ,
    How can i protect J2EE applications?

    How is it going to get anywhere else? What's the threat model here? and what's the real, not imaginary, cost to you of the threat succeeding? and can you price your product such that it's cheaper to buy it than to pirate it?
    The answers to this question probably aren't in the field of tricky code or cryptography. They're more likely in marketing, time-to-market, pricing, and in physical security of the server, ...

Maybe you are looking for

  • Restore failed and now my 64gb ipod touch wont turn on at all i tried so much stuff! help!

    Please help my Ipod touch 64gb 3rd gen failed to restore and now its stuck off! I can't turn it on at all i tried so much stuff and it won't just turn on. I keep trying but it stays off, no apple sign or ipod to itunes screen. Please help i need this

  • Export/import to clone database -- please advise

    Hi All, Need help especially from exports that are strong in export/import. can someone advise me how to use export/import to clone a database? I know how to clone database using cold backup and hot backup. But wish to know the full steps in using ex

  • Cannot make image copy. Please Help

    Hi, I am trying to make a image copy for the patch 110930-03 because i am getting the error Warning:ACPI tables not in reclaim memory prom_panic:kmem_free block already free Entering boot debugger [12ff05] Below is the command i am giving. C:\>dd S28

  • Launch a query from a function

    Is it possible to launch a function that execute a query on a table and retun a single date value? I mean without using data-model. I'm developing in Jsp with Jdev 10G

  • Good book for JSP

    Hi all Can u pls just me a good book for JSP especially for beginners other than "Core Servlets and JSP" by HALL .The customers review for this book in amazon.com is very poor .Pls help me. Thanx in advance.Bye