axiam-sdk 1.0.0-beta07 → 1.0.0-beta08
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/README.md +80 -8
- package/dist/browser/index.d.cts +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/{client-Djmfy2Wz.d.cts → client-B9LCNDZU.d.cts} +158 -0
- package/dist/{client-RqlANL2T.d.ts → client-BFqBPSDN.d.ts} +158 -0
- package/dist/{cookieJar-BWoZxJLO.d.cts → cookieJar-HiQexIdT.d.cts} +1 -1
- package/dist/{cookieJar-V4kHLAnX.d.ts → cookieJar-V5ZtsCJk.d.ts} +1 -1
- package/dist/grpc/index.d.cts +3 -3
- package/dist/grpc/index.d.ts +3 -3
- package/dist/grpc/index.js.map +1 -1
- package/dist/grpc/index.mjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/middleware/index.d.cts +2 -2
- package/dist/middleware/index.d.ts +2 -2
- package/dist/middleware/index.js +218 -0
- package/dist/middleware/index.js.map +1 -1
- package/dist/middleware/index.mjs +214 -1
- package/dist/middleware/index.mjs.map +1 -1
- package/dist/node/index.d.cts +3 -3
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +222 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +214 -1
- package/dist/node/index.mjs.map +1 -1
- package/dist/{oidcState-irUgXhRo.d.ts → oidcState-CsDlOyeU.d.ts} +259 -1
- package/dist/{oidcState-DKX3dJ8i.d.cts → oidcState-Ox2WiunH.d.cts} +259 -1
- package/dist/rest/index.d.cts +2 -2
- package/dist/rest/index.d.ts +2 -2
- package/dist/rest/index.js.map +1 -1
- package/dist/rest/index.mjs.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -20,10 +20,17 @@ Official TypeScript/JavaScript client SDK for [AXIAM](https://github.com/ilpanic
|
|
|
20
20
|
|
|
21
21
|
## Contract conformance
|
|
22
22
|
|
|
23
|
-
This SDK conforms to CONTRACT.md §1–§13 and §12.7, §14, §15, §17, §19,
|
|
24
|
-
§24, §25, §26, §27 (including §6.1 mTLS client certificates, the §10.1
|
|
25
|
-
local-verification set, the §12 OIDC/SSO relying-party helpers, and the §13
|
|
26
|
-
`verifyWebhook` signature verifier).
|
|
23
|
+
This SDK conforms to **contract 1.38**: CONTRACT.md §1–§13 and §12.7, §14, §15, §17, §19,
|
|
24
|
+
§20, §21, §22, §23, §24, §25, §26, §27 (including §6.1 mTLS client certificates, the §10.1
|
|
25
|
+
minimum local-verification set, the §12 OIDC/SSO relying-party helpers, and the §13
|
|
26
|
+
`verifyWebhook` signature verifier). §12 is implemented in full at its 1.38 shape: all
|
|
27
|
+
**thirteen** operations, including the four public "Sign in with X" entry points.
|
|
28
|
+
|
|
29
|
+
**§12's operations live on `OidcClient`, not on `AxiamClient`** — the separate host §12.2
|
|
30
|
+
permits where a packaging constraint requires one, which here is CI's proof that a `/rest`
|
|
31
|
+
browser bundle pulls in no Node-only code. §12.2 forbids splitting them across two hosts, so
|
|
32
|
+
the four operations contract 1.38 adds are on `OidcClient` too, with the nine that preceded
|
|
33
|
+
them, even though three of them need no Node-only code at all.
|
|
27
34
|
|
|
28
35
|
§27 is implemented **in full**, both halves: the 147-operation imperative surface *and*
|
|
29
36
|
the §27.6 declarative manifest with its §27.7 `defineManifest` and decorator forms. The
|
|
@@ -621,9 +628,11 @@ in `examples/` at the package root.
|
|
|
621
628
|
|
|
622
629
|
Everything a backend needs to offer **"Login with AXIAM"** — authorization code + PKCE
|
|
623
630
|
against AXIAM's own OIDC provider — plus service-account M2M login, token
|
|
624
|
-
introspection/revocation,
|
|
625
|
-
|
|
626
|
-
|
|
631
|
+
introspection/revocation, the upstream-IdP federation endpoints, and — as of **contract
|
|
632
|
+
1.38** — the four public "Sign in with X" entry points. Node-only: PKCE uses `node:crypto`
|
|
633
|
+
and ID-token validation uses `jose`, so these deliberately do not hang off the browser-safe
|
|
634
|
+
`AxiamClient` (a `/rest` browser bundle stays free of Node code, proven by CI). §12.2 forbids
|
|
635
|
+
splitting the vocabulary across two hosts, so **all thirteen** are on `OidcClient`.
|
|
627
636
|
|
|
628
637
|
```typescript
|
|
629
638
|
import { createNodeSession, createOidcClient, MemoryOidcStateStore } from 'axiam-sdk/node';
|
|
@@ -638,7 +647,7 @@ const oidc = createOidcClient(session, {
|
|
|
638
647
|
});
|
|
639
648
|
```
|
|
640
649
|
|
|
641
|
-
### The
|
|
650
|
+
### The thirteen operations
|
|
642
651
|
|
|
643
652
|
| Operation | Wire call | Notes |
|
|
644
653
|
|-----------|-----------|-------|
|
|
@@ -651,6 +660,69 @@ const oidc = createOidcClient(session, {
|
|
|
651
660
|
| `revoke({ token, tokenTypeHint?, tenantId?, configuration? })` | `POST /oauth2/revoke?tenant_id=…` | RFC 7009; returns `void` and is **idempotent** — a `200` for an unknown token is success |
|
|
652
661
|
| `ssoStart({ federationConfigId, redirectUri, tenantId?/tenantSlug?, orgId?/orgSlug? })` | `POST /api/v1/auth/federation/oidc/start` | Upstream-IdP SSO step 1; returns `{ authorizeUrl, state, expiresInSecs }` |
|
|
653
662
|
| `ssoComplete({ state, code })` | `POST /api/v1/auth/federation/oidc/callback` | Step 2; the session arrives as `Set-Cookie`, so it needs the cookie-jar-backed Node session |
|
|
663
|
+
| `ssoProviders({ orgId?/orgSlug?, tenantId?/tenantSlug? })` | `GET /api/v1/auth/federation/providers` | Which "Sign in with X" buttons to render. Identifiers go in the **query string**, not a body. An **empty list is a success** — see below |
|
|
664
|
+
| `ssoStartOauth2({ federationConfigId, redirectUri, tenantId?/tenantSlug?, orgId?/orgSlug? })` | `POST /api/v1/auth/federation/oauth2/start` | Step 1 through a **plain-OAuth2** upstream (GitHub, Facebook, `generic_oauth2`). PKCE is mandatory here and is generated and held **server-side**, so the SDK computes no verifier and sends no challenge |
|
|
665
|
+
| `ssoCompleteOauth2({ state, code })` | `POST /api/v1/auth/federation/oauth2/callback` | Step 2 of the OAuth2 variant; same `Set-Cookie` session and same post-login sync as `ssoComplete` |
|
|
666
|
+
| `ssoCompleteHandoff({ code })` | `POST /api/v1/auth/federation/handoff` | Redeems the single-use `axiam_handoff` code the SAML and Apple flows deliver on the SPA's callback URL. Valid 60 s, redeemable **once**; a `401` is terminal and is **never retried** |
|
|
667
|
+
|
|
668
|
+
#### The four public login-provider operations, and their rules
|
|
669
|
+
|
|
670
|
+
**An empty provider list is a success** (§12.1 note 9). An unknown organization, a known one
|
|
671
|
+
with nothing configured, and a request naming no workspace at all *all* answer `200` with an
|
|
672
|
+
empty array. `ssoProviders` returns every one of them as an ordinary result and never
|
|
673
|
+
synthesises a not-found: the endpoint is deliberately shaped so it cannot be used to
|
|
674
|
+
enumerate organization or tenant slugs, and telling the three apart client-side would rebuild
|
|
675
|
+
that oracle. For the same reason `ssoProviders` is the one federation operation that does
|
|
676
|
+
**not** refuse client-side when no workspace resolves — it sends the request. You learn you
|
|
677
|
+
named the workspace wrongly at the start operations, where every failure is a uniform `401`.
|
|
678
|
+
|
|
679
|
+
**`protocol` selects which start operation to call** (§12.1 note 10) — never `providerKind`,
|
|
680
|
+
which is branding:
|
|
681
|
+
|
|
682
|
+
| `provider.protocol` | call |
|
|
683
|
+
|---|---|
|
|
684
|
+
| `OidcConnect` (`PROTOCOL_OIDC_CONNECT`) | `ssoStart` |
|
|
685
|
+
| `OAuth2` (`PROTOCOL_OAUTH2`) | `ssoStartOauth2` |
|
|
686
|
+
| `Saml` (`PROTOCOL_SAML`) | the SAML login endpoint — not a §12 vocabulary operation |
|
|
687
|
+
|
|
688
|
+
The server refuses a mismatch with `400` rather than accepting it silently, so a client that
|
|
689
|
+
assumes OIDC fails on every GitHub button. An `OAuth2` provider also issues **no ID token**:
|
|
690
|
+
the server authenticates by calling a configured userinfo endpoint, so there is no signature,
|
|
691
|
+
no `nonce` and no `aud`. A UI rendering these buttons should make that distinction visible
|
|
692
|
+
rather than presenting the two as equivalent.
|
|
693
|
+
|
|
694
|
+
**`FederationProvider` is modelled faithfully** — `id`, `providerKind`, `displayName`,
|
|
695
|
+
`protocol`, `hasBundledMark`, `inherited`, and the optional `buttonIcon` (a `data:` URL,
|
|
696
|
+
absent for most providers). Inheritance from the organization is resolved **server-side**
|
|
697
|
+
(§12.1 note 13): pass back the workspace and the `id` `ssoProviders` gave you, and compute
|
|
698
|
+
nothing locally. `inherited` is reported so an admin surface can show that a provider is not
|
|
699
|
+
the tenant's to edit.
|
|
700
|
+
|
|
701
|
+
**A `400` from a start call is a configuration refusal** (§12.1 rule 12a). On the SAML and
|
|
702
|
+
Apple flows the identity provider never validates the SPA `redirectUri`, so the server
|
|
703
|
+
confines it to its own issuer origin plus `AXIAM__AUTH__SSO_SPA_ORIGINS`. That refusal
|
|
704
|
+
surfaces as **`NetworkError`** — §2's `400` row, the taxonomy's configuration/programming-error
|
|
705
|
+
member, as distinct from the `AuthError` a `401` gets — and is not retried, because the same
|
|
706
|
+
origin will be refused again. Never build a `redirectUri` out of anything the identity
|
|
707
|
+
provider supplied.
|
|
708
|
+
|
|
709
|
+
```typescript
|
|
710
|
+
import { PROTOCOL_OAUTH2, PROTOCOL_OIDC_CONNECT, HANDOFF_QUERY_PARAM } from 'axiam-sdk/node';
|
|
711
|
+
|
|
712
|
+
const { providers } = await oidc.ssoProviders({ orgSlug });
|
|
713
|
+
// Empty is normal: render a password form, not an error.
|
|
714
|
+
for (const p of providers) {
|
|
715
|
+
if (p.protocol === PROTOCOL_OIDC_CONNECT) {
|
|
716
|
+
const { authorizeUrl } = await oidc.ssoStart({ federationConfigId: p.id, redirectUri });
|
|
717
|
+
} else if (p.protocol === PROTOCOL_OAUTH2) {
|
|
718
|
+
const { authorizeUrl } = await oidc.ssoStartOauth2({ federationConfigId: p.id, redirectUri });
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
// SAML / Apple come back through a handoff code on your own callback route.
|
|
723
|
+
const code = new URL(req.url, base).searchParams.get(HANDOFF_QUERY_PARAM);
|
|
724
|
+
const session = await oidc.ssoCompleteHandoff({ code }); // once, never retried
|
|
725
|
+
```
|
|
654
726
|
|
|
655
727
|
Wire details worth knowing: the token/introspection/revocation endpoints are
|
|
656
728
|
**form-encoded** (not JSON) and take `tenant_id` as a **required query parameter** in **UUID**
|
package/dist/browser/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AxiamClient, W as WebauthnWorkspace, a as WebauthnLoginResult, b as WebauthnCredential } from '../client-
|
|
1
|
+
import { A as AxiamClient, W as WebauthnWorkspace, a as WebauthnLoginResult, b as WebauthnCredential } from '../client-B9LCNDZU.cjs';
|
|
2
2
|
export { W as WebauthnFailure, c as classifyWebauthnError, w as webauthnErrorMessage } from '../webauthnErrors-fLgfOflO.cjs';
|
|
3
3
|
import '../sensitive-BC_s7Rrd.cjs';
|
|
4
4
|
import '../session-BIRL5RKr.cjs';
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AxiamClient, W as WebauthnWorkspace, a as WebauthnLoginResult, b as WebauthnCredential } from '../client-
|
|
1
|
+
import { A as AxiamClient, W as WebauthnWorkspace, a as WebauthnLoginResult, b as WebauthnCredential } from '../client-BFqBPSDN.js';
|
|
2
2
|
export { W as WebauthnFailure, c as classifyWebauthnError, w as webauthnErrorMessage } from '../webauthnErrors-fLgfOflO.js';
|
|
3
3
|
import '../sensitive-BC_s7Rrd.js';
|
|
4
4
|
import '../session-DU6fggqX.js';
|
|
@@ -1067,13 +1067,44 @@ interface CreateCertificateRequest {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
/** `CreateFederationConfigRequest` (generated from openapi.json). */
|
|
1069
1069
|
interface CreateFederationConfigRequest {
|
|
1070
|
+
/**
|
|
1071
|
+
* Whether tenants of this organization may inherit this provider. Only
|
|
1072
|
+
* meaningful on a config in the organization-scope tenant.
|
|
1073
|
+
*/
|
|
1074
|
+
allow_tenant_inheritance?: boolean | null;
|
|
1070
1075
|
/**
|
|
1071
1076
|
* Accepted JWT signing algorithms (OIDC) or signature algorithms (SAML).
|
|
1072
1077
|
* Defaults to `["RS256"]` when not provided (CQ-B40/REQ-14 AC-5).
|
|
1073
1078
|
*/
|
|
1074
1079
|
allowed_algorithms?: string[] | null;
|
|
1080
|
+
/**
|
|
1081
|
+
* External IdP tenant identifiers accepted when the provider publishes a
|
|
1082
|
+
* templated issuer (Entra ID's `{tenantid}`).
|
|
1083
|
+
*/
|
|
1084
|
+
allowed_issuer_tenants?: string[] | null;
|
|
1085
|
+
/**
|
|
1086
|
+
* Apple Key ID of the `.p8` signing key (10 characters). With both Apple
|
|
1087
|
+
* identifiers set, `client_secret` is the `.p8` key itself and AXIAM mints a
|
|
1088
|
+
* fresh five-minute client secret per token exchange.
|
|
1089
|
+
*/
|
|
1090
|
+
apple_key_id?: string | null;
|
|
1091
|
+
/** Apple Team ID (10 characters). */
|
|
1092
|
+
apple_team_id?: string | null;
|
|
1075
1093
|
/** Maps external IdP attributes to AXIAM user fields. */
|
|
1076
1094
|
attribute_map?: unknown;
|
|
1095
|
+
/** OAuth2-variant authorization endpoint. Required for `OAuth2`. */
|
|
1096
|
+
authorization_endpoint?: string | null;
|
|
1097
|
+
/**
|
|
1098
|
+
* Sign-in-button icon for a **generic** provider, as a base64 raster data
|
|
1099
|
+
* URL (`data:image/png;base64,…`), already cropped to
|
|
1100
|
+
* `PROVIDER_ICON_SIZE_PX` square by the client.
|
|
1101
|
+
*
|
|
1102
|
+
* Refused for the branded kinds: Google, Apple and Microsoft all publish
|
|
1103
|
+
* sign-in-button rules that require their own mark, so substituting a
|
|
1104
|
+
* picture would produce a button that breaks the guidelines it exists to
|
|
1105
|
+
* follow.
|
|
1106
|
+
*/
|
|
1107
|
+
button_icon?: string | null;
|
|
1077
1108
|
/** OAuth2 client ID registered with the external IdP. */
|
|
1078
1109
|
client_id: string;
|
|
1079
1110
|
/**
|
|
@@ -1094,8 +1125,31 @@ interface CreateFederationConfigRequest {
|
|
|
1094
1125
|
protocol: string;
|
|
1095
1126
|
/** Display name for the identity provider (e.g., "Google", "Okta"). */
|
|
1096
1127
|
provider: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* Which provider this is: `google`, `github`, `facebook`, `apple`,
|
|
1130
|
+
* `microsoft`, `generic_oidc`, `generic_oauth2` or `generic_saml`.
|
|
1131
|
+
*
|
|
1132
|
+
* Selects the sign-in button's branding, the per-kind defaults, and the key
|
|
1133
|
+
* on which a tenant config overrides an inherited organization one. Omitted
|
|
1134
|
+
* ⇒ derived from `protocol`, which is what every config written before this
|
|
1135
|
+
* field existed means.
|
|
1136
|
+
*/
|
|
1137
|
+
provider_kind?: string | null;
|
|
1138
|
+
/**
|
|
1139
|
+
* Operator-chosen identifier, **required** for the `generic_*` kinds and
|
|
1140
|
+
* refused for the branded ones.
|
|
1141
|
+
*/
|
|
1142
|
+
provider_slug?: string | null;
|
|
1143
|
+
/** Send PKCE on the authorization request. Forced on for `OAuth2`. */
|
|
1144
|
+
require_pkce?: boolean | null;
|
|
1145
|
+
/** Scopes to request. Omitted or empty ⇒ the per-kind default. */
|
|
1146
|
+
scopes?: string[] | null;
|
|
1147
|
+
/** OAuth2-variant token endpoint. Required for `OAuth2`. */
|
|
1148
|
+
token_endpoint?: string | null;
|
|
1097
1149
|
/** `token_exchange`. */
|
|
1098
1150
|
token_exchange?: TokenExchangeTrustRequest | null;
|
|
1151
|
+
/** OAuth2-variant userinfo endpoint. Required for `OAuth2`. */
|
|
1152
|
+
userinfo_endpoint?: string | null;
|
|
1099
1153
|
}
|
|
1100
1154
|
/**
|
|
1101
1155
|
* Wire twin of {@link CreateFederationConfigRequest} — plain strings, never
|
|
@@ -1105,15 +1159,27 @@ interface CreateFederationConfigRequest {
|
|
|
1105
1159
|
* because a consumer should read it.
|
|
1106
1160
|
*/
|
|
1107
1161
|
interface CreateFederationConfigRequestWire {
|
|
1162
|
+
allow_tenant_inheritance?: boolean | null;
|
|
1108
1163
|
allowed_algorithms?: string[] | null;
|
|
1164
|
+
allowed_issuer_tenants?: string[] | null;
|
|
1165
|
+
apple_key_id?: string | null;
|
|
1166
|
+
apple_team_id?: string | null;
|
|
1109
1167
|
attribute_map?: unknown;
|
|
1168
|
+
authorization_endpoint?: string | null;
|
|
1169
|
+
button_icon?: string | null;
|
|
1110
1170
|
client_id: string;
|
|
1111
1171
|
client_secret: string;
|
|
1112
1172
|
idp_signing_cert_pem?: string | null;
|
|
1113
1173
|
metadata_url?: string | null;
|
|
1114
1174
|
protocol: string;
|
|
1115
1175
|
provider: string;
|
|
1176
|
+
provider_kind?: string | null;
|
|
1177
|
+
provider_slug?: string | null;
|
|
1178
|
+
require_pkce?: boolean | null;
|
|
1179
|
+
scopes?: string[] | null;
|
|
1180
|
+
token_endpoint?: string | null;
|
|
1116
1181
|
token_exchange?: TokenExchangeTrustRequest | null;
|
|
1182
|
+
userinfo_endpoint?: string | null;
|
|
1117
1183
|
}
|
|
1118
1184
|
/**
|
|
1119
1185
|
* Unwrap a `CreateFederationConfigRequest` for the wire.
|
|
@@ -1572,28 +1638,84 @@ interface EncryptedExport {
|
|
|
1572
1638
|
type FailurePolicy = "fail_closed" | "fail_open" | (string & {});
|
|
1573
1639
|
/** Federation config response -- omits client_secret. */
|
|
1574
1640
|
interface FederationConfigResponse {
|
|
1641
|
+
/** Whether tenants of this organization may inherit this provider. */
|
|
1642
|
+
allow_tenant_inheritance: boolean;
|
|
1643
|
+
/**
|
|
1644
|
+
* Accepted signing algorithms. Returned for OIDC and SAML; meaningless, and
|
|
1645
|
+
* therefore empty, for the OAuth2 variant.
|
|
1646
|
+
*/
|
|
1647
|
+
allowed_algorithms: string[];
|
|
1648
|
+
/** Accepted external IdP tenants for a templated issuer. */
|
|
1649
|
+
allowed_issuer_tenants: string[];
|
|
1650
|
+
/** Apple Key ID. */
|
|
1651
|
+
apple_key_id?: string | null;
|
|
1652
|
+
/** Apple Team ID. Not secret — the `.p8` key is, and it is never returned. */
|
|
1653
|
+
apple_team_id?: string | null;
|
|
1575
1654
|
/** `attribute_map`. */
|
|
1576
1655
|
attribute_map: unknown;
|
|
1656
|
+
/** OAuth2-variant authorization endpoint. */
|
|
1657
|
+
authorization_endpoint?: string | null;
|
|
1658
|
+
/** Custom sign-in-button icon, when one is set. */
|
|
1659
|
+
button_icon?: string | null;
|
|
1577
1660
|
/** `client_id`. */
|
|
1578
1661
|
client_id: string;
|
|
1579
1662
|
/** `created_at`. */
|
|
1580
1663
|
created_at: string;
|
|
1664
|
+
/**
|
|
1665
|
+
* The per-kind default that an empty `scopes` resolves to. Returned so the
|
|
1666
|
+
* admin UI can show what will actually be requested without duplicating the
|
|
1667
|
+
* table.
|
|
1668
|
+
*/
|
|
1669
|
+
effective_scopes: string[];
|
|
1581
1670
|
/** `enabled`. */
|
|
1582
1671
|
enabled: boolean;
|
|
1672
|
+
/**
|
|
1673
|
+
* Whether AXIAM ships this provider's own mark. When true the button uses it
|
|
1674
|
+
* and `button_icon` is refused; when false the button reads "Sign in with
|
|
1675
|
+
* <provider>" and may carry a custom icon.
|
|
1676
|
+
*/
|
|
1677
|
+
has_bundled_mark: boolean;
|
|
1583
1678
|
/** `id`. */
|
|
1584
1679
|
id: string;
|
|
1585
1680
|
/** `metadata_url`. */
|
|
1586
1681
|
metadata_url?: string | null;
|
|
1682
|
+
/**
|
|
1683
|
+
* Whether AXIAM mints this provider's client secret itself, per exchange,
|
|
1684
|
+
* rather than sending a stored one. True only for an Apple config with both
|
|
1685
|
+
* identifiers set.
|
|
1686
|
+
*/
|
|
1687
|
+
mints_client_secret: boolean;
|
|
1688
|
+
/**
|
|
1689
|
+
* Whether PKCE is sent on the authorization request. Always true for the
|
|
1690
|
+
* OAuth2 variant regardless of the stored flag.
|
|
1691
|
+
*/
|
|
1692
|
+
pkce_required: boolean;
|
|
1587
1693
|
/** `protocol`. */
|
|
1588
1694
|
protocol: string;
|
|
1589
1695
|
/** `provider`. */
|
|
1590
1696
|
provider: string;
|
|
1697
|
+
/**
|
|
1698
|
+
* Which provider this is. Derived from `protocol` for a config written
|
|
1699
|
+
* before the field existed.
|
|
1700
|
+
*/
|
|
1701
|
+
provider_kind: string;
|
|
1702
|
+
/** Operator-chosen identifier for a `generic_*` kind. */
|
|
1703
|
+
provider_slug?: string | null;
|
|
1704
|
+
/**
|
|
1705
|
+
* Scopes as stored. Empty means "use the per-kind default"; see
|
|
1706
|
+
* `effective_scopes`.
|
|
1707
|
+
*/
|
|
1708
|
+
scopes: string[];
|
|
1591
1709
|
/** `tenant_id`. */
|
|
1592
1710
|
tenant_id: string;
|
|
1711
|
+
/** OAuth2-variant token endpoint. */
|
|
1712
|
+
token_endpoint?: string | null;
|
|
1593
1713
|
/** X4 external token-exchange trust. */
|
|
1594
1714
|
token_exchange: TokenExchangeTrustResponse;
|
|
1595
1715
|
/** `updated_at`. */
|
|
1596
1716
|
updated_at: string;
|
|
1717
|
+
/** OAuth2-variant userinfo endpoint. */
|
|
1718
|
+
userinfo_endpoint?: string | null;
|
|
1597
1719
|
}
|
|
1598
1720
|
/** `FederationLinkResponse` (generated from openapi.json). */
|
|
1599
1721
|
interface FederationLinkResponse {
|
|
@@ -3323,10 +3445,22 @@ type UnknownAaguidAction = "allow" | "deny" | (string & {});
|
|
|
3323
3445
|
* than sent as `null` (§27.4 rule 5).
|
|
3324
3446
|
*/
|
|
3325
3447
|
interface UpdateFederationConfigRequest {
|
|
3448
|
+
/** Whether tenants may inherit this organization-level provider. */
|
|
3449
|
+
allow_tenant_inheritance?: boolean | null;
|
|
3326
3450
|
/** Accepted signature algorithms (CQ-B40/REQ-14 AC-5). */
|
|
3327
3451
|
allowed_algorithms?: string[] | null;
|
|
3452
|
+
/** Accepted external IdP tenants for a templated issuer. Replaced wholesale. */
|
|
3453
|
+
allowed_issuer_tenants?: string[] | null;
|
|
3454
|
+
/** Apple Key ID. `Some(None)` clears it. */
|
|
3455
|
+
apple_key_id?: string | null;
|
|
3456
|
+
/** Apple Team ID. `Some(None)` clears it. */
|
|
3457
|
+
apple_team_id?: string | null;
|
|
3328
3458
|
/** `attribute_map`. */
|
|
3329
3459
|
attribute_map?: unknown;
|
|
3460
|
+
/** OAuth2-variant authorization endpoint. `Some(None)` clears it. */
|
|
3461
|
+
authorization_endpoint?: string | null;
|
|
3462
|
+
/** Sign-in-button icon for a generic provider. `Some(None)` clears it. */
|
|
3463
|
+
button_icon?: string | null;
|
|
3330
3464
|
/** `client_id`. */
|
|
3331
3465
|
client_id?: string | null;
|
|
3332
3466
|
/**
|
|
@@ -3347,8 +3481,21 @@ interface UpdateFederationConfigRequest {
|
|
|
3347
3481
|
metadata_url?: string | null;
|
|
3348
3482
|
/** `provider`. */
|
|
3349
3483
|
provider?: string | null;
|
|
3484
|
+
/** Operator-chosen identifier for a `generic_*` kind. `Some(None)` clears it. */
|
|
3485
|
+
provider_slug?: string | null;
|
|
3486
|
+
/** Send PKCE on the authorization request. */
|
|
3487
|
+
require_pkce?: boolean | null;
|
|
3488
|
+
/**
|
|
3489
|
+
* Scopes to request. Replaced wholesale; empty restores the per-kind
|
|
3490
|
+
* default.
|
|
3491
|
+
*/
|
|
3492
|
+
scopes?: string[] | null;
|
|
3493
|
+
/** OAuth2-variant token endpoint. `Some(None)` clears it. */
|
|
3494
|
+
token_endpoint?: string | null;
|
|
3350
3495
|
/** `token_exchange`. */
|
|
3351
3496
|
token_exchange?: TokenExchangeTrustRequest | null;
|
|
3497
|
+
/** OAuth2-variant userinfo endpoint. `Some(None)` clears it. */
|
|
3498
|
+
userinfo_endpoint?: string | null;
|
|
3352
3499
|
}
|
|
3353
3500
|
/**
|
|
3354
3501
|
* Wire twin of {@link UpdateFederationConfigRequest} — plain strings, never
|
|
@@ -3358,15 +3505,26 @@ interface UpdateFederationConfigRequest {
|
|
|
3358
3505
|
* because a consumer should read it.
|
|
3359
3506
|
*/
|
|
3360
3507
|
interface UpdateFederationConfigRequestWire {
|
|
3508
|
+
allow_tenant_inheritance?: boolean | null;
|
|
3361
3509
|
allowed_algorithms?: string[] | null;
|
|
3510
|
+
allowed_issuer_tenants?: string[] | null;
|
|
3511
|
+
apple_key_id?: string | null;
|
|
3512
|
+
apple_team_id?: string | null;
|
|
3362
3513
|
attribute_map?: unknown;
|
|
3514
|
+
authorization_endpoint?: string | null;
|
|
3515
|
+
button_icon?: string | null;
|
|
3363
3516
|
client_id?: string | null;
|
|
3364
3517
|
client_secret?: string;
|
|
3365
3518
|
enabled?: boolean | null;
|
|
3366
3519
|
idp_signing_cert_pem?: string | null;
|
|
3367
3520
|
metadata_url?: string | null;
|
|
3368
3521
|
provider?: string | null;
|
|
3522
|
+
provider_slug?: string | null;
|
|
3523
|
+
require_pkce?: boolean | null;
|
|
3524
|
+
scopes?: string[] | null;
|
|
3525
|
+
token_endpoint?: string | null;
|
|
3369
3526
|
token_exchange?: TokenExchangeTrustRequest | null;
|
|
3527
|
+
userinfo_endpoint?: string | null;
|
|
3370
3528
|
}
|
|
3371
3529
|
/**
|
|
3372
3530
|
* Unwrap a `UpdateFederationConfigRequest` for the wire.
|
|
@@ -1067,13 +1067,44 @@ interface CreateCertificateRequest {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
/** `CreateFederationConfigRequest` (generated from openapi.json). */
|
|
1069
1069
|
interface CreateFederationConfigRequest {
|
|
1070
|
+
/**
|
|
1071
|
+
* Whether tenants of this organization may inherit this provider. Only
|
|
1072
|
+
* meaningful on a config in the organization-scope tenant.
|
|
1073
|
+
*/
|
|
1074
|
+
allow_tenant_inheritance?: boolean | null;
|
|
1070
1075
|
/**
|
|
1071
1076
|
* Accepted JWT signing algorithms (OIDC) or signature algorithms (SAML).
|
|
1072
1077
|
* Defaults to `["RS256"]` when not provided (CQ-B40/REQ-14 AC-5).
|
|
1073
1078
|
*/
|
|
1074
1079
|
allowed_algorithms?: string[] | null;
|
|
1080
|
+
/**
|
|
1081
|
+
* External IdP tenant identifiers accepted when the provider publishes a
|
|
1082
|
+
* templated issuer (Entra ID's `{tenantid}`).
|
|
1083
|
+
*/
|
|
1084
|
+
allowed_issuer_tenants?: string[] | null;
|
|
1085
|
+
/**
|
|
1086
|
+
* Apple Key ID of the `.p8` signing key (10 characters). With both Apple
|
|
1087
|
+
* identifiers set, `client_secret` is the `.p8` key itself and AXIAM mints a
|
|
1088
|
+
* fresh five-minute client secret per token exchange.
|
|
1089
|
+
*/
|
|
1090
|
+
apple_key_id?: string | null;
|
|
1091
|
+
/** Apple Team ID (10 characters). */
|
|
1092
|
+
apple_team_id?: string | null;
|
|
1075
1093
|
/** Maps external IdP attributes to AXIAM user fields. */
|
|
1076
1094
|
attribute_map?: unknown;
|
|
1095
|
+
/** OAuth2-variant authorization endpoint. Required for `OAuth2`. */
|
|
1096
|
+
authorization_endpoint?: string | null;
|
|
1097
|
+
/**
|
|
1098
|
+
* Sign-in-button icon for a **generic** provider, as a base64 raster data
|
|
1099
|
+
* URL (`data:image/png;base64,…`), already cropped to
|
|
1100
|
+
* `PROVIDER_ICON_SIZE_PX` square by the client.
|
|
1101
|
+
*
|
|
1102
|
+
* Refused for the branded kinds: Google, Apple and Microsoft all publish
|
|
1103
|
+
* sign-in-button rules that require their own mark, so substituting a
|
|
1104
|
+
* picture would produce a button that breaks the guidelines it exists to
|
|
1105
|
+
* follow.
|
|
1106
|
+
*/
|
|
1107
|
+
button_icon?: string | null;
|
|
1077
1108
|
/** OAuth2 client ID registered with the external IdP. */
|
|
1078
1109
|
client_id: string;
|
|
1079
1110
|
/**
|
|
@@ -1094,8 +1125,31 @@ interface CreateFederationConfigRequest {
|
|
|
1094
1125
|
protocol: string;
|
|
1095
1126
|
/** Display name for the identity provider (e.g., "Google", "Okta"). */
|
|
1096
1127
|
provider: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* Which provider this is: `google`, `github`, `facebook`, `apple`,
|
|
1130
|
+
* `microsoft`, `generic_oidc`, `generic_oauth2` or `generic_saml`.
|
|
1131
|
+
*
|
|
1132
|
+
* Selects the sign-in button's branding, the per-kind defaults, and the key
|
|
1133
|
+
* on which a tenant config overrides an inherited organization one. Omitted
|
|
1134
|
+
* ⇒ derived from `protocol`, which is what every config written before this
|
|
1135
|
+
* field existed means.
|
|
1136
|
+
*/
|
|
1137
|
+
provider_kind?: string | null;
|
|
1138
|
+
/**
|
|
1139
|
+
* Operator-chosen identifier, **required** for the `generic_*` kinds and
|
|
1140
|
+
* refused for the branded ones.
|
|
1141
|
+
*/
|
|
1142
|
+
provider_slug?: string | null;
|
|
1143
|
+
/** Send PKCE on the authorization request. Forced on for `OAuth2`. */
|
|
1144
|
+
require_pkce?: boolean | null;
|
|
1145
|
+
/** Scopes to request. Omitted or empty ⇒ the per-kind default. */
|
|
1146
|
+
scopes?: string[] | null;
|
|
1147
|
+
/** OAuth2-variant token endpoint. Required for `OAuth2`. */
|
|
1148
|
+
token_endpoint?: string | null;
|
|
1097
1149
|
/** `token_exchange`. */
|
|
1098
1150
|
token_exchange?: TokenExchangeTrustRequest | null;
|
|
1151
|
+
/** OAuth2-variant userinfo endpoint. Required for `OAuth2`. */
|
|
1152
|
+
userinfo_endpoint?: string | null;
|
|
1099
1153
|
}
|
|
1100
1154
|
/**
|
|
1101
1155
|
* Wire twin of {@link CreateFederationConfigRequest} — plain strings, never
|
|
@@ -1105,15 +1159,27 @@ interface CreateFederationConfigRequest {
|
|
|
1105
1159
|
* because a consumer should read it.
|
|
1106
1160
|
*/
|
|
1107
1161
|
interface CreateFederationConfigRequestWire {
|
|
1162
|
+
allow_tenant_inheritance?: boolean | null;
|
|
1108
1163
|
allowed_algorithms?: string[] | null;
|
|
1164
|
+
allowed_issuer_tenants?: string[] | null;
|
|
1165
|
+
apple_key_id?: string | null;
|
|
1166
|
+
apple_team_id?: string | null;
|
|
1109
1167
|
attribute_map?: unknown;
|
|
1168
|
+
authorization_endpoint?: string | null;
|
|
1169
|
+
button_icon?: string | null;
|
|
1110
1170
|
client_id: string;
|
|
1111
1171
|
client_secret: string;
|
|
1112
1172
|
idp_signing_cert_pem?: string | null;
|
|
1113
1173
|
metadata_url?: string | null;
|
|
1114
1174
|
protocol: string;
|
|
1115
1175
|
provider: string;
|
|
1176
|
+
provider_kind?: string | null;
|
|
1177
|
+
provider_slug?: string | null;
|
|
1178
|
+
require_pkce?: boolean | null;
|
|
1179
|
+
scopes?: string[] | null;
|
|
1180
|
+
token_endpoint?: string | null;
|
|
1116
1181
|
token_exchange?: TokenExchangeTrustRequest | null;
|
|
1182
|
+
userinfo_endpoint?: string | null;
|
|
1117
1183
|
}
|
|
1118
1184
|
/**
|
|
1119
1185
|
* Unwrap a `CreateFederationConfigRequest` for the wire.
|
|
@@ -1572,28 +1638,84 @@ interface EncryptedExport {
|
|
|
1572
1638
|
type FailurePolicy = "fail_closed" | "fail_open" | (string & {});
|
|
1573
1639
|
/** Federation config response -- omits client_secret. */
|
|
1574
1640
|
interface FederationConfigResponse {
|
|
1641
|
+
/** Whether tenants of this organization may inherit this provider. */
|
|
1642
|
+
allow_tenant_inheritance: boolean;
|
|
1643
|
+
/**
|
|
1644
|
+
* Accepted signing algorithms. Returned for OIDC and SAML; meaningless, and
|
|
1645
|
+
* therefore empty, for the OAuth2 variant.
|
|
1646
|
+
*/
|
|
1647
|
+
allowed_algorithms: string[];
|
|
1648
|
+
/** Accepted external IdP tenants for a templated issuer. */
|
|
1649
|
+
allowed_issuer_tenants: string[];
|
|
1650
|
+
/** Apple Key ID. */
|
|
1651
|
+
apple_key_id?: string | null;
|
|
1652
|
+
/** Apple Team ID. Not secret — the `.p8` key is, and it is never returned. */
|
|
1653
|
+
apple_team_id?: string | null;
|
|
1575
1654
|
/** `attribute_map`. */
|
|
1576
1655
|
attribute_map: unknown;
|
|
1656
|
+
/** OAuth2-variant authorization endpoint. */
|
|
1657
|
+
authorization_endpoint?: string | null;
|
|
1658
|
+
/** Custom sign-in-button icon, when one is set. */
|
|
1659
|
+
button_icon?: string | null;
|
|
1577
1660
|
/** `client_id`. */
|
|
1578
1661
|
client_id: string;
|
|
1579
1662
|
/** `created_at`. */
|
|
1580
1663
|
created_at: string;
|
|
1664
|
+
/**
|
|
1665
|
+
* The per-kind default that an empty `scopes` resolves to. Returned so the
|
|
1666
|
+
* admin UI can show what will actually be requested without duplicating the
|
|
1667
|
+
* table.
|
|
1668
|
+
*/
|
|
1669
|
+
effective_scopes: string[];
|
|
1581
1670
|
/** `enabled`. */
|
|
1582
1671
|
enabled: boolean;
|
|
1672
|
+
/**
|
|
1673
|
+
* Whether AXIAM ships this provider's own mark. When true the button uses it
|
|
1674
|
+
* and `button_icon` is refused; when false the button reads "Sign in with
|
|
1675
|
+
* <provider>" and may carry a custom icon.
|
|
1676
|
+
*/
|
|
1677
|
+
has_bundled_mark: boolean;
|
|
1583
1678
|
/** `id`. */
|
|
1584
1679
|
id: string;
|
|
1585
1680
|
/** `metadata_url`. */
|
|
1586
1681
|
metadata_url?: string | null;
|
|
1682
|
+
/**
|
|
1683
|
+
* Whether AXIAM mints this provider's client secret itself, per exchange,
|
|
1684
|
+
* rather than sending a stored one. True only for an Apple config with both
|
|
1685
|
+
* identifiers set.
|
|
1686
|
+
*/
|
|
1687
|
+
mints_client_secret: boolean;
|
|
1688
|
+
/**
|
|
1689
|
+
* Whether PKCE is sent on the authorization request. Always true for the
|
|
1690
|
+
* OAuth2 variant regardless of the stored flag.
|
|
1691
|
+
*/
|
|
1692
|
+
pkce_required: boolean;
|
|
1587
1693
|
/** `protocol`. */
|
|
1588
1694
|
protocol: string;
|
|
1589
1695
|
/** `provider`. */
|
|
1590
1696
|
provider: string;
|
|
1697
|
+
/**
|
|
1698
|
+
* Which provider this is. Derived from `protocol` for a config written
|
|
1699
|
+
* before the field existed.
|
|
1700
|
+
*/
|
|
1701
|
+
provider_kind: string;
|
|
1702
|
+
/** Operator-chosen identifier for a `generic_*` kind. */
|
|
1703
|
+
provider_slug?: string | null;
|
|
1704
|
+
/**
|
|
1705
|
+
* Scopes as stored. Empty means "use the per-kind default"; see
|
|
1706
|
+
* `effective_scopes`.
|
|
1707
|
+
*/
|
|
1708
|
+
scopes: string[];
|
|
1591
1709
|
/** `tenant_id`. */
|
|
1592
1710
|
tenant_id: string;
|
|
1711
|
+
/** OAuth2-variant token endpoint. */
|
|
1712
|
+
token_endpoint?: string | null;
|
|
1593
1713
|
/** X4 external token-exchange trust. */
|
|
1594
1714
|
token_exchange: TokenExchangeTrustResponse;
|
|
1595
1715
|
/** `updated_at`. */
|
|
1596
1716
|
updated_at: string;
|
|
1717
|
+
/** OAuth2-variant userinfo endpoint. */
|
|
1718
|
+
userinfo_endpoint?: string | null;
|
|
1597
1719
|
}
|
|
1598
1720
|
/** `FederationLinkResponse` (generated from openapi.json). */
|
|
1599
1721
|
interface FederationLinkResponse {
|
|
@@ -3323,10 +3445,22 @@ type UnknownAaguidAction = "allow" | "deny" | (string & {});
|
|
|
3323
3445
|
* than sent as `null` (§27.4 rule 5).
|
|
3324
3446
|
*/
|
|
3325
3447
|
interface UpdateFederationConfigRequest {
|
|
3448
|
+
/** Whether tenants may inherit this organization-level provider. */
|
|
3449
|
+
allow_tenant_inheritance?: boolean | null;
|
|
3326
3450
|
/** Accepted signature algorithms (CQ-B40/REQ-14 AC-5). */
|
|
3327
3451
|
allowed_algorithms?: string[] | null;
|
|
3452
|
+
/** Accepted external IdP tenants for a templated issuer. Replaced wholesale. */
|
|
3453
|
+
allowed_issuer_tenants?: string[] | null;
|
|
3454
|
+
/** Apple Key ID. `Some(None)` clears it. */
|
|
3455
|
+
apple_key_id?: string | null;
|
|
3456
|
+
/** Apple Team ID. `Some(None)` clears it. */
|
|
3457
|
+
apple_team_id?: string | null;
|
|
3328
3458
|
/** `attribute_map`. */
|
|
3329
3459
|
attribute_map?: unknown;
|
|
3460
|
+
/** OAuth2-variant authorization endpoint. `Some(None)` clears it. */
|
|
3461
|
+
authorization_endpoint?: string | null;
|
|
3462
|
+
/** Sign-in-button icon for a generic provider. `Some(None)` clears it. */
|
|
3463
|
+
button_icon?: string | null;
|
|
3330
3464
|
/** `client_id`. */
|
|
3331
3465
|
client_id?: string | null;
|
|
3332
3466
|
/**
|
|
@@ -3347,8 +3481,21 @@ interface UpdateFederationConfigRequest {
|
|
|
3347
3481
|
metadata_url?: string | null;
|
|
3348
3482
|
/** `provider`. */
|
|
3349
3483
|
provider?: string | null;
|
|
3484
|
+
/** Operator-chosen identifier for a `generic_*` kind. `Some(None)` clears it. */
|
|
3485
|
+
provider_slug?: string | null;
|
|
3486
|
+
/** Send PKCE on the authorization request. */
|
|
3487
|
+
require_pkce?: boolean | null;
|
|
3488
|
+
/**
|
|
3489
|
+
* Scopes to request. Replaced wholesale; empty restores the per-kind
|
|
3490
|
+
* default.
|
|
3491
|
+
*/
|
|
3492
|
+
scopes?: string[] | null;
|
|
3493
|
+
/** OAuth2-variant token endpoint. `Some(None)` clears it. */
|
|
3494
|
+
token_endpoint?: string | null;
|
|
3350
3495
|
/** `token_exchange`. */
|
|
3351
3496
|
token_exchange?: TokenExchangeTrustRequest | null;
|
|
3497
|
+
/** OAuth2-variant userinfo endpoint. `Some(None)` clears it. */
|
|
3498
|
+
userinfo_endpoint?: string | null;
|
|
3352
3499
|
}
|
|
3353
3500
|
/**
|
|
3354
3501
|
* Wire twin of {@link UpdateFederationConfigRequest} — plain strings, never
|
|
@@ -3358,15 +3505,26 @@ interface UpdateFederationConfigRequest {
|
|
|
3358
3505
|
* because a consumer should read it.
|
|
3359
3506
|
*/
|
|
3360
3507
|
interface UpdateFederationConfigRequestWire {
|
|
3508
|
+
allow_tenant_inheritance?: boolean | null;
|
|
3361
3509
|
allowed_algorithms?: string[] | null;
|
|
3510
|
+
allowed_issuer_tenants?: string[] | null;
|
|
3511
|
+
apple_key_id?: string | null;
|
|
3512
|
+
apple_team_id?: string | null;
|
|
3362
3513
|
attribute_map?: unknown;
|
|
3514
|
+
authorization_endpoint?: string | null;
|
|
3515
|
+
button_icon?: string | null;
|
|
3363
3516
|
client_id?: string | null;
|
|
3364
3517
|
client_secret?: string;
|
|
3365
3518
|
enabled?: boolean | null;
|
|
3366
3519
|
idp_signing_cert_pem?: string | null;
|
|
3367
3520
|
metadata_url?: string | null;
|
|
3368
3521
|
provider?: string | null;
|
|
3522
|
+
provider_slug?: string | null;
|
|
3523
|
+
require_pkce?: boolean | null;
|
|
3524
|
+
scopes?: string[] | null;
|
|
3525
|
+
token_endpoint?: string | null;
|
|
3369
3526
|
token_exchange?: TokenExchangeTrustRequest | null;
|
|
3527
|
+
userinfo_endpoint?: string | null;
|
|
3370
3528
|
}
|
|
3371
3529
|
/**
|
|
3372
3530
|
* Unwrap a `UpdateFederationConfigRequest` for the wire.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CookieJar } from 'tough-cookie';
|
|
2
2
|
import { S as SharedSession, A as AxiamClientOptions, N as NodeTlsOptions } from './session-BIRL5RKr.cjs';
|
|
3
|
-
import { A as AxiamClient } from './client-
|
|
3
|
+
import { A as AxiamClient } from './client-B9LCNDZU.cjs';
|
|
4
4
|
import { S as Sensitive } from './sensitive-BC_s7Rrd.cjs';
|
|
5
5
|
import { V as Verifier } from './jwks-CSXHo3DS.cjs';
|
|
6
6
|
import { AxiosInstance } from 'axios';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CookieJar } from 'tough-cookie';
|
|
2
2
|
import { S as SharedSession, A as AxiamClientOptions, N as NodeTlsOptions } from './session-DU6fggqX.js';
|
|
3
|
-
import { A as AxiamClient } from './client-
|
|
3
|
+
import { A as AxiamClient } from './client-BFqBPSDN.js';
|
|
4
4
|
import { S as Sensitive } from './sensitive-BC_s7Rrd.js';
|
|
5
5
|
import { V as Verifier } from './jwks-CSXHo3DS.js';
|
|
6
6
|
import { AxiosInstance } from 'axios';
|