title: Authentication and Session Management in distributed spring application
body: <p>I'm working on migrating a single module spring web application into a JMS based modular architecture. This <a href="https://stackoverflow.com/questions/28604899/distributed-transaction-between-multiple-apps-in-spring">link</a> has the structure of the application right now and my goal.</p>
  
  <p>I'll be employing a CAS based SSO server which does the authentication. The technologies stack would be spring-boot, Apache Camel, ActiveMQ and spring-security/apache-shiro.</p>
  
  <p>For e.g. I'll have an Inventory Application, Financial Application and CAS Application(SSO Server). In some place, I have to manage a centralized session store which will hold current userid and their preferences. </p>
  
  <p>Use case:</p>
  
  <ol>
  <li>User logs into CAS SSO and goes to inventory module. Inventory module will get the current userid and it's preferences (from a central session store ?) and a sale transaction will be initiated. </li>
  <li>After inventory done it's job, it sends a JMS message via Apache Camel to the financial for posting accounting entries.</li>
  <li>Financial application get the current user id and preferences from
  session and completes account posting.</li>
  </ol>
  
  <p>How do I create a common session store (pretty much attached to the SSO server) for above scenario (Spring-Session will help?) and what is the approach to enable each application know who is actual user doing this transaction.</p>