Error of "[...] is not a string" seen in audit events. How do I see the content of the context variable?

Document ID : KB000098152
Last Modified Date : 25/05/2018
Show Technical Document Details
Introduction:
  • When I try to audit a context variable in policy, it tells me it "is not a string and cannot be converted to one".
  • How do I see the contents of the context variable in the audit event viewer when it isn't a string?
Environment:
  • All versions of the CA API Gateway.
Instructions:
  • When the content is not a string type, it is generally necessary to add the following text to the end of the context variable in the audit assertion: .mainpart
  • Example:
    • When the error shown in the audit viewer is Variable 'attribute.current' is not a String and cannot be converted to one. (Actual type: com.ca.siteminder.SiteMinderContext$Attribute) the audit assertion logging it should be changed from having a context variable named ${siteminder.smcontext.attributes} to a context variable named ${siteminder.smcontext.attributes.mainpart}