sun access manager, session not cleaned issue. Identity theft and impersonisation.

A high-security risk, leading to identity theft and impersonation. This security issue is mostly caused by lack of knowledge of security aspects on part of application developers/ architects.

PROBLEM

One person signs into a sun access manager policy-enabled application from a web browser.
After completing his task, he signs out and goes home relieved of his/ her work. But this machine is in public access, say some kiosk or cyber cafe.
Another user comes in and signs into the same application which the previous user used.

Viola....he logs into an application as the first person instead.

CAUSE

Sun access manager is responsible for deleting cookies of the application, which stores session and may store some other credentials too. Now one can only delete the cookies that belong to it. So in case, Sun access manager agent resides in www.xyz.com domain (see the site URL in the address bar for respective sites), it cannot delete cookies from another application from www.abc.com


Sun access manager sits on top of other applications and just behaves like a filter, it intercepts all incoming requests to the underlying application and if not authenticated for particular URI it redirects the requests to sign in a page or whatsoever configured. Authentication/ authorization and logout function should be left to Sun Access Manager.


The security risk arises when SAM (Sun Access Manager) is used either without proper preparation or lack of knowledge.

Now let us take the following use case:

  • Suppose the underlying application's URL is  www.abc.com and access manager's URL is www.xyz.com. That means both applications are in a separate domain.
  • www.abc.com writes cookies with some session related information.
  • SAM writes it's own cookies with domain www.xyz.com
  • User logs out of www.xyz.com in a good sense.
  • Application developers assume (and rightly so), that all session data will be cleared by their friend SAM.
  • SAM also do its duty and clear all the cookies that it created. It can delete cookies from its domain, but as its hands are tied it cannot delete cookies of www.abc.com.
  • Cookie from www.abc.com had some session information and that session is still alive on the application.
  • A new user logs in with his/ her credentials, but something strange happens. The new user logs into the system as an old user who just logged out a few moments before.


RESOLUTION

Go and get your system admin and ask to change the domain of either access manager or application.

Other programmatic solutions too are possible but don't use them. The best practice is to use boilerplate code from SAM and beware of wrong practices that can expose your users to security risks and hidden impersonation.

Comments

Popular posts from this blog

Caused by: java.sql.SQLTimeoutException: ORA-01013: user requested cancel of current operation

HashiCorp Vault Integration with Ansible Etower using approle

utility to extract date from text with java