I have a requirement where I need to to do cross domain SSO using openAM. The SP server has a different cookie than the IDP. I need to access the IDP cookie to retrieve the IDP datastore user details. The SP uses a anonymous user.
IdP and SP are terms of standardsbased SSO using federation protocols like those defined in SAML standard. SAML does not rely on cookies as SSO tracking mechanism. (except from IdP discovery).
OpenAM's proprietary SSO mechanism relies on cookies.
If you mean by 'SP' a web-app protected by an OpenAM agent (url or policy agent) then you have to configure the agent to run in so called CDSSO mode.
Unfortunatley it's not really clear what you want to achieve.
You may look at the tech-overview from OpenSSO (http://docs.oracle.com/cd/E19681-01/820-3740/index.html) first as OpenAM does not have such a doc yet.