You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi folks,
I have the following problem. The information which will be logged into the remote_client_id field in kibana are either a uuid or an info_user_id.
morgan.token("remote_client_id", function getRemoteClientId(
request,
response
) {
let rcId = "";
try {
rcId = request.headers.customeruuid;
if (request.headers[CUSTOMER_UUID]) {
rcId = request.headers[CUSTOMER_UUID];
}
if (request.headers[AUTH_INFO_USER_ID]) {
rcId = request.headers[AUTH_INFO_USER_ID];
}
if (request.headers[AUTH_REMOTE_CLIENT_ID]) {
rcId = request.headers[AUTH_REMOTE_CLIENT_ID];
}
if (!rcId) {
rcId = "unknown";
}
} catch (e) {
rcId = "error";
}
return rcId;
});
Both of this informations are a little bit miss leading, since both are not the real client Id.
I want to write the real client Id (from an oauth token in my case) into this log field.
Unfortunately I cannot use these header attributes and just fill it with another information because other services reliant on the right UUID and an info_user_id.
So the only way to solve that problem I can imagine is to ad another if-clause and extend the logic in the method above with a new header attribute. Something like this:
if (request.headers[AUTH_REMOTE_CLIENT_ID])
{
rcId = request.headers[AUTH_REMOTE_CLIENT_ID];
}
Is this an option for you?
The text was updated successfully, but these errors were encountered:
Hi folks,
I have the following problem. The information which will be logged into the remote_client_id field in kibana are either a uuid or an info_user_id.
Both of this informations are a little bit miss leading, since both are not the real client Id.
I want to write the real client Id (from an oauth token in my case) into this log field.
Unfortunately I cannot use these header attributes and just fill it with another information because other services reliant on the right UUID and an info_user_id.
So the only way to solve that problem I can imagine is to ad another if-clause and extend the logic in the method above with a new header attribute. Something like this:
Is this an option for you?
The text was updated successfully, but these errors were encountered: