Monday, October 27, 2014

Oracle Directory Server Enterprise Edition 11g supports Windows Server 2012

A customer called to ask if their existing Oracle Directory Server Enterprise Edition 11g can run on Windows Server 2012 R2.


A check with Oracle Directory Server Enterprise Edition 11g Certification Matrix System Certification confirms it is a 'YES'.




But do note: All components (except Directory Proxy Server) would run in 32 bits only.

.

Monday, October 20, 2014

Message:Service does not exist : sunAMAuthApplicationService


This is a super misleading error message in OpenAM Authentication debug log. If you turn on debug level to Message and restart OpenAM, it will appear almost 100% of the time.




And last Saturday, I was at a customer's site which had a farm of OpenSSO 8U1R2 running. I was trying to debug on a node and switch to Message level, and I was seeing the same misleading error!

Wow! This has been there for years! This post is to remind myself to ignore it the next time I see it again.

amAuthConfig:10/18/2014 03:48:25:480 PM SGT: Thread[pool-1-thread-11,5,main]
Error retrieving service schema
Message:Service does not exist : sunAMAuthApplicationService
        at com.sun.identity.sm.ServiceSchemaManagerImpl.isValid(ServiceSchemaManagerImpl.java:135)
        at com.sun.identity.sm.ServiceSchemaManagerImpl.(ServiceSchemaManagerImpl.java:115)
        at com.sun.identity.sm.ServiceSchemaManagerImpl.getInstance(ServiceSchemaManagerImpl.java:589)
        at com.sun.identity.sm.ServiceSchemaManager.(ServiceSchemaManager.java:112)
        at com.sun.identity.sm.ServiceSchemaManager.(ServiceSchemaManager.java:77)
        at com.sun.identity.authentication.config.AMAuthLevelManager.updateGlobalAuthLevelMap(AMAuthLevelManager.java:697)
        at com.sun.identity.authentication.config.AMAuthLevelManager.initialize(AMAuthLevelManager.java:199)
        at com.sun.identity.authentication.config.AMAuthLevelManager.(AMAuthLevelManager.java:97)
        at com.sun.identity.authentication.config.AMAuthLevelManager.getInstance(AMAuthLevelManager.java:109)
        at com.sun.identity.authentication.config.AMConfiguration.addServiceListener(AMConfiguration.java:770)
        at com.sun.identity.authentication.config.AMConfiguration.getModuleBasedConfig(AMConfiguration.java:624)
        at com.sun.identity.authentication.config.AMConfiguration.newConfiguration(AMConfiguration.java:213)
        at com.sun.identity.authentication.config.AMConfiguration.getAppConfigurationEntry(AMConfiguration.java:691)
        at com.sun.identity.authentication.service.AuthUtils.isPureJAASModulePresent(AuthUtils.java:1528)
        at com.sun.identity.authentication.service.AMLoginContext.executeLogin(AMLoginContext.java:315)
        at com.sun.identity.authentication.server.AuthContextLocal.login(AuthContextLocal.java:435)
        at com.sun.identity.authentication.server.AuthContextLocal.login(AuthContextLocal.java:371)
        at com.sun.identity.authentication.AuthContext.runLogin(AuthContext.java:675)
        at com.sun.identity.authentication.AuthContext.login(AuthContext.java:572)
        at com.sun.identity.authentication.AuthContext.login(AuthContext.java:524)
        at com.sun.identity.authentication.AuthContext.login(AuthContext.java:383)
        at com.sun.identity.security.SystemAppTokenProvider.getAppSSOToken(SystemAppTokenProvider.java:78)
        at com.sun.identity.security.AdminTokenAction.getSSOToken(AdminTokenAction.java:295)
        at com.sun.identity.security.AdminTokenAction.authenticationInitialized(AdminTokenAction.java:143)
        at com.sun.identity.authentication.UI.LoginLogoutMapping.initializeAuth(LoginLogoutMapping.java:103)
        at com.sun.identity.authentication.UI.LoginLogoutMapping.init(LoginLogoutMapping.java:65)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1100)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1023)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4969)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5376)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:345)
        at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:58)
        at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:304)
        at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:341)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

.

Monday, October 6, 2014

OpenAM acting as OAuth2 Provider and OAuth2 Client - Part II

So I finished September with my 1st ever 101km run - Craze Ultra 101.



Just to put a closure to my previous blog on OpenAM acting as OAuth2 Provider and OAuth2 Client, I have the following slide which was presented to a client a week ago.




The real beauty of having OpenAM acts as an OAuth2 Provider and OAuth2 Client is the flexibility and ease in rolling out new Social Logins.

With this implementation, there is no need for any modification on the mobile and web applications as and when a new Social Login is added.

Monday, September 22, 2014

OpenAM acting as OAuth2 Provider and OAuth2 Client

Recently, we have a customer who wants to extend their OpenAM infrastructure to mobile applications. That should not be a problem at all since OpenAM supports OAuth2 Provider since version 10.1.0-Express.

In addition, customer wants to allow mobile users to authenticate using Facebook and/or on-premise LDAP. Well, OpenAM does support OAuth2 authentication module which acts as an OAuth2 Client to Facebook (which acts as an OAuth2 authorization server). 




So, we spent some time exploring the possibility of having OpenAM acts as an OAuth2 Provider and OAuth2 Client.


1. Basically, all mobile applications are to authenticate via OpenAM OAuth2 Provider, instead of directly with Facebook.

2. OpenAM Login Page allows Facebook OAuth2 authentication or LDAP authentication (as per requirement). Of course, the Login Page might need to customize to render nicely on mobile phones.

3. User clicks Facebook OAuth2 authentication on OpenAM Login Page (notice this trigger a link from OpenAM server to Facebook; not mobile applications with Facebook directly). What actually happens is a redirection from OpenAM Login Page to Facebook application on the same mobile device. 

4. Upon successful authentication (which should be seamless on mobile phones since users seldom log out from Facebook app), Facebook OAuth2 token is returned to OpenAM server. This establish a valid session in OpenAM. 

5. OpenAM now returns its own OAuth2 token back to the mobile application. (instead of a OAuth2 token from Facebook)


One might ask what's the rationale for doing so? Isn't it more straight-forward for the mobile applications to authenticate directly with Facebook? 

Well, the real business case is the customer wants to add more Social Logins in the near future. e.g. Google, Yahoo, etc... With this implementation, there is no need for any modification on the mobile applications as and when a new Social Login is added.

Nice, isn't it?

.

Friday, September 19, 2014

OpenAM Security Advisory #201403

ForgeRock announced another security advisory last night. The detail can be found here.



Again, if you are a paid customer, then it is very hassle free to apply the patch.



Just download the patches in .jar and drop them into your web container. Restart web container. Done!

Nice!


Updated on 23rd Sep 2014

So, I have been informed that the patches should not be as easy as drop and restart. We should be following the README closely and carry out the steps as instructed.

The million-dollar question is: Where is the README file?

I spent some time and finally found it! It is within the patch (jar).


Oh man! This is very confusing. From my past experience, a .jar is simply a file for one to dump into the /WEB-INF/lib directory on the application server.

Instead, the patch (jar) here is nothing but a zip file. The real codes are .class files that are to be deployed in /WEB-INF/classes.

I prefer zip anytime.


.



Wednesday, September 17, 2014

Integrate OpenAM with Atlassian Jira - java.lang.AbstractMethodError

One of my teammates tried integrating our in-house Atlassian Jira 4.3.2 with OpenAM 11.0.1. The JIRA we have is quite an old version as I have no time to upgrade it. Anyway, it's working fine for us all these years. :) Ok, I'm lazy.

 

It is quite easy to integrate Jira with OpenAM with help from this wiki - Integrate with Atlassian Jira and Confluence.

However, we kept getting the following AbstractMethodError during runtime.


Cause: java.lang.AbstractMethodError: com.sun.identity.provider.seraph.OpenSsoAuthenticator.getUser(Ljava/lang/String;)Ljava/security/Principal;


Upon another round of checking, we realized there is something different between what is stated in the wiki and what we have in our seraph-config.xml. 



The wiki assumes the older versions of Jira is using DefaultAuthenticator. However, in our XML properties file, we are seeing JiraSeraphAuthenticator (which extends from DefaultAuthenticator).




What to do next? Change code!





Replace DefaultAuthenticator with JiraSeraphAuthenticator in OpenSsoAuthenticator did the trick!




.

Tuesday, September 16, 2014

OpenAM 11.0.1 - HOTP Callback Header Error

I found this error while customizing the HOTP authentication module on our OpenAM 11.0.1 in test labs. No matter which way I tried - HOTP.xml in default folder or HOTP.xml in default_en folder, the wordings "Please enter your One Time Password, or request a new one" will never get replaced with the value I set in HOTP.xml.

I am, however, able to change the value in Confirmation Callback though.




This never happened in version 10.x.x though.

.


Thursday, September 11, 2014

OpenAM OAuth2 Provider - Request not valid, perhaps a permission problem

I have a customer that requires OAuth2 Provider to be configured on their existing OpenAM SSO infrastructure.

So, as usual, I do not like to over-promise by just answering customers' questions based on technical write-ups. I went ahead to set up 2 OpenAM servers - 1 acting as OAuth2 Provider; 1 acting as OAuth2 Client.

Of course, any OAuth2 Client will do. It does not have to be OpenAM server acting as a OAuth2 Client. Ok, I'm just lazy. :)




There is a documentation from ForgeRock on Configuring OpenAM as Authorization Server & Client. Be warned: Do read carefully; Do not skip any step.

So, basically, the 1st step is to Set Up the OAuth 2.0 Authorization Service as illustrated in Configuring the OAuth 2.0 Authorization Service.


Simple task. In fact, very simple task!



BUT ... this is where I encountered issue. After I clicked OK and finished the remaining configuration, I hit the error "Request not valid, perhaps a permission problem" when I started testing.

Enabled debug logs but not too many hints.

After many rounds of debugging, I read the documentation again.

In addition to setting up an OAuth 2.0 authorization server for the realm, OpenAM sets up a policy to protect the authorization endpoint. The policy appears in the list of policies for the realm. Its name is OAuth2ProviderPolicy. 

To make the change, browse to Access Control > Realm Name > Services > OAuth2 Provider, add the profile attributes to the list titled User Profile Attribute(s) the Resource Owner is Authenticated On.


I checked with OpenAM Admin console. I did not see a service by the name of "OAuth2 Provider". Neither did I see a policy by the name of "OAuth2ProviderPolicy".


Very strange indeed. No choice, I clicked on "Configure OAuth2" again to make the default realm to act as an authorization server.




This time round, bingo! OpenAM OAuth2 Provider works like a charm.

The OAuth2 Provider service appeared!


The OAuth2ProviderPolicy policy also appeared!



When I tested again, the following authorization page also appeared:



Maybe my VM was slow the first time I tried to configure OAuth2 authorization service. I'm not too sure! But I'll definitely add the above into my verification steps the next time I configure OAuth2 authorization service again!


.

Monday, September 1, 2014

OpenAM Web Policy Agent 3.3.3 released!

August was super busy month as we were closing our financial year. Nevertheless, I still managed to complete Singapore Bay Run (used to be called Army Half-Marathon) yesterday. SGD$12 for a half-marathon race! The special rate is applied to those who have served National Service. 




Anyway, I just received an email from ForgeRock.

Web Policy Agents version 3.3.3 
This email is being sent to you as our records show that you downloaded the latest maintenance release of the ForgeRock OpenAM Policy Agent 3.3.2. 
An issue around policy enforcement was reported to ForgeRock and we took the decision to rescind the 3.3.2 release of the Policy Agents to be replaced with version 3.3.3. 
If you have upgraded to version 3.3.2 we recommend moving to 3.3.3. If you have yet to install 3.3.2 then please use version 3.3.3 instead.

Remember I posted the release of Web Policy Agents version 3.3.2 just slightly more than a week ago? Internally, we tested WPA 3.3.2 on IIS 7 and Apache 2.4. The policies for SharePoint protected by policy agent on IIS 7 needed some tweaking before it worked. We rolled back the policy agent on Apache 2.4 to 3.3.1. So, there is indeed an issue around policy enforcement.






Web Policy Agents version 3.3.3 will definitely come in handy. We're going to give it a try tomorrow morning.

.


Wednesday, August 27, 2014

OpenAM RESTful APIs and Cross-Domain Single Sign-On

While reading the OpenAM Mailing list this morning, a community member has the following requirement:

  1. A few PHP applications to be SSO-ed
  2. Cannot redirect to OpenAM Login Page for authentication, which implies
  • Cannot use Policy Agent
  • Can only use OpenAM RESTful APIs



I thought that simple requirement. But he followed by asking: "Is there any way to do CDSSO with REST API without use of Policy Agent ?"

Huh?

I blogged something like this before - OpenAM RESTful Services.



I think he mis-understood the concept slightly - CDSSO (cookie-based) vs RESTful APIs.


… if one is to use RESTful Web Services, please do not work with cookie. Make it a pure RESTful experience!


.

Monday, August 25, 2014

OpenAM - Issue with Unvalidated Redirects defined in OWASP A10

We received a ticket from one of our customers reporting an issue. They thought they found a vulnerability with OpenAM.


I found one vulnerability of SSO. It is about Unvalidated Redirects which is defined in OWASP A10. 
For example, when I tried to input the url in IE, I could successfully be redirected to my project URL. https://am.abc.sg/sso/UI/Login?goto=https://192.168.1.2:430/abc/Index

It should validate the returned url and reject my request.



My reply below:

The observation is a valid one. It is the default product behavior.  
You can, however, enhance security by setting allowed Goto URL domains by going to:
/ (Top Level Realm) -> Authentication -> All Core Settings ... -> Security -> Valid goto URL domains 
 
By default OpenAM will redirect the user to the URL specified in the goto parameter supplied to the authentication interface. To enhance security a list of valid DNS domains can be specified. OpenAM will only redirect a user if the domain of the goto URL is present in this list.

At least there is a way to tighten security if customer chooses to.


.


Friday, August 22, 2014

OpenAM Security Advisory - NSS and NSPR security

ForgeRock has just released a security advisory for OpenAM Web Policy Agent. This affects versions 3.3.1, 3.3.0 and 3.0.x. It's actually an issue with the NSS and NSPR libraries that the Web Policy Agent uses during runtime.

More detail here.







As usual, paid customers have the convenience of downloading the latest Web Policy Agent 3.3.2 from ForgeRock BackStage.

How about Non-paying customers?
If community members are using older versions of the Web Policy agents we strongly recommend updating to the new release at the earliest opportunity.

Watch out for new Web Policy Agent 3.4.0 or 4.0.0 if that's how I interpret correctly.


But I think for this issue, update the NSS/NSPR libraries will do. Isn't it? :)


.

 

Monday, August 11, 2014

OpenIG 3.0 Released

OpenIG has been quiet for a long while. The latest 3.0 version has just been released!


As organizations roll out new applications and APIs they need extremely agile ways of identity-enabling these services so they can expose them to the customer. Whether it be to offer more value to end-users or to monetize a new service, the ability to tie identity to these offerings is critical. With OpenIG, organizations can quickly identity-enable applications and APIs for roll-out and monetization.  
Key release highlights include: 
  • Extends your authentication, authorization, and risk policies to mobile, cloud, and enterprise applications – without the need to change backend applications. 
  • Integrates smoothly with existing, standards-based Identity Providers (e.g. OpenAM, SAML 2.0 IdP, Google OpenID Connect). 
  • Protects machine-to-machine communications and API access, leading to immediate revenue opportunities.

See http://forgerock.com/products/open-identity-stack/openig/.


I thought no one is using OpenIG. The fact that ForgeRock invested time and resources into building Release 3.0 (Release Notes) proves that I'm wrong. :)

.

Friday, July 25, 2014

PingID - cloud-based mobile strong authentication

We had Ping Identity come by our office yesterday to demonstrate to us their technologies & latest PingID launch and to explore working opportunity moving forward.



So it's hot! Ping Identity just launched PingID this week. PingID is a cloud-based mobile strong authentication and multi-factor solution for PingOne and PingFederate that enables users to authenticate to applications via their phones.

PingID will kick in during Step-Up Authentication. So instead of keying in a OTP passcode, you fire up PingID mobile application on your smartphone and swipe the red iD button (see picture above).

Once swiped, you'll be automatically granted access to your protected application. As simple as that.



Pretty cool! 

Now, currently PingID only supports integration with PingOne and PingFederate. I think PingID can easily be sold separately as a standalone product to integrate with other Single Sign-On products. That would capture bigger market share! :)


.

Thursday, June 26, 2014

OpenAM 12.0.0 enhanced features - SFO, Persistence Cookie, Policy Support

As I spend most of my time interacting with customers, I understand their daily technical challenges (especially security concerns). I am glad there are 3 enhanced features to OpenAM 12.0.0.

OpenAM 12.0.0 should be released end of this year.


 


Session failover across Sites. OpenAM now allows session failover across OpenAM Sites. In order to take advantage of this capability, you must make sure that the underlying Core Token Service replicates session data across your OpenAM Sites.

==> Current restriction to multiple sites is sessions are never shared. This enhancement is good as there are indeed some valid use cases to share sessions across sites. At least, I have encountered few such scenarios in customers' environment.


Persistent Cookie from Client IP Issued. The Persistent Cookie module has been enhanced to enforce that the persistent cookie can only be used from the same client IP to which the cookie was issued.

==> Big relief. I'm always been asked: "What if someone steal the saved cookie from one PC and replay on another?"


Policy Support for Common HTTP Operations. OpenAM policies now let you allow and deny not only HTTP GET and HTTP POST, but also HTTP DELETE, HEAD, OPTIONS, PATCH, and PUT (OPENAM-336).

==> Yes, besides GET and POST, the rest of the HTTP operations are getting popular these days. 

.

Friday, June 20, 2014

Proper way of configuring health monitor on LB against Directory Servers

We have an issue with Sun Directory Proxy Server (DPS) recently. The IDLE connections kept building up and we needed to bounce the DPS once in a while. This is to prevent the server from running out of file descriptors.

It took us quite a while to identify what has gone wrong. The F5 load-balancer was wrongly configured by customer's system administrators.

For any enterprise load-balancer, there should be a monitor for LDAP servers. One should not use the standard TCP health check to validate the health of LDAP servers.



We found 2 good articles:

  1. Best Practices for LDAP Monitoring 
  2. F5 Load Balancers and Sun Directory Servers


Great stuff!

.

Thursday, June 12, 2014

Goodbye SpamHero!

A year ago, we said goodbye to Postini. Today, we are saying goodbye to SpamHero!




What should I say? The hard truth is that transiting from Postini to any other spam-filtering solution is never going to be easy. Postini has a high standard to begin with. Their spam filtering capability is next to none.

So what went wrong with SpamHero. Their spam filtering is not just up to my expectation. That's what I have to say.

So few weeks ago, we shopped around … again. This time round, we finalized on MailCleaner.



MailCleaner is a business anti spam gateway installed between your mail infrastructure and the Internet. It offers professional protection against viruses and eliminates up to 99% of spam.

MailCleaner offers 3 solutions - Cloud Anti-Spam, Cloud Appliance, Virtual Application.



For a start, we tried the Cloud Anti-Spam as this is the simplest integration. Good result. Happy customer, we are.

What's even better? MailCleaner has a Community/Open-Source Edition where the MailCleaner Virtual Appliance can be download. One can then install MailCleaner on-premise.

Very simple to install. Configuration can be a little difficult, but there's a great community to tap on. Most of my doubts can be found in the forum.


So fingers cross. I hope we'll stay with MailCleaner forever.


.

Saturday, June 7, 2014

ROI from Enterprise Software - People is key

I attended the 2nd Perform Day from Compuware this week. (It used to be called Compuware APM User Conference for the 1st edition) 


Application Performance Management (APM) is definitely going to get bigger and bigger, especially in this region.

Anyway, I took away a key message from the conference. Nothing technical, but very useful to apply for my work - IAMS (Identity Access and Management Service) and APM.

The software from both domains (IAMS & APM) are developed for the Enterprise and the cost attached is not cheap. Decisions to purchase usually come from the CIO level. These people usually measure the success of the projects by ROI (Return On Investment). They must see value from the software they purchased. Otherwise, it's a failure … to them.

So during the Panel Discussion, one participant asked:
"We have been using Compuware product since 2009. Can you help us to show value of the product to our Management?"

I nearly fell off from my chair! Mind you, she said since 2009. Today is year 2014. It has been 5 long years and she has not found value from the expensive software.

Ok, this is Asia, by the way. :)

Back to her question, one of the panelists responded with something along this line:


  1. Work with Compuware consultants. They will help you to understand the software and more importantly, use the software more effectively.
  2. Commit a dedicated resource to learn the software.


The MD of Compuware (Eng Kiong, a friend of mine) emphasized what he has been preaching to customers frequently - "In order to get value from dynaTrace/DCRum, you need to assign a dedicated person to learn and operate the software on a daily basis. You cannot have someone who is on a part-time basis."




From his observation, there are 3 ingredient for success:
1. Software
2. Process
3. People

A company can always deploy the best software in the market and define the best process. However, if there is not a single well-trained person in the company who can competently manage the software, there is no chance to get any value out from the software.

Another panelist added: The software will just be another "white elephant".


What they said really hit hard on me because I have deployed many IAMS and APM solutions in the region and I can say they have not yield the kind of value I wanted customers to get.

Why?

Customers are not committed to assign dedicated resources to learn and be competent with the software.
Every engineer I worked with is usually multi-tasked. Now, a software cannot be auto-pilot in Production. Human input is required.

Sad, but commonly seen in Asia.


.


Friday, June 6, 2014

OpenAM Policy Agent HTTP HEADER UTF-8 issue

May passed by quickly… Managed to run a night marathon on 31st May 2014. Yes, Sundown Marathon as it only starts at 11:30 pm in the night. 


It's a nightmare for me. The weather is super humid in Singapore recently and there were a lot of participants. I did not have a good run after all. Will try again next year.


Meanwhile, back at work, I was helping a customer with an internationalization issue with their OpenAM Policy Agent.




In the JSP page that displays the Chinese characters from CHINESENAME HTTP Header, the output was always in garbage format. e.g. CHINESENAME: 中国|领英.


There are a lot of articles in the Internet that talks about setting encoding for application containers. We were only interested for JBoss. One example is UTF-8 Encoding for JBoss 5.1 AS.




As one of my colleagues pointed out, those settings are for decoding content and I/O streams like uploaded files within JSP pages. These have no effect on HTTP Header.

This thread from Stackflow (Do HTTP request headers have to be UTF-8 encoded?) has the best explanation.



There is a section in HTTP RFC on Message Headers. Hmm… as usual, RFC is not meant for layman reading. I have a friend who loves reading RFC. Ha!



I then found an article on RFC 5987. This is the best answer I get.

By default, message header field parameters in Hypertext Transfer Protocol (HTTP) messages cannot carry characters outside the ISO-8859-1 character set.

So the proper way to decode HTTP Headers that are passed from OpenAM Policy Agent is as follows:

// get bytes in iso-8859-1. 
byte[] data = request.getHeader("CHINESENAME").getBytes("iso-8859-1"); 
// now decode in UTF-8 to get the Chinese characters 
String cnName = new String(data, "UTF-8"); 


Any one has better solution? I would love to know and learn!


.