6

I am working on passing claims to the cd webservice with the encoded JSON cookie, but after much experimentation am still getting an error. The error leads me to believe my configuration is wrong somewhere along the line.

The CD core log extract below shows that a cookie with name 'TAFContext' was sent with the request.

2014-11-12 14:41:40,788 DEBUG AmbientDataServletFilter - doFilter: contextPath=/sdlcds, sessionId=cNMtX8_BnWfNKZAUJrz2AnM
2014-11-12 14:41:40,788 DEBUG AmbientDataServletFilter - Creating new ClaimStore for session: cNMtX8_BnWfNKZAUJrz2AnM
2014-11-12 14:41:40,788 DEBUG ClaimStore - put: uri=taf:response:cookie:generation, value=true
2014-11-12 14:41:40,789 DEBUG WebContext - setCurrentClaimStore: com.tridion.ambientdata.claimstore.WebClaimStore@61cf4d8a, thread: WebContainer : 0
2014-11-12 14:41:40,789 DEBUG ClaimStore - put: uri=taf:request:uri, value=/sdlcds/KCO/odata.svc/Components(ItemId=30032,PublicationId=24)/ComponentPresentations
2014-11-12 14:41:40,789 DEBUG ClaimStore - put: uri=taf:request:full_url, value=http://localhost:9080/sdlcds/KCO/odata.svc/Components(ItemId=30032,PublicationId=24)/ComponentPresentations
2014-11-12 14:41:40,790 DEBUG ClaimStore - put: uri=taf:request:headers, value={cookie=[Ljava.lang.String;@bce04624, host=[Ljava.lang.String;@7afad281, connection=[Ljava.lang.String;@6f56215e}
2014-11-12 14:41:40,790 DEBUG ClaimStore - put: uri=taf:request:parameters, value={CONTENT_TYPE=[Ljava.lang.String;@adba40ee, PATH_INFO=[Ljava.lang.String;@e38baf32, QUERY_STRING=[Ljava.lang.String;@bd6acd3d, CONTENT_LENGTH=[Ljava.lang.String;@26e999a6}
2014-11-12 14:41:40,861 DEBUG ClaimStore - put: uri=taf:server:variables, value={PATH_TRANSLATED=C:\pvcswork\vme00966\WAS\cds_workspace\cds-web\WebContent\KCO\odata.svc\Components(ItemId=30032,PublicationId=24)\ComponentPresentations, REQUEST_METHOD=GET, REMOTE_HOST=0:0:0:0:0:0:0:1, AUTH_TYPE=null, SERVER_PROTOCOL=HTTP/1.1, REMOTE_USER=null, DOCUMENT_ROOT=C:\pvcswork\vme00966\WAS\cds_workspace\cds-web\WebContent, SERVER_NAME=localhost, SECURE=false, REMOTE_ADDR=0:0:0:0:0:0:0:1, SERVER_PORT=9080, SCRIPT_NAME=}
2014-11-12 14:41:40,861 DEBUG ClaimStore - put: uri=taf:request:cookies, value={TAFContext=eyJ0YWY6Y2xhaW06cnRvOm9mZmVyOmFwciI6Mi45OSwidGFmOmNsYWltOnJ0bzpvZmZlcjp0ZXJtIjo2MCwidGFmOmNsYWltOnJ0bzpvZmZlcjpuYW1lIjoiRGFuaWVsIn0=}
2014-11-12 14:41:40,861 INFO  AmbientDataServletFilter - Requested by IP: /0:0:0:0:0:0:0:1
2014-11-12 14:41:40,862 DEBUG ClaimStore - put: uri=taf:session:id, value=tridion_76c8f3db-0440-4276-a1ab-9f4106b69d83
2014-11-12 14:41:40,862 DEBUG ClaimStore - put: uri=taf:tracking:id, value=tridion_b6a198c2-c0c6-4bd1-baf9-c250bc9d3a2a
2014-11-12 14:41:40,862 DEBUG ClaimStore - put: uri=taf:session:attributes, value={}
2014-11-12 14:41:40,862 DEBUG AmbientDataServletFilter - Processing cookie claims.
2014-11-12 14:41:40,862 DEBUG AmbientDataServletFilter - Cookie forwarding is enabled: true
2014-11-12 14:41:40,862 DEBUG AmbientDataServletFilter - Cookie forwarding for account is set to: null
2014-11-12 14:41:40,863 DEBUG AmbientDataServletFilter - IP address is in the white list: true
2014-11-12 14:41:40,863 DEBUG AmbientDataServletFilter - Cookie forwarding for current request is allowed: true
2014-11-12 14:41:40,863 DEBUG AmbientDataServletFilter - Deserializing claim cookies.
2014-11-12 14:41:40,863 DEBUG ClaimCookieDeserializer - The list of ClaimsCookies sent to be deserialized is empty!

The cd_ambient_conf.xml is configured to allow cookies from any IP, and the error is the same with the cookies element commented out or like this:

<Cookies>
    <CookieClaim DefaultValue="true" Name="CookieClaim"/>
    <Cookie Type="Tracking" Name="myTrackingCookie" Path="/"/>
    <Cookie Type="Session" Name="mySessionCookie" Path="/"/>
    <Cookie Type="ADF" Name="TAFContext" />
</Cookies>

Any direction would be greatly appreciated.

Sincerely

Daniel

  • The log doesn't show an error. Can you paste a screenshot or a trace with it? – Nickoli Roussakov Nov 12 '14 at 20:05
  • Nick, you are correct, it doesn't show an error however the last line of the trace states: The list of ClaimsCookies sent to be deserialized is empty! so it isn't even trying to deserialize my cookie, which I figured it should by default – Daniel Nov 12 '14 at 20:08
3

After a week or so away from this problem doing some good old fashioned Java development I dug deeper into the code and finally determined that it was my custom cookie serialized that was at issue. Something that is not totally obvious from the documentation is that though the cookie name is defined as TAFContext in the configuration file, this is actually a prefix, and what you need to send is TAFContext.1 (assuming your serialized cookie's length is less than 4000 bytes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.