@schemavaults/auth-common 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-errors/index.d.ts +1 -0
- package/dist/client-errors/index.js +1 -0
- package/dist/client-errors/index.js.map +1 -1
- package/dist/client-errors/redact-client-error-secrets.d.ts +27 -0
- package/dist/client-errors/redact-client-error-secrets.js +144 -0
- package/dist/client-errors/redact-client-error-secrets.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { CLIENT_ERROR_REPORT_LIMITS, clientErrorReportSchema, type ClientErrorReport, } from "./client-error-report";
|
|
2
|
+
export { CLIENT_ERROR_REDACTED, isClientErrorSecretKey, redactClientErrorContext, redactClientErrorReport, redactClientErrorText, } from "./redact-client-error-secrets";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { CLIENT_ERROR_REPORT_LIMITS, clientErrorReportSchema, } from "./client-error-report";
|
|
2
|
+
export { CLIENT_ERROR_REDACTED, isClientErrorSecretKey, redactClientErrorContext, redactClientErrorReport, redactClientErrorText, } from "./redact-client-error-secrets";
|
|
2
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client-errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GAExB,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client-errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GAExB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ClientErrorReport } from "./client-error-report";
|
|
2
|
+
/**
|
|
3
|
+
* Redaction of credentials in client error reports. Error messages, stack
|
|
4
|
+
* traces and app-supplied context can carry tokens (a token response that
|
|
5
|
+
* fails validation ends up in the error's `cause`), authorization codes,
|
|
6
|
+
* passwords or cookies. The client SDK redacts its reports before sending
|
|
7
|
+
* them, and the auth server redacts every report again before storing it,
|
|
8
|
+
* since older SDKs and other clients do not. Over-redaction is accepted: a
|
|
9
|
+
* report only has to say what went wrong.
|
|
10
|
+
*
|
|
11
|
+
* The patterns run in linear time (the server applies them to unauthenticated
|
|
12
|
+
* input) and use no lookbehind (older Safari cannot parse it). Isomorphic.
|
|
13
|
+
*/
|
|
14
|
+
/** What a redacted value is replaced with. */
|
|
15
|
+
export declare const CLIENT_ERROR_REDACTED: string;
|
|
16
|
+
/** Whether a key (an object member, query parameter or header name) holds a secret. */
|
|
17
|
+
export declare function isClientErrorSecretKey(key: string): boolean;
|
|
18
|
+
/** `text` with tokens, `Authorization` credentials and the values of secret keys replaced. */
|
|
19
|
+
export declare function redactClientErrorText(text: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* A report's JSON `context` with the members under secret keys replaced and
|
|
22
|
+
* every string redacted like {@link redactClientErrorText}. Members nested
|
|
23
|
+
* deeper than {@link MAX_CONTEXT_DEPTH} are replaced too.
|
|
24
|
+
*/
|
|
25
|
+
export declare function redactClientErrorContext(context: Record<string, unknown>): Record<string, unknown>;
|
|
26
|
+
/** `report` with its message, stack and context redacted. */
|
|
27
|
+
export declare function redactClientErrorReport(report: ClientErrorReport): ClientErrorReport;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redaction of credentials in client error reports. Error messages, stack
|
|
3
|
+
* traces and app-supplied context can carry tokens (a token response that
|
|
4
|
+
* fails validation ends up in the error's `cause`), authorization codes,
|
|
5
|
+
* passwords or cookies. The client SDK redacts its reports before sending
|
|
6
|
+
* them, and the auth server redacts every report again before storing it,
|
|
7
|
+
* since older SDKs and other clients do not. Over-redaction is accepted: a
|
|
8
|
+
* report only has to say what went wrong.
|
|
9
|
+
*
|
|
10
|
+
* The patterns run in linear time (the server applies them to unauthenticated
|
|
11
|
+
* input) and use no lookbehind (older Safari cannot parse it). Isomorphic.
|
|
12
|
+
*/
|
|
13
|
+
/** What a redacted value is replaced with. */
|
|
14
|
+
export const CLIENT_ERROR_REDACTED = "[redacted]";
|
|
15
|
+
/** A key containing one of these (lowercased, `-` read as `_`) holds a secret. */
|
|
16
|
+
const SECRET_KEY_FRAGMENTS = [
|
|
17
|
+
"token",
|
|
18
|
+
"secret",
|
|
19
|
+
"password",
|
|
20
|
+
"passwd",
|
|
21
|
+
"authorization",
|
|
22
|
+
"cookie",
|
|
23
|
+
"credential",
|
|
24
|
+
"api_key",
|
|
25
|
+
"apikey",
|
|
26
|
+
"private_key",
|
|
27
|
+
"privatekey",
|
|
28
|
+
"code_verifier",
|
|
29
|
+
"session_id",
|
|
30
|
+
"sessionid",
|
|
31
|
+
];
|
|
32
|
+
/** Keys that hold a secret when they are the whole (last dotted segment of the) key. */
|
|
33
|
+
const SECRET_KEY_NAMES = new Set(["auth", "pass", "pwd", "jwt", "otp", "totp", "nonce"]);
|
|
34
|
+
/**
|
|
35
|
+
* Query / form parameters that hold a secret: `code` is the authorization
|
|
36
|
+
* code in a callback URL, but too common a key elsewhere (`code: 500`,
|
|
37
|
+
* `{ code: "ERR_NETWORK" }`) to redact outside `name=value` pairs.
|
|
38
|
+
*/
|
|
39
|
+
const SECRET_PARAM_NAMES = new Set(["code"]);
|
|
40
|
+
/** Context deeper than this is not inspected, so it is not kept. */
|
|
41
|
+
const MAX_CONTEXT_DEPTH = 32;
|
|
42
|
+
/** Whether a key (an object member, query parameter or header name) holds a secret. */
|
|
43
|
+
export function isClientErrorSecretKey(key) {
|
|
44
|
+
const normalized = key.toLowerCase().replace(/-/g, "_");
|
|
45
|
+
const last = normalized.slice(normalized.lastIndexOf(".") + 1);
|
|
46
|
+
return SECRET_KEY_NAMES.has(last) || SECRET_KEY_FRAGMENTS.some((fragment) => normalized.includes(fragment));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* JWS (3 segments) and JWE (5 segments) compact serializations, which start
|
|
50
|
+
* with a base64url `{"` header. The dot is checked in the replacer rather
|
|
51
|
+
* than the pattern, which would otherwise backtrack over long runs.
|
|
52
|
+
*/
|
|
53
|
+
const JWT_CANDIDATE_REGEX = /eyJ[A-Za-z0-9_.-]{4,}/g;
|
|
54
|
+
/** The credentials of an `Authorization` header value. */
|
|
55
|
+
const AUTH_SCHEME_REGEX = /\b(Bearer|DPoP|Basic)([ \t]+)[A-Za-z0-9._~+/-]{8,}=*/gi;
|
|
56
|
+
/**
|
|
57
|
+
* The key and separator of `key=value`, `key: value` and `"key": value`
|
|
58
|
+
* (also with JSON-escaped quotes, as in a stringified body inside a
|
|
59
|
+
* message). Only the key is matched here: a non-secret value (`https:` in
|
|
60
|
+
* a URL, say) must not swallow the `?code=` that follows it. Bounded key
|
|
61
|
+
* and whitespace lengths keep it linear.
|
|
62
|
+
*/
|
|
63
|
+
const KEY_SEPARATOR_REGEX = /([A-Za-z_][A-Za-z0-9_.-]{0,63})(\\?["']?[ \t]{0,8}([:=])[ \t]{0,8})/g;
|
|
64
|
+
/**
|
|
65
|
+
* The value after a secret key's separator: a quoted string (also
|
|
66
|
+
* unterminated, as when truncation cut it short) or an unquoted run,
|
|
67
|
+
* optionally after an `Authorization` scheme. Sticky: it is matched where
|
|
68
|
+
* the separator ends.
|
|
69
|
+
*/
|
|
70
|
+
const SECRET_VALUE_REGEX = /\\?"(?:[^"\\]|\\[^"])*(?:\\?")?|'[^'\n]*'?|(?:(?:Bearer|DPoP|Basic)[ \t]+)?[^\s"'\\&,;{}()[\]<>]+/iy;
|
|
71
|
+
/** Source file names in stack frames (`exchange-auth-tokens.js:216:13`) are not keys. */
|
|
72
|
+
const SOURCE_FILE_KEY_REGEX = /\.(?:[cm]?[jt]sx?|map|html?|vue|svelte)$/i;
|
|
73
|
+
/** `value` with its content replaced, keeping its quotes. */
|
|
74
|
+
function redactedValue(value) {
|
|
75
|
+
const open = /^\\?["']/.exec(value)?.[0] ?? "";
|
|
76
|
+
if (!open)
|
|
77
|
+
return CLIENT_ERROR_REDACTED;
|
|
78
|
+
const close = value.length > open.length && value.endsWith(open) ? open : "";
|
|
79
|
+
return `${open}${CLIENT_ERROR_REDACTED}${close}`;
|
|
80
|
+
}
|
|
81
|
+
function isSecretKeyBeforeOperator(key, operator) {
|
|
82
|
+
if (SOURCE_FILE_KEY_REGEX.test(key))
|
|
83
|
+
return false;
|
|
84
|
+
return isClientErrorSecretKey(key) || (operator === "=" && SECRET_PARAM_NAMES.has(key.toLowerCase()));
|
|
85
|
+
}
|
|
86
|
+
/** `text` with the values of secret keys replaced. */
|
|
87
|
+
function redactKeyValues(text) {
|
|
88
|
+
let redacted = "";
|
|
89
|
+
let copied = 0;
|
|
90
|
+
KEY_SEPARATOR_REGEX.lastIndex = 0;
|
|
91
|
+
for (let match = KEY_SEPARATOR_REGEX.exec(text); match !== null; match = KEY_SEPARATOR_REGEX.exec(text)) {
|
|
92
|
+
const [keyAndSeparator, key = "", , operator = ""] = match;
|
|
93
|
+
if (!isSecretKeyBeforeOperator(key, operator))
|
|
94
|
+
continue;
|
|
95
|
+
const valueStart = match.index + keyAndSeparator.length;
|
|
96
|
+
SECRET_VALUE_REGEX.lastIndex = valueStart;
|
|
97
|
+
const value = SECRET_VALUE_REGEX.exec(text)?.[0];
|
|
98
|
+
if (!value)
|
|
99
|
+
continue;
|
|
100
|
+
redacted += text.slice(copied, valueStart) + redactedValue(value);
|
|
101
|
+
copied = valueStart + value.length;
|
|
102
|
+
KEY_SEPARATOR_REGEX.lastIndex = copied;
|
|
103
|
+
}
|
|
104
|
+
return redacted + text.slice(copied);
|
|
105
|
+
}
|
|
106
|
+
/** `text` with tokens, `Authorization` credentials and the values of secret keys replaced. */
|
|
107
|
+
export function redactClientErrorText(text) {
|
|
108
|
+
return redactKeyValues(text
|
|
109
|
+
.replace(JWT_CANDIDATE_REGEX, (candidate) => candidate.includes(".") ? CLIENT_ERROR_REDACTED : candidate)
|
|
110
|
+
.replace(AUTH_SCHEME_REGEX, `$1$2${CLIENT_ERROR_REDACTED}`));
|
|
111
|
+
}
|
|
112
|
+
function redactJsonValue(value, depth) {
|
|
113
|
+
if (typeof value === "string")
|
|
114
|
+
return redactClientErrorText(value);
|
|
115
|
+
if (value === null || typeof value !== "object")
|
|
116
|
+
return value;
|
|
117
|
+
if (depth >= MAX_CONTEXT_DEPTH)
|
|
118
|
+
return CLIENT_ERROR_REDACTED;
|
|
119
|
+
if (Array.isArray(value))
|
|
120
|
+
return value.map((item) => redactJsonValue(item, depth + 1));
|
|
121
|
+
// Object.fromEntries defines own properties: a `__proto__` member stays data.
|
|
122
|
+
return Object.fromEntries(Object.entries(value).map(([key, member]) => [
|
|
123
|
+
key,
|
|
124
|
+
isClientErrorSecretKey(key) ? CLIENT_ERROR_REDACTED : redactJsonValue(member, depth + 1),
|
|
125
|
+
]));
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A report's JSON `context` with the members under secret keys replaced and
|
|
129
|
+
* every string redacted like {@link redactClientErrorText}. Members nested
|
|
130
|
+
* deeper than {@link MAX_CONTEXT_DEPTH} are replaced too.
|
|
131
|
+
*/
|
|
132
|
+
export function redactClientErrorContext(context) {
|
|
133
|
+
return redactJsonValue(context, 0);
|
|
134
|
+
}
|
|
135
|
+
/** `report` with its message, stack and context redacted. */
|
|
136
|
+
export function redactClientErrorReport(report) {
|
|
137
|
+
return {
|
|
138
|
+
...report,
|
|
139
|
+
message: redactClientErrorText(report.message),
|
|
140
|
+
...(report.stack !== undefined ? { stack: redactClientErrorText(report.stack) } : {}),
|
|
141
|
+
...(report.context !== undefined ? { context: redactClientErrorContext(report.context) } : {}),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=redact-client-error-secrets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact-client-error-secrets.js","sourceRoot":"","sources":["../../src/client-errors/redact-client-error-secrets.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,qBAAqB,GAAW,YAAY,CAAC;AAE1D,kFAAkF;AAClF,MAAM,oBAAoB,GAAsB;IAC9C,OAAO;IACP,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,eAAe;IACf,QAAQ;IACR,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,eAAe;IACf,YAAY;IACZ,WAAW;CACZ,CAAC;AAEF,wFAAwF;AACxF,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE9G;;;;GAIG;AACH,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAElE,oEAAoE;AACpE,MAAM,iBAAiB,GAAW,EAAE,CAAC;AAErC,uFAAuF;AACvF,MAAM,UAAU,sBAAsB,CAAC,GAAW;IAChD,MAAM,UAAU,GAAW,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAChE,MAAM,IAAI,GAAW,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACvE,OAAO,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC9G,CAAC;AAED;;;;GAIG;AACH,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,CAAC;KAC/F,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type { PaginationOptions } from "./pagination";
|
|
|
35
35
|
export { timingSafeStringEqual } from "./timing-safe-string-equal";
|
|
36
36
|
export { sanitizeNextHref, MAX_NEXT_HREF_LENGTH, } from "./sanitize-next-href";
|
|
37
37
|
export { isOriginInAllowedList } from "./cors";
|
|
38
|
-
export { CLIENT_ERROR_REPORT_LIMITS, clientErrorReportSchema, } from "./client-errors";
|
|
38
|
+
export { CLIENT_ERROR_REPORT_LIMITS, clientErrorReportSchema, CLIENT_ERROR_REDACTED, isClientErrorSecretKey, redactClientErrorContext, redactClientErrorReport, redactClientErrorText, } from "./client-errors";
|
|
39
39
|
export type { ClientErrorReport } from "./client-errors";
|
|
40
40
|
export { isRedirectUriInCallbackAllowlist } from "./oauth2";
|
|
41
41
|
export { oauth2StateSchema, OAUTH2_STATE_VSCHAR_REGEX, parseOAuth2State, OAuth2StateValidationError, } from "./oauth2-state-schema";
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ export { paginationOptionsSchema, DEFAULT_PAGINATION_PAGE_INDEX, DEFAULT_PAGINAT
|
|
|
25
25
|
export { timingSafeStringEqual } from "./timing-safe-string-equal";
|
|
26
26
|
export { sanitizeNextHref, MAX_NEXT_HREF_LENGTH, } from "./sanitize-next-href";
|
|
27
27
|
export { isOriginInAllowedList } from "./cors";
|
|
28
|
-
export { CLIENT_ERROR_REPORT_LIMITS, clientErrorReportSchema, } from "./client-errors";
|
|
28
|
+
export { CLIENT_ERROR_REPORT_LIMITS, clientErrorReportSchema, CLIENT_ERROR_REDACTED, isClientErrorSecretKey, redactClientErrorContext, redactClientErrorReport, redactClientErrorText, } from "./client-errors";
|
|
29
29
|
export { isRedirectUriInCallbackAllowlist } from "./oauth2";
|
|
30
30
|
export { oauth2StateSchema, OAUTH2_STATE_VSCHAR_REGEX, parseOAuth2State, OAuth2StateValidationError, } from "./oauth2-state-schema";
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,cAAc,GACf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EAIvB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC9B,yBAAyB,GAK1B,MAAM,aAAa,CAAC;AAErB,cAAc,eAAe,CAAC;AAG9B,mBAAmB;AACnB,cAAc,cAAc,CAAC;AAM7B,cAAc,cAAc,CAAC;AAG7B,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EACL,wBAAwB,EACxB,qCAAqC,EACrC,mCAAmC,EACnC,+BAA+B,EAC/B,wCAAwC,EACxC,iDAAiD,EACjD,wBAAwB,EACxB,uBAAuB,GAQxB,MAAM,uBAAuB,CAAC;AAE/B,cAAc,OAAO,CAAC;AACtB,OAAO,EACL,+BAA+B,EAE/B,6CAA6C,GAE9C,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,+BAA+B,EAC/B,qBAAqB,EACrB,gCAAgC,GACjC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,sBAAsB,EACtB,0BAA0B,G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