@mcp-abap-adt/auth-broker 3.1.0 → 4.1.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +531 -0
  2. package/README.md +1062 -220
  3. package/dist/AuthBroker.d.ts +249 -30
  4. package/dist/AuthBroker.d.ts.map +1 -1
  5. package/dist/AuthBroker.js +681 -115
  6. package/dist/DestinationConfigError.d.ts +27 -0
  7. package/dist/DestinationConfigError.d.ts.map +1 -0
  8. package/dist/DestinationConfigError.js +36 -0
  9. package/dist/SessionWriter.d.ts +54 -0
  10. package/dist/SessionWriter.d.ts.map +1 -0
  11. package/dist/SessionWriter.js +135 -0
  12. package/dist/binding.d.ts +117 -0
  13. package/dist/binding.d.ts.map +1 -0
  14. package/dist/binding.js +223 -0
  15. package/dist/bindingOf.d.ts +37 -0
  16. package/dist/bindingOf.d.ts.map +1 -0
  17. package/dist/bindingOf.js +53 -0
  18. package/dist/clientAuthentication.d.ts +109 -0
  19. package/dist/clientAuthentication.d.ts.map +1 -0
  20. package/dist/clientAuthentication.js +218 -0
  21. package/dist/destinations.d.ts +164 -0
  22. package/dist/destinations.d.ts.map +1 -0
  23. package/dist/destinations.js +473 -0
  24. package/dist/index.d.ts +10 -4
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +14 -7
  27. package/dist/providers/ITokenProvider.d.ts +2 -1
  28. package/dist/providers/ITokenProvider.d.ts.map +1 -1
  29. package/dist/providers/index.d.ts +2 -2
  30. package/dist/providers/index.js +2 -2
  31. package/dist/stores/index.d.ts +2 -2
  32. package/dist/stores/index.js +2 -2
  33. package/dist/stores/interfaces.d.ts +4 -3
  34. package/dist/stores/interfaces.d.ts.map +1 -1
  35. package/dist/stores/interfaces.js +2 -2
  36. package/dist/types.d.ts +5 -2
  37. package/dist/types.d.ts.map +1 -1
  38. package/dist/types.js +3 -1
  39. package/package.json +16 -8
@@ -1,5 +1,15 @@
1
1
  /**
2
- * AuthBroker: tokens for a destination, from a provider, kept in a session store.
2
+ * AuthBroker: the credential for a destination, and tokens for one.
3
+ *
4
+ * `getProvider` builds the `IAuthProvider` a destination states, from the
5
+ * means its service key store holds and the secret its session store holds.
6
+ * Every token provider it builds writes what it obtains back to the session
7
+ * store through `onTokens` — the secret alone, retried by the broker when the
8
+ * store fails (`SessionWriter`); `flush()` reports what is still pending.
9
+ * The token API (`getToken`, `refreshToken`, `createTokenRefresher`) asks that
10
+ * same provider — one per destination, shared — or, when the consumer gives
11
+ * one, the consumer's provider, whose every answer it writes through the same
12
+ * path.
3
13
  *
4
14
  * The broker orchestrates and nothing more. It resolves what the stores know
5
15
  * about a destination, hands it to the provider, asks the provider for a token
@@ -8,8 +18,10 @@
8
18
  * pasted code) are the provider's decisions — made by its strategy — and the
9
19
  * broker does not repeat or override any of them.
10
20
  */
11
- import type { IRefreshableTokenProvider, ITokenRefresher } from '@mcp-abap-adt/interfaces-auth';
21
+ import type { IDeviceCodePresenter, OidcCallbackResult } from '@mcp-abap-adt/auth-providers';
22
+ import type { IAssertionReplayStore, IAuthorizationStrategy, IAuthProvider, IClientAuthentication, IRefreshableTokenProvider, ITokenRefresher } from '@mcp-abap-adt/interfaces-auth';
12
23
  import type { ILogger } from '@mcp-abap-adt/interfaces-utils';
24
+ import { type ClientAuthenticationStrategy } from './clientAuthentication';
13
25
  import type { IAuthorizationConfig, IConnectionConfig, IServiceKeyStore, ISessionStore } from './stores/interfaces';
14
26
  /**
15
27
  * Builds the provider for one destination, from what the stores hold for it.
@@ -20,25 +32,95 @@ import type { IAuthorizationConfig, IConnectionConfig, IServiceKeyStore, ISessio
20
32
  * - `connConfig`: the session's connection config, with `serviceUrl` resolved
21
33
  * and the last token the session stored, so the provider can reuse it while
22
34
  * it is valid.
35
+ * - `client` (optional): passed only beside a `clientAuthentication` strategy,
36
+ * for a destination whose grant authenticates a client — the strategy's
37
+ * answer, the client identity and the bound refresh token; never PEM. See
38
+ * `TokenProviderClient`. Without a strategy the factory gets three
39
+ * arguments, as 4.0.0.
23
40
  *
24
41
  * Called once per destination; the broker keeps the provider it returns.
25
42
  */
26
- export type TokenProviderFactory = (destination: string, authConfig: IAuthorizationConfig | null, connConfig: IConnectionConfig) => IRefreshableTokenProvider;
43
+ export type TokenProviderFactory = (destination: string, authConfig: IAuthorizationConfig | null, connConfig: IConnectionConfig, client?: TokenProviderClient) => IRefreshableTokenProvider;
44
+ /**
45
+ * The token API factory's fourth argument — present only when the broker was
46
+ * given a `clientAuthentication` strategy and the destination states a grant
47
+ * whose client authenticates; without one the factory is called with three
48
+ * arguments, as 4.0.0. It never carries a certificate, a key or a secret.
49
+ */
50
+ export interface TokenProviderClient {
51
+ /** The strategy's answer, resolved before the factory is called. */
52
+ readonly clientAuthentication?: IClientAuthentication;
53
+ /**
54
+ * The client's identity — the secret client's `uaaUrl` when the stores hold
55
+ * one, else the certificate client's; absent when there is neither.
56
+ */
57
+ readonly uaaUrl?: string;
58
+ /** The client id beside `uaaUrl`, from the same client. */
59
+ readonly clientId?: string;
60
+ /**
61
+ * The refresh token the session stored, only when the session is bound to
62
+ * this resource and this client identity — as `authConfig` carries it on
63
+ * the strategy path for a secret client, so a certificate client, whose
64
+ * `authConfig` is `null`, gets it too.
65
+ */
66
+ readonly refreshToken?: string;
67
+ }
68
+ /** The grants whose provider takes an `IAuthorizationStrategy<string>`. */
69
+ export type StrategyGrant = 'authorization_code' | 'passcode' | 'saml2_pure' | 'saml2_bearer';
27
70
  /**
28
71
  * Configuration object for the AuthBroker constructor
29
72
  */
30
73
  export interface AuthBrokerConfig {
31
- /** Session store (required) — where tokens and the refresh token are kept */
74
+ /**
75
+ * Session store (required) — the session secret: the token or cookies,
76
+ * `expiresAt`, the refresh token.
77
+ */
32
78
  sessionStore: ISessionStore;
33
- /** Service key store (optional) — UAA credentials and the service URL */
79
+ /**
80
+ * Service key store — the means: `authType`, `grantType`, the client,
81
+ * basic's user and password, the SNC fields, `serviceUrl`. `getProvider`
82
+ * needs it: there is no other source of means.
83
+ */
34
84
  serviceKeyStore?: IServiceKeyStore;
35
85
  /**
36
- * The token provider, or a factory building one per destination.
86
+ * The token API's source: the token provider, or a factory building one per
87
+ * destination. Not used by `getProvider`, which builds what the destination
88
+ * states.
37
89
  *
38
90
  * An instance is used as given, for every destination. A factory is seeded
39
91
  * with what the stores hold for the destination (see `TokenProviderFactory`).
40
92
  */
41
- provider: IRefreshableTokenProvider | TokenProviderFactory;
93
+ provider?: IRefreshableTokenProvider | TokenProviderFactory;
94
+ /** The interactive strategy of the UAA code, passcode and SAML grants. */
95
+ authorization?: (destination: string, grant: StrategyGrant) => IAuthorizationStrategy<string>;
96
+ /** The interactive strategy of the OIDC authorization code grant. */
97
+ oidcAuthorization?: (destination: string) => IAuthorizationStrategy<OidcCallbackResult>;
98
+ /** Where the device flow shows the user its code. */
99
+ deviceCodePresenter?: (destination: string) => IDeviceCodePresenter;
100
+ /** `saml2_pure`: turns the SAMLResponse into the system's session cookies. */
101
+ samlCookies?: (destination: string) => (samlResponse: string) => Promise<string>;
102
+ /** The replay store the SAML assertion validators share. */
103
+ assertionReplayStore?: (destination: string) => IAssertionReplayStore;
104
+ /**
105
+ * How a destination's client authenticates to the authorization server, for
106
+ * every grant that authenticates one (`ClientAuthenticationGrant`). Called
107
+ * once when the destination's provider is built, with the client the key
108
+ * store answers and its certificate, read only if the strategy asks.
109
+ *
110
+ * A given strategy always answers one, or throws: there is no "nothing"
111
+ * answer, so an explicit choice never falls back to the secret. A throw
112
+ * becomes a `DestinationConfigError` naming `clientAuthentication`, in fixed
113
+ * words. Absent: the client secret, as in 4.0.0, and nothing
114
+ * certificate-related is read. Shipped: `fromServiceKeyCertificate()`,
115
+ * `fromServiceKeySecret({ encoding })`.
116
+ *
117
+ * It applies to the providers the broker builds: `getProvider`'s, and the
118
+ * token API's `provider` factory, which gets its answer as a fourth
119
+ * argument (`TokenProviderClient`) for a grant that authenticates a client.
120
+ * An instance given as `provider` is already composed by the consumer, so
121
+ * the token API uses it as given and calls no strategy for it.
122
+ */
123
+ clientAuthentication?: ClientAuthenticationStrategy;
42
124
  }
43
125
  /**
44
126
  * AuthBroker manages authentication tokens for destinations
@@ -48,7 +130,30 @@ export declare class AuthBroker {
48
130
  private readonly serviceKeyStore;
49
131
  private readonly sessionStore;
50
132
  private readonly provider;
51
- private readonly providers;
133
+ /** A consumer factory's providers: the promise of the build, as `built`. */
134
+ private readonly consumerBuilt;
135
+ /**
136
+ * One cache per destination, shared by `getProvider` and — when the
137
+ * consumer gives no provider — the token API: the promise of the
138
+ * build, set before its first read.
139
+ */
140
+ private readonly built;
141
+ /**
142
+ * The write that failed for a result, keyed on the result the provider
143
+ * handed over and returns, then on the destination it was written
144
+ * for: the token API throws it to its caller, as 3.x did, while the broker
145
+ * keeps retrying. Dropped once a write of that result for that destination
146
+ * lands.
147
+ */
148
+ private readonly failedWrites;
149
+ private readonly authorization;
150
+ private readonly oidcAuthorization;
151
+ private readonly deviceCodePresenter;
152
+ private readonly samlCookies;
153
+ private readonly assertionReplayStore;
154
+ private readonly clientAuthentication;
155
+ /** getProvider's writes of the session secret, retried on their own. */
156
+ private readonly writer;
52
157
  /**
53
158
  * @param config Stores and the provider (instance or factory)
54
159
  * @param logger Optional logger. Nothing the broker logs contains a token.
@@ -58,36 +163,85 @@ export declare class AuthBroker {
58
163
  * A token for the destination: the provider's current one, which it refreshes
59
164
  * or obtains by login when it judges the cached one unusable.
60
165
  *
61
- * The result is written to the session store. Errors from the provider
62
- * (its typed errors included) propagate unchanged.
166
+ * Without a consumer `provider`, the provider is the one `getProvider` hands
167
+ * out for the destination — the same instance, so one token and one renewal
168
+ * serve both — and what it obtains is written by its `onTokens`. With one,
169
+ * the consumer's provider is asked and its answer written, as in 3.x — the
170
+ * secret alone.
171
+ *
172
+ * Errors from the provider (its typed errors included) propagate unchanged;
173
+ * so does a store failure, a failed write of the token included — the token
174
+ * stands and the broker keeps retrying the write.
175
+ *
176
+ * @throws DestinationConfigError for a destination the key store states as
177
+ * `basic` or `snc`, before any provider is asked; without a consumer
178
+ * `provider`, also for one whose provider obtains no token.
63
179
  */
64
180
  getToken(destination: string): Promise<string>;
65
181
  /**
66
182
  * A new token for the destination, never the cached one — for a caller whose
67
- * token the server has just refused. Calls the provider's `refreshTokens()`,
68
- * writes the result to the session store and returns it.
183
+ * token the server has just refused. Calls the provider's `refreshTokens()`;
184
+ * a renewal already in flight for the destination is joined, not repeated.
69
185
  */
70
186
  refreshToken(destination: string): Promise<string>;
71
187
  private obtain;
72
- private providerFor;
73
188
  /**
74
- * The credentials the provider is built with: the session's own when it holds
75
- * them, else the service key's, carrying the refresh token the session
76
- * stored. The session keeps a refresh token without credentials when the
77
- * credentials came from the service key, since the broker does not copy the
78
- * client secret into it; `loadSession` is where such a token is read.
189
+ * The destination's means, read first: a destination the key store states
190
+ * as `basic` or `snc` holds no token, so the token API refuses it before any
191
+ * provider is asked — it would write a token over a credential that is not
192
+ * one. A key store that states no `authType`, or no key store, is
193
+ * a 3.x setup, served as before.
79
194
  */
80
- private resolveAuthorizationConfig;
81
- private resolveServiceUrl;
195
+ private statedForTokens;
196
+ /** The token API on `getProvider`'s provider. */
197
+ private obtainShared;
198
+ /**
199
+ * The token API on the consumer's provider, as 3.x: the session read first,
200
+ * then the key store, for `serviceUrl` and the client; every answer — a
201
+ * cache hit included — written, the secret alone, through the broker's one
202
+ * write path.
203
+ */
204
+ private obtainFromConsumer;
205
+ /** The failure recorded for this result's write here, thrown as the store raised it. */
206
+ private throwFailedWrite;
82
207
  /**
83
- * Writes the result by its type: a SAML result is session cookies, anything
84
- * else a bearer token. The refresh token is written only when the result has
85
- * one, so a provider that returns none does not erase the stored one.
208
+ * The consumer's provider for the destination, cached per destination as a
209
+ * promise set before its first read and dropped when it throws, so
210
+ * the next call builds again: a factory's build — handed the client resolved
211
+ * then — or an instance as given, for every destination, handed no client.
212
+ * Either way the binding is fixed here, from the `serviceUrl`, SAP client and
213
+ * client of this first call, and kept with the provider.
214
+ */
215
+ private consumerProviderFor;
216
+ /**
217
+ * The token API's strategy path: with a `clientAuthentication` strategy and a
218
+ * destination stating a grant whose client authenticates, the strategy's
219
+ * answer — resolved inside the guard — and the client identity: the secret
220
+ * client, else the certificate client's, read through the context's memoised
221
+ * `readCertificate`. `null` without a strategy (4.0.0: nothing
222
+ * certificate-related is asked) and for a grant that authenticates no
223
+ * client (`saml2_pure`, `none`), as `getProvider` decides.
86
224
  *
87
- * `ITokenResult.expiresAt` has no field in `IConnectionConfig` to go to; the
88
- * provider seeded with the stored token reads the expiry from the JWT itself.
225
+ * The strategy is told the grant, so a destination that states none is
226
+ * refused before it is called rather than built without it. (An instance
227
+ * given as `provider` is the consumer's own composition: the strategy
228
+ * applies only to what the broker builds, so it is not used there.)
89
229
  */
90
- private persist;
230
+ private consumerClientAuthentication;
231
+ /**
232
+ * What a consumer's factory's credentials are composed from, read in the
233
+ * 3.x order: the session's authorization config; only when it has none, the
234
+ * session and then the key store's client. A session store of auth-stores 3
235
+ * answers no client, so the key store's is what is found.
236
+ */
237
+ private readAuthorization;
238
+ /** The session the store holds for the destination, or null. */
239
+ private loadStoredSession;
240
+ /**
241
+ * `serviceUrl` for a consumer's provider, in the 3.x order: the session's,
242
+ * else the key store's, else an error before the provider is asked.
243
+ */
244
+ private resolveServiceUrl;
91
245
  /**
92
246
  * A store read where absence is an answer and anything else is not.
93
247
  *
@@ -101,15 +255,80 @@ export declare class AuthBroker {
101
255
  */
102
256
  private read;
103
257
  /**
104
- * Authorization configuration for the destination: the session's, else the
105
- * service key's, else null.
258
+ * The destination's client: the service key store's `uaaUrl`, `uaaClientId`
259
+ * and `uaaClientSecret`, with the refresh token the session stores laid over
260
+ * them; `null` when the key store has no client. A client a session store
261
+ * answers is not read, nor a refresh token a key store answers.
106
262
  */
107
263
  getAuthorizationConfig(destination: string): Promise<IAuthorizationConfig | null>;
108
264
  /**
109
- * Connection configuration for the destination: the session's, else the
110
- * service key's (which has URLs but no token), else null.
265
+ * The destination's connection config: the service key store's means with
266
+ * the session's secret (`authorizationToken`, `sessionCookies`,
267
+ * `expiresAt`) and its binding (`issuedFor`, `issuedBy`) laid over them; `null` when neither store holds anything.
268
+ * Means a session store answers are not read, nor a secret a key store
269
+ * answers.
111
270
  */
112
271
  getConnectionConfig(destination: string): Promise<IConnectionConfig | null>;
272
+ /**
273
+ * The credential for the destination, ready for a connector: the provider
274
+ * its configuration states (`authType`, and `grantType` for `jwt` / `saml`),
275
+ * built from the means the service key store holds and the secret the
276
+ * session store holds.
277
+ *
278
+ * One provider per destination for the broker's life: concurrent first calls
279
+ * share one build, and a build that threw is tried again on the next call.
280
+ *
281
+ * A token provider (the UAA, OIDC and SAML grants) is seeded from the
282
+ * session when the stored secret is bound to this destination, and writes
283
+ * every token it obtains — at `prepare()`, on expiry, or in `rejected()` after
284
+ * a 401 — back to the session store before it answers (see `flush()`).
285
+ *
286
+ * @throws DestinationConfigError when the destination lacks what its type
287
+ * needs — naming the fields or options, never a value.
288
+ */
289
+ getProvider(destination: string): Promise<IAuthProvider>;
290
+ private build;
291
+ /**
292
+ * The stored secret when it is bound to this destination's resource and
293
+ * issuer, else `null`: the provider is then built as with no session
294
+ * and logs in afresh — the refresh token is not spent either. The log line
295
+ * names the destination only: never a URI, never a token.
296
+ */
297
+ private boundOrDiscarded;
298
+ /**
299
+ * Waits for the session writes still pending — each gets one more attempt —
300
+ * and rejects naming the destinations whose store still refuses. Call it on
301
+ * shutdown to know whether every token a provider obtained is stored; the
302
+ * broker keeps retrying after a rejection.
303
+ */
304
+ flush(): Promise<void>;
305
+ /**
306
+ * One write of the destination's session secret — and nothing else:
307
+ * `{ authorizationToken, expiresAt, refreshToken, issuedFor, issuedBy }` in
308
+ * one `saveSession` — or, for a `saml2_pure` result (`tokenType: 'saml'`),
309
+ * `{ sessionCookies, expiresAt, issuedFor, issuedBy }`: cookies are written
310
+ * as cookies, every other result as a token (`saml2_bearer` included). No means is ever written: not `serviceUrl`, not
311
+ * `authType`, not the client — they live in the key store, which the broker
312
+ * never writes.
313
+ *
314
+ * - `expiresAt`: fixed by `onTokens` when the result arrived — the result's
315
+ * own, else the `expiresIn` it reports counted from then (the rule the
316
+ * provider applies to its own cache).
317
+ * - `refreshToken`: the result's, else the one the session holds, read at
318
+ * write time, so a result without one does not erase the stored one — for
319
+ * a provider the broker built, only a stored one bound where this one is:
320
+ * a refresh token obtained for another resource or from another client is
321
+ * not carried into this secret. So too for a consumer's factory beside a
322
+ * `clientAuthentication` strategy, seeded only with a bound session. A
323
+ * consumer's provider without one was seeded with whatever the session
324
+ * held, so whatever it holds is carried (4.0.0).
325
+ * - `issuedFor` / `issuedBy`: the binding computed when the provider was
326
+ * built, each left out when the means lack its source — so the
327
+ * store clears it.
328
+ * - A destination the key store now states as `basic` or `snc` is not
329
+ * written: those obtain no session secret.
330
+ */
331
+ private writeSecret;
113
332
  /**
114
333
  * An `ITokenRefresher` for one destination, for injection into a connection:
115
334
  * `getToken()` is the broker's `getToken`, `refreshToken()` its forced
@@ -1 +1 @@
1
- {"version":3,"file":"AuthBroker.d.ts","sourceRoot":"","sources":["../src/AuthBroker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,yBAAyB,EACzB,eAAe,EAEhB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACd,MAAM,qBAAqB,CAAC;AAS7B;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,oBAAoB,GAAG,IAAI,EACvC,UAAU,EAAE,iBAAiB,KAC1B,yBAAyB,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,YAAY,EAAE,aAAa,CAAC;IAC5B,yEAAyE;IACzE,eAAe,C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