Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The answer to the headline Question is that the <code>URL.openXxx</code> methods do not understand cookies. </p> <p>(If your server is configured to accept session tokens in the request URL itself, the <code>URL.openXxx</code> methods won't get in the way. However, that approach is insecure.)</p> <p>Then we come to the body of your Question.</p> <blockquote> <p>... is there another way besides using sessions or cookies that i could distinguish requests from this java app and block it?</p> </blockquote> <p>At this point, I assume that you are talking about blocking requests on the server side. And I should point out that what the "bad guy" client uses to send the request is now <em>immaterial</em>. (It could use <code>URL</code> or Apache HTTPComponents or it could implement the HTTP protocol stack in assembly code!)</p> <p>So the real question is what options you have for blocking unwanted requests. And the answer is:</p> <ul> <li>You could block based on the request URL itself, though this is probably counter-productive.</li> <li>You could block based on the presence of session (or other) cookies in the request headers. This is the normal way of doing access control, and assuming that you issue and handle the cookies securely, this is hard to defeat.</li> <li>You could require that session tokens are passed in the request URL, but this has fundamental security issues. </li> <li>You could rely on other "informative" headers ... such as the user-agent header, but this is trivial to defeat.</li> <li>You could block based on the request source IP address, but all the bad guy needs to do is to send the requests from a different IP address.</li> <li>You could limit access by using HTTP over SSL/TLS with client-side certificates, but this means that you have to manage certificates for all legitimate client hosts, which is problematic in most environments.</li> </ul> <p>In summary, cookies are the best solution, so the "good guy" client application needs to use libraries that are capable of doing cookie management and setting cookies in requests.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload