@mcp-abap-adt/interfaces-auth-broker 1.0.0 → 1.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.1.0] - 2026-10-02
11
+
12
+ ### Added
13
+
14
+ - **`IConnectionConfig.issuedFor` and `issuedBy`** (optional strings) — what a
15
+ stored secret is bound to: the canonical URI of the resource it was obtained
16
+ for (`https://host:443/path?sap-client=100`), and of who issued it to which
17
+ client (`<uaaUrl or issuer>?client_id=<id>`, or the ACS that set SAML
18
+ cookies). A session store keeps both beside the secret, written and cleared
19
+ with it; a key store never answers them. They are what
20
+ `@mcp-abap-adt/auth-broker` 4 compares before it presents a stored secret, so
21
+ a custom `ISessionStore` must persist them — see the README's note for store
22
+ authors. Optional: every 1.0.x implementation still satisfies the type.
23
+
24
+ ## [1.0.1] - 2026-10-02
25
+
26
+ ### Changed
27
+
28
+ - **Built from its own install.** The repository's packages are no longer npm
29
+ workspaces (#116): this package builds and type-checks against its
30
+ `@mcp-abap-adt/*` dependencies as published on the npm registry, never
31
+ against a sibling's source, and carries its own `typescript` and
32
+ `@types/node` as devDependencies. Its contract, its `dependencies` and the
33
+ files it ships are unchanged — nothing to do for a consumer.
34
+
10
35
  ## [1.0.0] - 2026-10-01
11
36
 
12
37
  ### Added
package/README.md CHANGED
@@ -10,7 +10,7 @@ npm install @mcp-abap-adt/interfaces-auth-broker
10
10
 
11
11
  | symbol | what it is |
12
12
  |---|---|
13
- | `IConnectionConfig` | a destination's connection settings, as a store hands them to the broker: `serviceUrl`, `sapClient`, `language`, the credential (`authorizationToken`, `username`/`password`, `sessionCookies`), `authType`, `grantType`, `expiresAt`, and the settings a grant needs — SNC (`snc*`), OIDC (`oidc*`) and the SAML IdP's trust (`saml*`) |
13
+ | `IConnectionConfig` | a destination's connection settings, as a store hands them to the broker: `serviceUrl`, `sapClient`, `language`, the credential (`authorizationToken`, `username`/`password`, `sessionCookies`), `authType`, `grantType`, `expiresAt`, what a stored secret is bound to (`issuedFor`, `issuedBy`), and the settings a grant needs — SNC (`snc*`), OIDC (`oidc*`) and the SAML IdP's trust (`saml*`) |
14
14
  | `DestinationGrant` | how a destination obtains a new credential: the UAA, OIDC and SAML grants, or `'none'` — handed over, not renewed |
15
15
  | `IConfig` | `Partial<IAuthorizationConfig> & Partial<IConnectionConfig>` — what a session store loads and saves |
16
16
  | `ISessionStore` | loads, saves and updates a destination's session |
@@ -38,6 +38,19 @@ Kept apart, a release of the destination — new grant settings for the broker
38
38
  no longer asks every provider and connection to follow, and a change to the
39
39
  SAP system's configuration no longer reaches the stores.
40
40
 
41
+ ## For store authors: the secret's binding (1.1.0)
42
+
43
+ A session store keeps two strings beside the secret — `issuedFor`, the
44
+ canonical URI of the resource the secret was obtained for, and `issuedBy`, the
45
+ canonical URI of who issued it and to which client — written and cleared with
46
+ the secret. The broker (`@mcp-abap-adt/auth-broker` 4) uses a stored secret
47
+ only when both equal what the destination's means give, so a secret never goes
48
+ to another resource and a secret from another issuer is never used in place of
49
+ this one. **A custom `ISessionStore` (a database, a message log, a secret store)
50
+ must persist both fields**; one that drops them still type-checks, but the
51
+ broker then never uses its sessions — every process start logs in afresh, a
52
+ browser each time for an interactive grant. A key store never answers them.
53
+
41
54
  ## Where these contracts were
42
55
 
43
56
  `@mcp-abap-adt/interfaces-auth-sap`, until its 2.0.0 — same names, same shapes;
@@ -24,6 +24,25 @@ export interface IConnectionConfig {
24
24
  * provider reported it. A JWT carries its own `exp`; session cookies do not.
25
25
  */
26
26
  expiresAt?: number;
27
+ /**
28
+ * The canonical URI of the resource the secret was obtained for: scheme and
29
+ * host lower-cased, the port explicit, the path without a trailing `/`, the
30
+ * SAP client as `sap-client=<n>` when the destination states one, nothing
31
+ * else (`https://my-abap.example.com:443/sap/bc/adt?sap-client=100`). A
32
+ * session store keeps it with the secret, written and cleared with it; a key
33
+ * store never answers it. Compared as a string: whoever presents the secret
34
+ * compares it with the URI of the resource it is about to be presented to,
35
+ * and uses the secret only when they are equal.
36
+ */
37
+ issuedFor?: string;
38
+ /**
39
+ * The canonical URI of who issued the secret, and to which client — the same
40
+ * rules: for an OAuth/OIDC token the authorization server and the client
41
+ * (`<uaaUrl or issuer>?client_id=<clientId>`), for SAML session cookies the
42
+ * ACS of the system that set them (origin and path). Kept, written, cleared
43
+ * and compared like `issuedFor`.
44
+ */
45
+ issuedBy?: string;
27
46
  /** SAP client number (optional, for ABAP/BTP) */
28
47
  sapClient?: string;
29
48
  /** Language (optional, for ABAP/BTP) */
@@ -1 +1 @@
1
- {"version":3,"file":"IConnectionConfig.d.ts","sourceRoot":"","sources":["../../src/auth/IConnectionConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;IAC5C,8FAA8F;IAC9F,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAC;IAIxB,qDAAqD;IACrD,cAAc,CAAC,EAAE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,MAAM,CAAC;IAC9B,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAG5B,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/interfaces-auth-broker",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "The broker's port: the destination (IConnectionConfig, DestinationGrant, IConfig) and the stores that hold it",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -37,5 +37,9 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@mcp-abap-adt/interfaces-auth-sap": "^2.0.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^24.2.1",
43
+ "typescript": "^5.9.2"
40
44
  }
41
45
  }