So maybe my pain will help someone else. I recently encountered an issue when combining OAM, Unsolicited Login and SSL. I had configured everything properly in a test environment so that Unsolicited Login worked properly over HTTP. Testing verified everything worked properly. As soon as we switched to using our HTTPS-only endpoints everything broke.
This scenario should only occur if you are in an HTTPS-only environment for a reason to be described below.
It turned out that somehow, despite specifying our successurl as:
<input name="successurl" type="hidden" value="https://myserver.example.com/application">
OAM translated that value as http://myserver.example.com/application.
As such we saw the following in the logs:
[2015-01-01T00:00:01.000-04:00] [oam_server1] [NOTIFICATION] [OAM-02074] [oracle.oam.controller] [tid: [ACTIVE].ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: ] [ecid: ] [APP: oam_server#188.8.131.52.0] Error while checking if the resource Type: HTTP Operation: POST Name: OAMAuthnResource URL: /application Host: myserver.example.com Port: 80 is protected or not.
Obviously, this behavior is not desired. We found a workaround and then finally a fix. The workaround is simply configuring our successurl as the following:
<input name="successurl" type="hidden" value="https://myserver.example.com:443/application">
On the first redirect, the 443 drops from the URL and our application functions as expected. The workaround actually introduces a slight delays since it has to do that redirect. The fix does not have that (very) slight delay.
Now the fix is to simply add myserver.example.com:80 to the host identifier in your application domain.
Some references suggest adding it to IAM Suite’s Host Identifier, but we found it worked with our actual Application Domain Host Identifier which kept things all in one place.
Root Cause and Explanation:
The reason for this behavior has to do with how OAM parses the successurl.
OAM just verifies that http or https exists in the successurl. (If you do not prefix with http or https you will receive protocol errors. Something along the lines of invalid protocol:myserver.example.com)
For some reason, OAM doesn’t understand that https means port 443. It just assumes that both http and https refer to port 80.
OAM then goes on to parse the rest of the url as normal. Once everything is parsed, it checks the host identifier list to make sure that there is an applicable Authentication Policy to evaluate.
Since our application was in an HTTPS-only environment, we had not defined a Host Identifier for port 80 only 443. Adding our server url with port 80 into the host identifier list cleared things up and we were able to verify our environment.
Just to note, this does not mean that port 80 is open or even accessible (it is not) but now OAM can successfully match the url against the policy and then the browser will handle the actual redirect url using the full https://myserver.example.com/application as the URL.
Maybe this post will alleviate headaches for someone else along the way.