debug(node-agent): log auth reject token lengths
This commit is contained in:
parent
70c873ae95
commit
90bd82f49a
1 changed files with 6 additions and 1 deletions
|
|
@ -961,7 +961,12 @@ function checkAgentAuth(req) {
|
|||
const m = /^Bearer\s+(.+)$/i.exec(hdr);
|
||||
if (!m) return false;
|
||||
const token = m[1];
|
||||
return _bearerEq(token, NODE_TOKEN) || _bearerEq(token, CLUSTER_READ_TOKEN);
|
||||
const okNode = _bearerEq(token, NODE_TOKEN);
|
||||
const okShared = _bearerEq(token, CLUSTER_READ_TOKEN);
|
||||
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}`);
|
||||
}
|
||||
return okNode || okShared;
|
||||
}
|
||||
|
||||
// ── Driver/SDK install ────────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Reference in a new issue