Skip to main content

Posts

Showing posts from January, 2012

Nexus behind a proxy 403 repo1.maven.org problem

I was having a bit of a problem with my nexus installation downloading from mavens repo1. Some jars would just not download so I tried a wget and got a 403 error. Did some searching and found that repo1 does not allow wget so I added a user agent to the wget (-U) and it worked. So I tried adding it to Nexus and viola. NOTE: I am behind a corporate proxy.

ADF: weblogic cluster endless loop 401 Unauthorised _afrLoop infinite loop AGAIN

Finally fixed the third incarnation of this problem - when we deployed onto our dev cluster and our application deployed fine but when the login page was accessed the app went into an infinite loop. NOTE: Deploying onto the Admin server worked perfectly. In the access logs you see 302 http codes with _afrLoop parameters (302 - redirect). Really could not figure this one out. I added failover and clustering removed them. Reconfigured the security. Created a test app with one page used weblogics default security provider but still NOTHING. I even setup a cluster on my machine and everything worked (Note: I did not setup our dev cluster) So in desperation I check the system-jazn-data.xml file deployed on weblogic an lo and behold none of my application security configurations where setup in the file. I stopped everything and added what I had on my local cluster to the system-jazn-data.xml and everything just works. I need to find out what in our dev configuration is causing the syst

Javascript: Redirect to external system and automatically authenticate SSL

Note: using basic authentication on external system. This leaves you open to XSS attacks SO TAKE NOTE, it is not for production code without modification. This little bit of javascript although insecure (but you can work with this) can give you single sign on like behaviour (if the site you are calling is using Basic Auth) using the XMLHttpRequest object. For the ADF stuff deployed on weblogic using the same realm this is not really a problem. function createRequest() {   if (typeof XMLHttpRequest != 'undefined') {     return new XMLHttpRequest();   }   try {     return new ActiveXObject("Msxml2.XMLHTTP");   }   catch (e) {     try {       return new ActiveXObject("Microsoft.XMLHTTP");     }     catch (e) {     }   }   return false; } function performRedirect() {   xmlhttp = createRequest();   xmlhttp.open("GET", "https://server/url_to_call", false, "username", "password");   xmlhttp.onreadys

Running ADF in weblogic cluster

I am trying to run my ADF app in a cluster and my login page redirects back on itself endlessly. Note this has been resolved - we restarted the entire weblogic server and the problem dissapeared. (I think something went wrong in the deployment) the one other change I made was to change the inner xml of session-descriptor in weblogic.xml FROM: <sharing-enabled>true</sharing-enabled> TO: <persistent-store-type>REPLICATED_IF_CLUSTERED</persistent-store-type> this should not make a difference but I though I would mention it. Here are my notes to self as I moved through the process. Application   adf-config.xml   <adf-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config">     <adf-scope-ha-support>true</adf-scope-ha-support>   </adf-controller-config>     Web.xml   <context-param>     <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>     <param-va