I dont see variable “user” in the trace. Could anyone pls help?
Yes. You should not expect to see a variable “user”. It looks to me that your configuration specifies a variable name of “private.user”, not “user”. So you won’t see “user” in the Trace.
It may be somewhat mysterious, but you ALSO won’t see “private.user” in the trace. This is because all private variables - those with private. as a prefix - are masked from Trace. You won’t ever see a variable with a name like “private.user” in the Trace.
That doesn’t mean the variable is not actually set.
The way to determine if a private variable is set, is to examine side-effects. For example, if you use private.user as an input to a BasicAuthentication policy, you can examine the output of that latter policy to infer whether the private.user variable was set correctly.
You may wonder, why don’t I just configure the KVM Get to assign to a non-private variable?
You can do that if the KVM in question is not encrypted. For encrypted KVM, you must use the private. prefix.
Sometimes I want to see the private variable directly. For that purpose I’ll add a new policy, an AssignMessage policy, directly following the KVM-Get, that does nothing more than assign the value of a private variable to a non-private variable.
<AssignMessage name='AM-1'>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<AssignVariable>
<Name>public_user</Name>
<Ref>private.user</Ref>
<Value>BADDBEEF</Value>
</AssignVariable>
</AssignMessage>
The side effect of that policy will be to cause a Trace statement to be emitted, and you’ll see the public_user variable in the Trace UI.
But you’ll want to make sure to remove that policy before you go into production, to protect the integrity of your private variables.