debug(node-agent): log token prefix/suffix on auth reject
This commit is contained in:
parent
90bd82f49a
commit
4ad145f00a
1 changed files with 1 additions and 1 deletions
|
|
@ -964,7 +964,7 @@ function checkAgentAuth(req) {
|
||||||
const okNode = _bearerEq(token, NODE_TOKEN);
|
const okNode = _bearerEq(token, NODE_TOKEN);
|
||||||
const okShared = _bearerEq(token, CLUSTER_READ_TOKEN);
|
const okShared = _bearerEq(token, CLUSTER_READ_TOKEN);
|
||||||
if (!okNode && !okShared) {
|
if (!okNode && !okShared) {
|
||||||
console.warn(`[auth] reject: tok.len=${token.length} NODE_TOKEN.len=${NODE_TOKEN.length} CLUSTER_READ_TOKEN.len=${CLUSTER_READ_TOKEN.length}`);
|
console.warn(`[auth] reject: tok=${token.slice(0,6)}..${token.slice(-6)} CRT=${CLUSTER_READ_TOKEN.slice(0,6)}..${CLUSTER_READ_TOKEN.slice(-6)} match=${token===CLUSTER_READ_TOKEN}`);
|
||||||
}
|
}
|
||||||
return okNode || okShared;
|
return okNode || okShared;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue