@mcp-abap-adt/auth-broker 4.1.0 → 5.0.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/CHANGELOG.md +138 -1
- package/README.md +960 -1214
- package/dist/AuthBroker.d.ts +294 -110
- package/dist/AuthBroker.d.ts.map +1 -1
- package/dist/AuthBroker.js +726 -351
- package/dist/DestinationConfigError.d.ts +35 -6
- package/dist/DestinationConfigError.d.ts.map +1 -1
- package/dist/DestinationConfigError.js +51 -9
- package/dist/SessionWriter.d.ts +70 -33
- package/dist/SessionWriter.d.ts.map +1 -1
- package/dist/SessionWriter.js +118 -94
- package/dist/binding.d.ts +125 -74
- package/dist/binding.d.ts.map +1 -1
- package/dist/binding.js +320 -137
- package/dist/bindingOf.d.ts +33 -15
- package/dist/bindingOf.d.ts.map +1 -1
- package/dist/bindingOf.js +50 -20
- package/dist/buildIdentity.d.ts +137 -0
- package/dist/buildIdentity.d.ts.map +1 -0
- package/dist/buildIdentity.js +393 -0
- package/dist/clientAuthentication.d.ts +21 -6
- package/dist/clientAuthentication.d.ts.map +1 -1
- package/dist/clientAuthentication.js +55 -55
- package/dist/contractShape.d.ts +24 -0
- package/dist/contractShape.d.ts.map +1 -0
- package/dist/contractShape.js +24 -0
- package/dist/destinations.d.ts +149 -53
- package/dist/destinations.d.ts.map +1 -1
- package/dist/destinations.js +426 -160
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/quietLogger.d.ts +24 -0
- package/dist/quietLogger.d.ts.map +1 -0
- package/dist/quietLogger.js +63 -0
- package/package.json +8 -7
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* certificate the key store holds, one the secret. Neither falls back to the
|
|
7
7
|
* other; a consumer that wants a fallback composes it, and its order is the
|
|
8
8
|
* consumer's statement. Whatever a strategy throws, the broker turns into a
|
|
9
|
-
* `DestinationConfigError` in fixed words (`resolveClientAuthentication`)
|
|
10
|
-
*
|
|
9
|
+
* `DestinationConfigError` in fixed words (`resolveClientAuthentication`),
|
|
10
|
+
* carrying the thrown value as auth-errors reads it — never its message, no
|
|
11
|
+
* `cause`.
|
|
11
12
|
*/
|
|
12
13
|
import type { IClientAuthentication } from '@mcp-abap-adt/interfaces-auth';
|
|
13
14
|
import type { IClientCertificate } from '@mcp-abap-adt/interfaces-auth-broker';
|
|
@@ -35,6 +36,13 @@ export interface ClientAuthenticationContext {
|
|
|
35
36
|
* `getClientCertificate`.
|
|
36
37
|
*/
|
|
37
38
|
readCertificate(): Promise<IClientCertificate | null>;
|
|
39
|
+
/**
|
|
40
|
+
* The build's attempt: aborts when every caller waiting on the build has
|
|
41
|
+
* gone. A strategy that waits on the network — a loader's
|
|
42
|
+
* `tlsMaterial()` — ends its wait on it; the broker sets no bound of its
|
|
43
|
+
* own.
|
|
44
|
+
*/
|
|
45
|
+
readonly signal: AbortSignal;
|
|
38
46
|
}
|
|
39
47
|
/** The strategy `AuthBrokerConfig.clientAuthentication` takes. */
|
|
40
48
|
export type ClientAuthenticationStrategy = (context: ClientAuthenticationContext) => Promise<IClientAuthentication>;
|
|
@@ -43,7 +51,9 @@ export type ClientAuthenticationStrategy = (context: ClientAuthenticationContext
|
|
|
43
51
|
* `${certUrl}/oauth/token`. The material is handed over as given and checked
|
|
44
52
|
* before the factory answers — auth-providers checks it only on first use, so
|
|
45
53
|
* a malformed, incomplete or expired PEM would otherwise surface only at the
|
|
46
|
-
* first token request, in a provider already built and cached.
|
|
54
|
+
* first token request, in a provider already built and cached. What
|
|
55
|
+
* `tlsMaterial()` throws — auth-providers' `client-certificate` failure — is
|
|
56
|
+
* carried by the guard as auth-errors reads it.
|
|
47
57
|
*
|
|
48
58
|
* Throws "the destination has no client certificate" when the store answers
|
|
49
59
|
* `null` or implements no `getClientCertificate`.
|
|
@@ -76,14 +86,19 @@ export declare function contextClient(client: IAuthorizationConfig | null): IAut
|
|
|
76
86
|
/**
|
|
77
87
|
* The context for one build: the client through `contextClient`;
|
|
78
88
|
* `readCertificate` lazy and memoised — the first call reads, every later one
|
|
79
|
-
* gets the same answer.
|
|
89
|
+
* gets the same answer; `signal`, the build's attempt.
|
|
80
90
|
*/
|
|
81
|
-
export declare function clientAuthenticationContext(destination: string, grant: ClientAuthenticationGrant, client: IAuthorizationConfig | null, read: () => Promise<IClientCertificate | null
|
|
91
|
+
export declare function clientAuthenticationContext(destination: string, grant: ClientAuthenticationGrant, client: IAuthorizationConfig | null, read: () => Promise<IClientCertificate | null>, signal: AbortSignal): ClientAuthenticationContext;
|
|
82
92
|
/**
|
|
83
93
|
* Runs the strategy inside the guard. Any throw — the strategy's own, a
|
|
84
94
|
* store's, a malformed PEM — and any answer that is no client authentication
|
|
85
95
|
* becomes a `DestinationConfigError` naming `clientAuthentication`, in fixed
|
|
86
|
-
* words
|
|
96
|
+
* words. A shipped factory's own refusal keeps the broker's words; anything
|
|
97
|
+
* else is "the clientAuthentication strategy failed", carrying
|
|
98
|
+
* `readFailure(thrown, 'client-authentication-strategy')` — a provider's
|
|
99
|
+
* failure (an unusable certificate) as the provider made it, a strategy's own
|
|
100
|
+
* error only as its classification. No `cause`, no message of the thrown
|
|
101
|
+
* value.
|
|
87
102
|
*/
|
|
88
103
|
export declare function resolveClientAuthentication(strategy: ClientAuthenticationStrategy, context: ClientAuthenticationContext): Promise<IClientAuthentication>;
|
|
89
104
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientAuthentication.d.ts","sourceRoot":"","sources":["../src/clientAuthentication.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"clientAuthentication.d.ts","sourceRoot":"","sources":["../src/clientAuthentication.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE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MAAM,EAAE,WAAW,GAClB,2BAA2B,CAY7B;AAcD;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,4BAA4B,EACtC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAkChC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAiBhC"}
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* certificate the key store holds, one the secret. Neither falls back to the
|
|
8
8
|
* other; a consumer that wants a fallback composes it, and its order is the
|
|
9
9
|
* consumer's statement. Whatever a strategy throws, the broker turns into a
|
|
10
|
-
* `DestinationConfigError` in fixed words (`resolveClientAuthentication`)
|
|
11
|
-
*
|
|
10
|
+
* `DestinationConfigError` in fixed words (`resolveClientAuthentication`),
|
|
11
|
+
* carrying the thrown value as auth-errors reads it — never its message, no
|
|
12
|
+
* `cause`.
|
|
12
13
|
*/
|
|
13
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
15
|
exports.fromServiceKeyCertificate = fromServiceKeyCertificate;
|
|
@@ -17,33 +18,42 @@ exports.contextClient = contextClient;
|
|
|
17
18
|
exports.clientAuthenticationContext = clientAuthenticationContext;
|
|
18
19
|
exports.resolveClientAuthentication = resolveClientAuthentication;
|
|
19
20
|
exports.clientIdentity = clientIdentity;
|
|
21
|
+
const auth_errors_1 = require("@mcp-abap-adt/auth-errors");
|
|
20
22
|
const auth_providers_1 = require("@mcp-abap-adt/auth-providers");
|
|
21
23
|
const DestinationConfigError_1 = require("./DestinationConfigError");
|
|
22
24
|
const NO_CERTIFICATE = 'the destination has no client certificate';
|
|
23
25
|
const NO_SECRET = 'the destination has no client secret';
|
|
24
26
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
27
|
+
* The shipped factories' refusals, and what each lacks: recognised by
|
|
28
|
+
* identity in this module-private map — never by `instanceof` or a property
|
|
29
|
+
* of the thrown value — so nothing outside this file can make one, and a
|
|
30
|
+
* consumer that catches and alters one changes nothing the guard reads.
|
|
28
31
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const unavailable = new WeakMap();
|
|
33
|
+
function clientUnavailable(missing) {
|
|
34
|
+
const error = new Error(missing === 'certificate' ? NO_CERTIFICATE : NO_SECRET);
|
|
35
|
+
unavailable.set(error, missing);
|
|
36
|
+
return error;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* `value` without the slashes it ends with, in one backwards pass: linear in
|
|
40
|
+
* the length, whatever the store answered — no regular expression on a
|
|
41
|
+
* stored value.
|
|
42
|
+
*/
|
|
43
|
+
function withoutTrailingSlashes(value) {
|
|
44
|
+
let end = value.length;
|
|
45
|
+
while (end > 0 && value.charCodeAt(end - 1) === 0x2f)
|
|
46
|
+
end -= 1;
|
|
47
|
+
return value.slice(0, end);
|
|
36
48
|
}
|
|
37
|
-
/** The broker's words for auth-providers' CertificateMaterialError, by its flags. */
|
|
38
|
-
const CERTIFICATE_INCOMPLETE = 'the client certificate is incomplete';
|
|
39
|
-
const CERTIFICATE_EXPIRED = 'the client certificate has expired';
|
|
40
|
-
const CERTIFICATE_UNUSABLE = 'the client certificate could not be used';
|
|
41
49
|
/**
|
|
42
50
|
* `tls_client_auth` with the certificate and key the key store holds, against
|
|
43
51
|
* `${certUrl}/oauth/token`. The material is handed over as given and checked
|
|
44
52
|
* before the factory answers — auth-providers checks it only on first use, so
|
|
45
53
|
* a malformed, incomplete or expired PEM would otherwise surface only at the
|
|
46
|
-
* first token request, in a provider already built and cached.
|
|
54
|
+
* first token request, in a provider already built and cached. What
|
|
55
|
+
* `tlsMaterial()` throws — auth-providers' `client-certificate` failure — is
|
|
56
|
+
* carried by the guard as auth-errors reads it.
|
|
47
57
|
*
|
|
48
58
|
* Throws "the destination has no client certificate" when the store answers
|
|
49
59
|
* `null` or implements no `getClientCertificate`.
|
|
@@ -52,14 +62,14 @@ function fromServiceKeyCertificate() {
|
|
|
52
62
|
return async (context) => {
|
|
53
63
|
const certificate = await context.readCertificate();
|
|
54
64
|
if (!certificate) {
|
|
55
|
-
throw
|
|
65
|
+
throw clientUnavailable('certificate');
|
|
56
66
|
}
|
|
57
67
|
const authentication = (0, auth_providers_1.tlsClientCertificate)({
|
|
58
68
|
material: { cert: certificate.certificate, key: certificate.key },
|
|
59
|
-
endpoint: `${certificate.certUrl
|
|
69
|
+
endpoint: `${withoutTrailingSlashes(certificate.certUrl)}/oauth/token`,
|
|
60
70
|
});
|
|
61
71
|
if (typeof authentication.tlsMaterial !== 'function') {
|
|
62
|
-
throw
|
|
72
|
+
throw clientUnavailable('certificate');
|
|
63
73
|
}
|
|
64
74
|
await authentication.tlsMaterial();
|
|
65
75
|
return authentication;
|
|
@@ -80,7 +90,7 @@ function fromServiceKeySecret(options) {
|
|
|
80
90
|
return async (context) => {
|
|
81
91
|
const secret = context.client?.uaaClientSecret;
|
|
82
92
|
if (typeof secret !== 'string' || secret.length === 0) {
|
|
83
|
-
throw
|
|
93
|
+
throw clientUnavailable('secret');
|
|
84
94
|
}
|
|
85
95
|
return (0, auth_providers_1.clientSecretBasic)(secret, { encoding });
|
|
86
96
|
};
|
|
@@ -118,9 +128,9 @@ function certificateOf(answer) {
|
|
|
118
128
|
/**
|
|
119
129
|
* The context for one build: the client through `contextClient`;
|
|
120
130
|
* `readCertificate` lazy and memoised — the first call reads, every later one
|
|
121
|
-
* gets the same answer.
|
|
131
|
+
* gets the same answer; `signal`, the build's attempt.
|
|
122
132
|
*/
|
|
123
|
-
function clientAuthenticationContext(destination, grant, client, read) {
|
|
133
|
+
function clientAuthenticationContext(destination, grant, client, read, signal) {
|
|
124
134
|
let certificate;
|
|
125
135
|
return {
|
|
126
136
|
destination,
|
|
@@ -130,46 +140,32 @@ function clientAuthenticationContext(destination, grant, client, read) {
|
|
|
130
140
|
certificate ??= read().then(certificateOf);
|
|
131
141
|
return certificate;
|
|
132
142
|
},
|
|
143
|
+
signal,
|
|
133
144
|
};
|
|
134
145
|
}
|
|
135
146
|
const FAILED = 'the clientAuthentication strategy failed';
|
|
136
147
|
const REFUSED = 'the clientAuthentication strategy refused';
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
const missing = error.missing;
|
|
148
|
-
if (missing === 'certificate')
|
|
149
|
-
return `${REFUSED}: ${NO_CERTIFICATE}`;
|
|
150
|
-
if (missing === 'secret')
|
|
151
|
-
return `${REFUSED}: ${NO_SECRET}`;
|
|
152
|
-
return FAILED;
|
|
153
|
-
}
|
|
154
|
-
if (error instanceof auth_providers_1.CertificateMaterialError) {
|
|
155
|
-
if (error.incomplete === true) {
|
|
156
|
-
return `${REFUSED}: ${CERTIFICATE_INCOMPLETE}`;
|
|
157
|
-
}
|
|
158
|
-
if (error.expired === true)
|
|
159
|
-
return `${REFUSED}: ${CERTIFICATE_EXPIRED}`;
|
|
160
|
-
return `${REFUSED}: ${CERTIFICATE_UNUSABLE}`;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
catch {
|
|
164
|
-
// Fall through: the thrown value could not even be classified.
|
|
165
|
-
}
|
|
166
|
-
return FAILED;
|
|
148
|
+
/** A shipped factory's refusal: the broker's own words, by what it lacks. */
|
|
149
|
+
function unavailableWords(error) {
|
|
150
|
+
if (typeof error !== 'object' || error === null)
|
|
151
|
+
return undefined;
|
|
152
|
+
const missing = unavailable.get(error);
|
|
153
|
+
if (missing === 'certificate')
|
|
154
|
+
return `${REFUSED}: ${NO_CERTIFICATE}`;
|
|
155
|
+
if (missing === 'secret')
|
|
156
|
+
return `${REFUSED}: ${NO_SECRET}`;
|
|
157
|
+
return undefined;
|
|
167
158
|
}
|
|
168
159
|
/**
|
|
169
160
|
* Runs the strategy inside the guard. Any throw — the strategy's own, a
|
|
170
161
|
* store's, a malformed PEM — and any answer that is no client authentication
|
|
171
162
|
* becomes a `DestinationConfigError` naming `clientAuthentication`, in fixed
|
|
172
|
-
* words
|
|
163
|
+
* words. A shipped factory's own refusal keeps the broker's words; anything
|
|
164
|
+
* else is "the clientAuthentication strategy failed", carrying
|
|
165
|
+
* `readFailure(thrown, 'client-authentication-strategy')` — a provider's
|
|
166
|
+
* failure (an unusable certificate) as the provider made it, a strategy's own
|
|
167
|
+
* error only as its classification. No `cause`, no message of the thrown
|
|
168
|
+
* value.
|
|
173
169
|
*/
|
|
174
170
|
async function resolveClientAuthentication(strategy, context) {
|
|
175
171
|
let answer;
|
|
@@ -183,7 +179,11 @@ async function resolveClientAuthentication(strategy, context) {
|
|
|
183
179
|
typeof answer.authenticate === 'function';
|
|
184
180
|
}
|
|
185
181
|
catch (error) {
|
|
186
|
-
|
|
182
|
+
const words = unavailableWords(error);
|
|
183
|
+
if (words !== undefined) {
|
|
184
|
+
throw new DestinationConfigError_1.DestinationConfigError(context.destination, ['clientAuthentication'], words);
|
|
185
|
+
}
|
|
186
|
+
throw new DestinationConfigError_1.DestinationConfigError(context.destination, ['clientAuthentication'], FAILED, (0, auth_errors_1.readFailure)(error, 'client-authentication-strategy'));
|
|
187
187
|
}
|
|
188
188
|
if (!usable) {
|
|
189
189
|
throw new DestinationConfigError_1.DestinationConfigError(context.destination, ['clientAuthentication'], 'the clientAuthentication strategy answered no client authentication');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of a contract object as this package has always built it.
|
|
3
|
+
*
|
|
4
|
+
* The contract packages (`@mcp-abap-adt/interfaces-auth`, `-auth-broker`,
|
|
5
|
+
* `-auth-sap`) and `@mcp-abap-adt/auth-providers` declare their optional
|
|
6
|
+
* fields `?: T`, which under `exactOptionalPropertyTypes` means "absent, never
|
|
7
|
+
* `undefined`". The broker builds those objects — a provider's configuration,
|
|
8
|
+
* the session it writes, the client it hands a consumer factory — with an
|
|
9
|
+
* optional field that has no value present and set to `undefined`
|
|
10
|
+
* (`refreshToken: undefined`), and a store, a provider or a consumer may
|
|
11
|
+
* depend on the key being there (`'refreshToken' in config`, `Object.keys`,
|
|
12
|
+
* `{ ...stored, ...secret }`). The key's presence is behaviour, kept as it was.
|
|
13
|
+
*/
|
|
14
|
+
/** `T` whose optional fields may also hold an explicit `undefined`. */
|
|
15
|
+
export type WithUndefined<T> = {
|
|
16
|
+
[K in keyof T]: T[K] | (undefined extends T[K] ? undefined : never);
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The contract type of an object built with explicit `undefined`s. The one
|
|
20
|
+
* assertion between the two shapes: every field still has the contract's
|
|
21
|
+
* type, and no field is added or dropped.
|
|
22
|
+
*/
|
|
23
|
+
export declare function asContract<T>(value: WithUndefined<T>): T;
|
|
24
|
+
//# sourceMappingURL=contractShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractShape.d.ts","sourceRoot":"","sources":["../src/contractShape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,uEAAuE;AACvE,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAC5B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC;CACpE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAExD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The shape of a contract object as this package has always built it.
|
|
4
|
+
*
|
|
5
|
+
* The contract packages (`@mcp-abap-adt/interfaces-auth`, `-auth-broker`,
|
|
6
|
+
* `-auth-sap`) and `@mcp-abap-adt/auth-providers` declare their optional
|
|
7
|
+
* fields `?: T`, which under `exactOptionalPropertyTypes` means "absent, never
|
|
8
|
+
* `undefined`". The broker builds those objects — a provider's configuration,
|
|
9
|
+
* the session it writes, the client it hands a consumer factory — with an
|
|
10
|
+
* optional field that has no value present and set to `undefined`
|
|
11
|
+
* (`refreshToken: undefined`), and a store, a provider or a consumer may
|
|
12
|
+
* depend on the key being there (`'refreshToken' in config`, `Object.keys`,
|
|
13
|
+
* `{ ...stored, ...secret }`). The key's presence is behaviour, kept as it was.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.asContract = asContract;
|
|
17
|
+
/**
|
|
18
|
+
* The contract type of an object built with explicit `undefined`s. The one
|
|
19
|
+
* assertion between the two shapes: every field still has the contract's
|
|
20
|
+
* type, and no field is added or dropped.
|
|
21
|
+
*/
|
|
22
|
+
function asContract(value) {
|
|
23
|
+
return value;
|
|
24
|
+
}
|
package/dist/destinations.d.ts
CHANGED
|
@@ -4,15 +4,30 @@
|
|
|
4
4
|
* Two fields choose the provider — `authType` and, for `jwt` and `saml`,
|
|
5
5
|
* `grantType` — and nothing else: no field's presence or absence is ever
|
|
6
6
|
* read to pick a row. Both come from the key store's means.
|
|
7
|
+
*
|
|
8
|
+
* Every token row takes the consumer's `renewal` (called once per build, with
|
|
9
|
+
* the destination and its grant) and persists through auth-providers'
|
|
10
|
+
* `refreshStatePersistence` over the broker's write, governed by the
|
|
11
|
+
* consumer's `onWriteFailure`; a row built without either is refused naming
|
|
12
|
+
* it, beside every other missing field, in one error. A failure the broker
|
|
13
|
+
* reads — the SNC provider's, a validator's, a provider constructor's — is
|
|
14
|
+
* read through auth-errors (`readFailure`) and carried by the
|
|
15
|
+
* `DestinationConfigError`, never matched by class.
|
|
7
16
|
*/
|
|
8
|
-
import { type IDeviceCodePresenter, type OidcCallbackResult } from '@mcp-abap-adt/auth-providers';
|
|
9
|
-
import type { IAssertionReplayStore, IAuthorizationStrategy, IAuthProvider, IClientAuthentication,
|
|
17
|
+
import { type IDeviceCodePresenter, type OidcCallbackResult, type PersistedTokens } from '@mcp-abap-adt/auth-providers';
|
|
18
|
+
import type { IAssertionReplayStore, IAuthorizationStrategy, IAuthProvider, IClientAuthentication, IRenewalStrategy } from '@mcp-abap-adt/interfaces-auth';
|
|
10
19
|
import type { DestinationGrant, IConfig, IConnectionConfig } from '@mcp-abap-adt/interfaces-auth-broker';
|
|
11
20
|
import type { IAuthorizationConfig } from '@mcp-abap-adt/interfaces-auth-sap';
|
|
12
21
|
import type { ILogger } from '@mcp-abap-adt/interfaces-utils';
|
|
13
22
|
import { type Binding } from './binding';
|
|
14
23
|
import type { ClientIdentity } from './clientAuthentication';
|
|
24
|
+
import { DestinationConfigError } from './DestinationConfigError';
|
|
15
25
|
type StatedAuthType = NonNullable<IConnectionConfig['authType']>;
|
|
26
|
+
/**
|
|
27
|
+
* `authType` and `grantType` are a `jwt` / `saml` pair of the closed list —
|
|
28
|
+
* so neither holds `;` or `/`. Never throws.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isStatedRow(authType: unknown, grant: unknown): grant is DestinationGrant & string;
|
|
16
31
|
/** The stated `authType`, or the error naming it. */
|
|
17
32
|
export declare function statedAuthType(destination: string, means: IConnectionConfig | null): StatedAuthType;
|
|
18
33
|
/** The stated grant of a `jwt` or `saml` destination, or the error naming it. */
|
|
@@ -31,25 +46,95 @@ export declare function basicProvider(destination: string, means: IConnectionCon
|
|
|
31
46
|
* `sncLib` is absent and the user's name taken from the credential when
|
|
32
47
|
* `sncMyName` is, and the provider documents its own `qop` default.
|
|
33
48
|
*/
|
|
34
|
-
export declare function sncProvider(destination: string, means: IConnectionConfig, logger: ILogger): IAuthProvider;
|
|
49
|
+
export declare function sncProvider(destination: string, means: IConnectionConfig, logger: ILogger): IAuthProvider & Attachable;
|
|
35
50
|
/**
|
|
36
51
|
* `none` → the credential handed over, from the session: the only way in, so
|
|
37
52
|
* required. Read from the secret alone — the means are not a seed.
|
|
38
53
|
*
|
|
39
54
|
* The broker did not obtain it and cannot obtain it again, so a binding that
|
|
40
|
-
* does not match is refused, never discarded: `issuedFor`
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
55
|
+
* does not match is refused, never discarded: `issuedFor` must equal the
|
|
56
|
+
* destination's resource — it is what stops the credential going to another
|
|
57
|
+
* one — and `issuedBy` must be exactly the row's record: a credential
|
|
58
|
+
* handed over with a 4.x binding, or none, is refused until it is written
|
|
59
|
+
* again with 5.0.0's `bindingOf`.
|
|
44
60
|
*/
|
|
45
61
|
export declare function handedOverProvider(destination: string, authType: 'jwt' | 'saml', secret: IConfig | null, binding: Binding): IAuthProvider;
|
|
62
|
+
/** Every grant that obtains a secret: `DestinationGrant` without `'none'`. */
|
|
63
|
+
export type TokenGrant = Exclude<DestinationGrant, 'none'>;
|
|
64
|
+
/**
|
|
65
|
+
* A provider that has parties: every token provider
|
|
66
|
+
* (`BaseTokenProvider.attach`) and the SNC one (`SncLogonProvider.attach`).
|
|
67
|
+
*/
|
|
68
|
+
export interface Attachable {
|
|
69
|
+
attach(signal: AbortSignal): () => void;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A token row's provider, and the refresh token the builder handed it from
|
|
73
|
+
* the session — the very value in the provider's config, so what the broker
|
|
74
|
+
* takes as the refresh token the build owns at its start is what the
|
|
75
|
+
* provider was given, for every grant, and cannot drift from it:
|
|
76
|
+
* `client_credentials` is handed none (its row takes no seed), `saml2_pure`
|
|
77
|
+
* none (it holds cookies), and a build that started with nothing none.
|
|
78
|
+
*/
|
|
79
|
+
export interface RowBuild {
|
|
80
|
+
/** A token provider: it has parties. */
|
|
81
|
+
readonly provider: IAuthProvider & Attachable;
|
|
82
|
+
readonly seededRefreshToken: string | undefined;
|
|
83
|
+
}
|
|
84
|
+
/** How the consumer's `renewal` option is shaped. */
|
|
85
|
+
export type RenewalOption = (destination: string, grant: TokenGrant) => IRenewalStrategy;
|
|
86
|
+
/**
|
|
87
|
+
* What every token row takes from the broker beside its own data: the
|
|
88
|
+
* consumer's `renewal` and `onWriteFailure` (each refused by name when
|
|
89
|
+
* absent) and the broker's one write of the destination's session.
|
|
90
|
+
*/
|
|
91
|
+
export interface TokenRowOptions {
|
|
92
|
+
renewal: RenewalOption | undefined;
|
|
93
|
+
onWriteFailure: 'fail' | 'continue' | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* One session write for the destination: resolves when it landed, rejects
|
|
96
|
+
* with the store's error when it did not.
|
|
97
|
+
*/
|
|
98
|
+
write: (tokens: PersistedTokens) => Promise<void>;
|
|
99
|
+
logger: ILogger;
|
|
100
|
+
/**
|
|
101
|
+
* The consumer's `authDebug === true`, decided once by the broker: every
|
|
102
|
+
* token provider a row builds is given it.
|
|
103
|
+
*/
|
|
104
|
+
authDebug: boolean;
|
|
105
|
+
}
|
|
106
|
+
/** `onWriteFailure` as given: `'fail'` or `'continue'`, nothing else. */
|
|
107
|
+
export declare function isWriteFailurePolicy(value: unknown): value is 'fail' | 'continue';
|
|
108
|
+
/**
|
|
109
|
+
* The consumer options a token row lacks, by name: `renewal` when it is no
|
|
110
|
+
* function, `onWriteFailure` when it is neither `'fail'` nor `'continue'`.
|
|
111
|
+
* There is no default for either.
|
|
112
|
+
*/
|
|
113
|
+
export declare function optionsLacking(options: Pick<TokenRowOptions, 'renewal' | 'onWriteFailure'>): string[];
|
|
46
114
|
/** The UAA grants: one client, one token endpoint (`<uaaUrl>/oauth/token`). */
|
|
47
115
|
export type UaaGrant = 'authorization_code' | 'client_credentials' | 'passcode';
|
|
48
116
|
export declare function isUaaGrant(grant: DestinationGrant): grant is UaaGrant;
|
|
49
|
-
/**
|
|
50
|
-
|
|
117
|
+
/**
|
|
118
|
+
* What a token row's check reads of its client and options. `client`
|
|
119
|
+
* `undefined` means "not known yet": the consumer's `clientAuthentication`
|
|
120
|
+
* strategy will tell the client identity, so its fields are not judged.
|
|
121
|
+
*/
|
|
122
|
+
interface ClientCheck {
|
|
51
123
|
destination: string;
|
|
124
|
+
client: RowClient | null | undefined;
|
|
125
|
+
/** Whether the client authenticates through the consumer's strategy. */
|
|
126
|
+
clientAuthenticated: boolean;
|
|
127
|
+
renewal: RenewalOption | undefined;
|
|
128
|
+
onWriteFailure: 'fail' | 'continue' | undefined;
|
|
129
|
+
}
|
|
130
|
+
/** What a UAA row's check reads. */
|
|
131
|
+
export interface UaaCheck extends ClientCheck {
|
|
52
132
|
grant: UaaGrant;
|
|
133
|
+
/** The consumer's `authorization` option. */
|
|
134
|
+
authorization: ((destination: string, grant: 'authorization_code' | 'passcode') => IAuthorizationStrategy<string>) | undefined;
|
|
135
|
+
}
|
|
136
|
+
/** What a UAA row is built from. */
|
|
137
|
+
export interface UaaRow extends Omit<UaaCheck, 'client' | 'clientAuthenticated'>, TokenRowOptions {
|
|
53
138
|
/**
|
|
54
139
|
* The client: the key store's `getAuthorizationConfig` — or, with a
|
|
55
140
|
* strategy and no secret client, the certificate client's identity.
|
|
@@ -62,82 +147,91 @@ export interface UaaRow {
|
|
|
62
147
|
* client with it and gets no `clientSecret`; absent, 4.0.0's secret.
|
|
63
148
|
*/
|
|
64
149
|
clientAuthentication?: IClientAuthentication;
|
|
65
|
-
/** The consumer's `authorization` option. */
|
|
66
|
-
authorization: ((destination: string, grant: 'authorization_code' | 'passcode') => IAuthorizationStrategy<string>) | undefined;
|
|
67
|
-
logger: ILogger;
|
|
68
|
-
onTokens: (result: ITokenResult) => Promise<void>;
|
|
69
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Every field and option a UAA row lacks, named in one error — or nothing.
|
|
153
|
+
* `serviceUrl` is not among them: the providers read the client and `uaaUrl`
|
|
154
|
+
* only. Without a strategy, `uaaClientSecret: ''` is a public client:
|
|
155
|
+
* `passcode` takes it as no secret; the other two rows' providers require a
|
|
156
|
+
* secret, so for them `''` is missing.
|
|
157
|
+
*/
|
|
158
|
+
export declare function uaaRefusal(check: UaaCheck): DestinationConfigError | undefined;
|
|
70
159
|
/**
|
|
71
160
|
* `jwt` / `authorization_code` → `AuthorizationCodeProvider`,
|
|
72
161
|
* `client_credentials` → `ClientCredentialsProvider`, `passcode` →
|
|
73
162
|
* `UaaPasscodeProvider`: the client from the key store, the seed from the
|
|
74
|
-
* session (not for `client_credentials`, whose row takes the client alone)
|
|
163
|
+
* session (not for `client_credentials`, whose row takes the client alone),
|
|
164
|
+
* the consumer's renewal for this grant, and the broker's persistence.
|
|
75
165
|
*
|
|
76
|
-
* Every field and option the row lacks is named in one error
|
|
77
|
-
* consumer's `authorization`
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* identity, which holds no secret field at all (`RowClient`).
|
|
83
|
-
*
|
|
84
|
-
* With the strategy's answer (`clientAuthentication`) no secret is required
|
|
85
|
-
* and none is passed: the provider authenticates its client with the answer.
|
|
166
|
+
* Every field and option the row lacks is named in one error
|
|
167
|
+
* (`uaaRefusal`), before the consumer's `authorization` or `renewal` is
|
|
168
|
+
* called. On the strategy path the client may be a certificate client's
|
|
169
|
+
* identity, which holds no secret field at all (`RowClient`). With the
|
|
170
|
+
* strategy's answer (`clientAuthentication`) no secret is required and none
|
|
171
|
+
* is passed: the provider authenticates its client with the answer.
|
|
86
172
|
*/
|
|
87
|
-
export declare function uaaProvider(row: UaaRow):
|
|
173
|
+
export declare function uaaProvider(row: UaaRow): RowBuild;
|
|
88
174
|
/** The OIDC grants: a client, and an issuer or explicit endpoints. */
|
|
89
175
|
export type OidcGrant = 'oidc_authorization_code' | 'device_code' | 'password' | 'token_exchange';
|
|
90
176
|
export declare function isOidcGrant(grant: DestinationGrant): grant is OidcGrant;
|
|
91
|
-
/** What an OIDC row
|
|
92
|
-
export interface
|
|
93
|
-
destination: string;
|
|
177
|
+
/** What an OIDC row's check reads. */
|
|
178
|
+
export interface OidcCheck extends ClientCheck {
|
|
94
179
|
grant: OidcGrant;
|
|
95
180
|
means: IConnectionConfig;
|
|
181
|
+
oidcAuthorization: ((destination: string) => IAuthorizationStrategy<OidcCallbackResult>) | undefined;
|
|
182
|
+
deviceCodePresenter: ((destination: string) => IDeviceCodePresenter) | undefined;
|
|
183
|
+
}
|
|
184
|
+
/** What an OIDC row is built from. */
|
|
185
|
+
export interface OidcRow extends Omit<OidcCheck, 'client' | 'clientAuthenticated'>, TokenRowOptions {
|
|
96
186
|
/** The client, from the key store's `getAuthorizationConfig`. */
|
|
97
187
|
client: RowClient | null;
|
|
98
188
|
/** The session secret — the seed; `null` when there is none, or it is not bound here. */
|
|
99
189
|
secret: IConfig | null;
|
|
100
190
|
/** The consumer strategy's answer: given, it replaces the secret. */
|
|
101
191
|
clientAuthentication?: IClientAuthentication;
|
|
102
|
-
oidcAuthorization: ((destination: string) => IAuthorizationStrategy<OidcCallbackResult>) | undefined;
|
|
103
|
-
deviceCodePresenter: ((destination: string) => IDeviceCodePresenter) | undefined;
|
|
104
|
-
logger: ILogger;
|
|
105
|
-
onTokens: (result: ITokenResult) => Promise<void>;
|
|
106
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Every field and option an OIDC row lacks, named in one error — or nothing.
|
|
195
|
+
* The endpoints: `oidcIssuerUrl`, from which the provider discovers them, or
|
|
196
|
+
* every explicit endpoint the row uses — without either the error names the
|
|
197
|
+
* issuer and the endpoints missing.
|
|
198
|
+
*/
|
|
199
|
+
export declare function oidcRefusal(check: OidcCheck): DestinationConfigError | undefined;
|
|
107
200
|
/**
|
|
108
201
|
* `jwt` / `oidc_authorization_code` → `OidcBrowserProvider`, `device_code` →
|
|
109
202
|
* `OidcDeviceFlowProvider`, `password` → `OidcPasswordProvider`,
|
|
110
203
|
* `token_exchange` → `OidcTokenExchangeProvider`: the client id (and secret,
|
|
111
204
|
* `''` being a public client) from the key store's client, the grant's data
|
|
112
|
-
* from its `oidc*` fields, the seed from the session
|
|
205
|
+
* from its `oidc*` fields, the seed from the session, the consumer's renewal
|
|
206
|
+
* for this grant, and the broker's persistence.
|
|
113
207
|
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* named in one error, before any collaborator is called. `token_exchange`
|
|
118
|
-
* takes one scope string: the stored scopes joined by a space.
|
|
208
|
+
* Every field and option the row lacks is named in one error
|
|
209
|
+
* (`oidcRefusal`), before any collaborator is called. `token_exchange` takes
|
|
210
|
+
* one scope string: the stored scopes joined by a space.
|
|
119
211
|
*/
|
|
120
|
-
export declare function oidcProvider(row: OidcRow):
|
|
212
|
+
export declare function oidcProvider(row: OidcRow): RowBuild;
|
|
121
213
|
/** The SAML grants: an identity provider's assertion, validated first. */
|
|
122
214
|
export type SamlGrant = 'saml2_pure' | 'saml2_bearer';
|
|
123
215
|
export declare function isSamlGrant(grant: DestinationGrant): grant is SamlGrant;
|
|
124
|
-
/** What a SAML row
|
|
125
|
-
export interface
|
|
126
|
-
destination: string;
|
|
216
|
+
/** What a SAML row's check reads. */
|
|
217
|
+
export interface SamlCheck extends ClientCheck {
|
|
127
218
|
grant: SamlGrant;
|
|
128
219
|
means: IConnectionConfig;
|
|
220
|
+
authorization: ((destination: string, grant: SamlGrant) => IAuthorizationStrategy<string>) | undefined;
|
|
221
|
+
samlCookies: ((destination: string) => (samlResponse: string) => Promise<string>) | undefined;
|
|
222
|
+
assertionReplayStore: ((destination: string) => IAssertionReplayStore) | undefined;
|
|
223
|
+
}
|
|
224
|
+
/** What a SAML row is built from. */
|
|
225
|
+
export interface SamlRow extends Omit<SamlCheck, 'client' | 'clientAuthenticated'>, TokenRowOptions {
|
|
129
226
|
/** `saml2_bearer`'s client, from the key store; `null` for `saml2_pure`. */
|
|
130
227
|
client: RowClient | null;
|
|
131
228
|
/** The session secret — the seed; `null` when there is none, or it is not bound here. */
|
|
132
229
|
secret: IConfig | null;
|
|
133
230
|
/** `saml2_bearer`: the consumer strategy's answer; given, it replaces the secret. */
|
|
134
231
|
clientAuthentication?: IClientAuthentication;
|
|
135
|
-
authorization: ((destination: string, grant: SamlGrant) => IAuthorizationStrategy<string>) | undefined;
|
|
136
|
-
samlCookies: ((destination: string) => (samlResponse: string) => Promise<string>) | undefined;
|
|
137
|
-
assertionReplayStore: ((destination: string) => IAssertionReplayStore) | undefined;
|
|
138
|
-
logger: ILogger;
|
|
139
|
-
onTokens: (result: ITokenResult) => Promise<void>;
|
|
140
232
|
}
|
|
233
|
+
/** Every field and option a SAML row lacks, named in one error — or nothing. */
|
|
234
|
+
export declare function samlRefusal(check: SamlCheck): DestinationConfigError | undefined;
|
|
141
235
|
/**
|
|
142
236
|
* `saml` / `saml2_pure` → `Saml2PureProvider`, `saml2_bearer` →
|
|
143
237
|
* `Saml2BearerProvider`, each validating the assertion before anything uses
|
|
@@ -152,13 +246,15 @@ export interface SamlRow {
|
|
|
152
246
|
* `saml2_bearer` with the stored token, its refresh token and expiry, and
|
|
153
247
|
* takes the client (`uaaUrl`, `uaaClientId`; without a strategy,
|
|
154
248
|
* `uaaClientSecret` `''` a public client; on the strategy path the identity
|
|
155
|
-
* alone, no secret) and `samlTokenUrl` when stated.
|
|
249
|
+
* alone, no secret) and `samlTokenUrl` when stated. Both take the consumer's
|
|
250
|
+
* renewal for their grant and the broker's persistence.
|
|
156
251
|
*
|
|
157
|
-
* Every field and option the row lacks is named in one error
|
|
158
|
-
* collaborator is called; so is a
|
|
159
|
-
*
|
|
160
|
-
* the value
|
|
252
|
+
* Every field and option the row lacks is named in one error
|
|
253
|
+
* (`samlRefusal`), before any collaborator is called; so is a
|
|
254
|
+
* `samlClockSkewMs` that is not a whole number of milliseconds, and a
|
|
255
|
+
* certificate the validator cannot read — by name, never the value, the
|
|
256
|
+
* validator's error carried.
|
|
161
257
|
*/
|
|
162
|
-
export declare function samlProvider(row: SamlRow):
|
|
258
|
+
export declare function samlProvider(row: SamlRow): RowBuild;
|
|
163
259
|
export {};
|
|
164
260
|
//# sourceMappingURL=destinations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destinations.d.ts","sourceRoot":"","sources":["../src/destinations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"destinations.d.ts","sourceRoot":"","sources":["../src/destinations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAOL,KAAK,oBAAoB,EAGzB,KAAK,kBAAkB,EAOvB,KAAK,eAAe,EAYrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,qBAAqB,EAErB,sBAAsB,EACtB,aAAa,EAEb,qBAAqB,EACrB,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,iBAAiB,EAClB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,KAAK,OAAO,EAA4B,MAAM,WAAW,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,KAAK,cAAc,GAAG,WAAW,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;AAmBjE;;;GAGG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,gBAAgB,GAAG,MAAM,CAGpC;AA+BD,qDAAqD;AACrD,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,iBAAiB,GAAG,IAAI,GAC9B,cAAc,CAmBhB;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CACzB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