@schemavaults/auth-common 0.37.1 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-scopes/index.d.ts +2 -2
- package/dist/api-scopes/index.js +1 -1
- package/dist/api-scopes/index.js.map +1 -1
- package/dist/api-scopes/scope-grants.d.ts +19 -0
- package/dist/api-scopes/scope-grants.js +17 -0
- package/dist/api-scopes/scope-grants.js.map +1 -1
- package/dist/oidc/index.d.ts +1 -0
- package/dist/oidc/index.js +1 -0
- package/dist/oidc/index.js.map +1 -1
- package/dist/oidc/provider-metadata.js +5 -0
- package/dist/oidc/provider-metadata.js.map +1 -1
- package/dist/oidc/token-exchange.d.ts +8 -0
- package/dist/oidc/token-exchange.js +18 -0
- package/dist/oidc/token-exchange.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { MAX_API_SCOPE_VALUE_LENGTH, MAX_API_SCOPE_DESCRIPTION_LENGTH, MAX_API_SCOPES_PER_API_SERVER, API_SCOPE_VALUE_REGEX, apiScopeValueSchema, apiScopeDescriptionSchema, resourceIndicatorSchema, apiServerScopeSchema, createApiServerScopeRequestSchema, updateApiServerScopeRequestSchema, } from "./api-server-scope";
|
|
2
2
|
export type { ApiScopeValue, ApiServerScope, CreateApiServerScopeRequest, UpdateApiServerScopeRequest, } from "./api-server-scope";
|
|
3
|
-
export { API_SCOPE_GRANTEES, apiScopeGranteeSchema, appApiScopePolicySchema, updateAppApiScopePolicyRequestSchema, } from "./scope-grants";
|
|
4
|
-
export type { ApiScopeGrantee, AppApiScopePolicy, UpdateAppApiScopePolicyRequest, } from "./scope-grants";
|
|
3
|
+
export { API_SCOPE_GRANTEES, apiScopeGranteeSchema, appApiScopePolicySchema, updateAppApiScopePolicyRequestSchema, appApiConnectionFirstPartySchema, updateAppApiConnectionFirstPartyRequestSchema, } from "./scope-grants";
|
|
4
|
+
export type { ApiScopeGrantee, AppApiScopePolicy, UpdateAppApiScopePolicyRequest, AppApiConnectionFirstParty, UpdateAppApiConnectionFirstPartyRequest, } from "./scope-grants";
|
|
5
5
|
export { consentScopeSchema, appConsentStatusSchema, approvedApiScopesSchema, connectedAppScopeSchema, connectedAppSchema, listConnectedAppsResponseSchema, } from "./consent";
|
|
6
6
|
export type { ConsentScope, AppConsentStatus, ConnectedAppScope, ConnectedApp, ListConnectedAppsResponse, } from "./consent";
|
|
7
7
|
export { API_SERVER_SCOPES_JSON_SCHEMA_PATH, apiScopeManifestEntrySchema, syncApiServerScopesRequestSchema, apiScopeManifestEntries, syncedApiScopeSchema, updatedApiScopeSchema, apiServerScopeSyncResultSchema, syncApiServerScopesResponseSchema, hasApiScopeSyncDrift, } from "./scope-sync";
|
package/dist/api-scopes/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { MAX_API_SCOPE_VALUE_LENGTH, MAX_API_SCOPE_DESCRIPTION_LENGTH, MAX_API_SCOPES_PER_API_SERVER, API_SCOPE_VALUE_REGEX, apiScopeValueSchema, apiScopeDescriptionSchema, resourceIndicatorSchema, apiServerScopeSchema, createApiServerScopeRequestSchema, updateApiServerScopeRequestSchema, } from "./api-server-scope";
|
|
2
|
-
export { API_SCOPE_GRANTEES, apiScopeGranteeSchema, appApiScopePolicySchema, updateAppApiScopePolicyRequestSchema, } from "./scope-grants";
|
|
2
|
+
export { API_SCOPE_GRANTEES, apiScopeGranteeSchema, appApiScopePolicySchema, updateAppApiScopePolicyRequestSchema, appApiConnectionFirstPartySchema, updateAppApiConnectionFirstPartyRequestSchema, } from "./scope-grants";
|
|
3
3
|
export { consentScopeSchema, appConsentStatusSchema, approvedApiScopesSchema, connectedAppScopeSchema, connectedAppSchema, listConnectedAppsResponseSchema, } from "./consent";
|
|
4
4
|
export { API_SERVER_SCOPES_JSON_SCHEMA_PATH, apiScopeManifestEntrySchema, syncApiServerScopesRequestSchema, apiScopeManifestEntries, syncedApiScopeSchema, updatedApiScopeSchema, apiServerScopeSyncResultSchema, syncApiServerScopesResponseSchema, hasApiScopeSyncDrift, } from "./scope-sync";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,iCAAiC,EACjC,iCAAiC,GAClC,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,oCAAoC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,iCAAiC,EACjC,iCAAiC,GAClC,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,oCAAoC,EACpC,gCAAgC,EAChC,6CAA6C,GAC9C,MAAM,gBAAgB,CAAC;AASxB,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,+BAA+B,GAChC,MAAM,WAAW,CAAC;AASnB,OAAO,EACL,kCAAkC,EAClC,2BAA2B,EAC3B,gCAAgC,EAChC,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,8BAA8B,EAC9B,iCAAiC,EACjC,oBAAoB,GACrB,MAAM,cAAc,CAAC"}
|
|
@@ -35,3 +35,22 @@ export declare const updateAppApiScopePolicyRequestSchema: z.ZodObject<{
|
|
|
35
35
|
service_account_scopes: z.ZodArray<z.ZodString>;
|
|
36
36
|
}, z.core.$strict>;
|
|
37
37
|
export type UpdateAppApiScopePolicyRequest = z.infer<typeof updateAppApiScopePolicyRequestSchema>;
|
|
38
|
+
/**
|
|
39
|
+
* Whether an app-to-API connection is FIRST-PARTY: the app and the API
|
|
40
|
+
* server belong to the same party, so users signing in to the app for the
|
|
41
|
+
* API server (the authorization request's RFC 8707 `resource`) consent
|
|
42
|
+
* implicitly. Such requests get the API scopes they ask for, among those
|
|
43
|
+
* the app may be granted (`restrict_user_scopes` still applies), without
|
|
44
|
+
* the consent screen; the app authorization and the scope consents are
|
|
45
|
+
* recorded as the user signs in. Off by default; only platform
|
|
46
|
+
* administrators may turn it on.
|
|
47
|
+
*/
|
|
48
|
+
export declare const appApiConnectionFirstPartySchema: z.ZodObject<{
|
|
49
|
+
first_party: z.ZodBoolean;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
export type AppApiConnectionFirstParty = z.infer<typeof appApiConnectionFirstPartySchema>;
|
|
52
|
+
/** Body marking an app-to-API connection first-party, or not. */
|
|
53
|
+
export declare const updateAppApiConnectionFirstPartyRequestSchema: z.ZodObject<{
|
|
54
|
+
first_party: z.ZodBoolean;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
export type UpdateAppApiConnectionFirstPartyRequest = z.infer<typeof updateAppApiConnectionFirstPartyRequestSchema>;
|
|
@@ -46,4 +46,21 @@ export const updateAppApiScopePolicyRequestSchema = z
|
|
|
46
46
|
service_account_scopes: scopeValueListSchema,
|
|
47
47
|
})
|
|
48
48
|
.strict();
|
|
49
|
+
/**
|
|
50
|
+
* Whether an app-to-API connection is FIRST-PARTY: the app and the API
|
|
51
|
+
* server belong to the same party, so users signing in to the app for the
|
|
52
|
+
* API server (the authorization request's RFC 8707 `resource`) consent
|
|
53
|
+
* implicitly. Such requests get the API scopes they ask for, among those
|
|
54
|
+
* the app may be granted (`restrict_user_scopes` still applies), without
|
|
55
|
+
* the consent screen; the app authorization and the scope consents are
|
|
56
|
+
* recorded as the user signs in. Off by default; only platform
|
|
57
|
+
* administrators may turn it on.
|
|
58
|
+
*/
|
|
59
|
+
export const appApiConnectionFirstPartySchema = z
|
|
60
|
+
.object({
|
|
61
|
+
first_party: z.boolean(),
|
|
62
|
+
})
|
|
63
|
+
.strict();
|
|
64
|
+
/** Body marking an app-to-API connection first-party, or not. */
|
|
65
|
+
export const updateAppApiConnectionFirstPartyRequestSchema = appApiConnectionFirstPartySchema;
|
|
49
66
|
//# sourceMappingURL=scope-grants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-grants.js","sourceRoot":"","sources":["../../src/api-scopes/scope-grants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAExF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAU,CAAC;AAEvE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAEhE,MAAM,oBAAoB,GAAG,CAAC;KAC3B,KAAK,CAAC,mBAAmB,CAAC;KAC1B,GAAG,CAAC,6BAA6B,CAAC;KAClC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,EAAE;IAC1D,OAAO,EAAE,6BAA6B;CACvC,CAAC,CAAC;AAEL,yDAAyD;AACzD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN;;;OAGG;IACH,oBAAoB,EAAE,CAAC,CAAC,OAAO,EAAE;IACjC,oEAAoE;IACpE,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,sE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sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC5C,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ,uEAAuE;AACvE,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC;KAClD,MAAM,CAAC;IACN,oBAAoB,EAAE,CAAC,CAAC,OAAO,EAAE;IACjC,WAAW,EAAE,oBAAoB;IACjC,sBAAsB,EAAE,oBAAoB;CAC7C,CAAC;KACD,MAAM,EAAE,CAAC;AAMZ;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC9C,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE;CACzB,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ,iEAAiE;AACjE,MAAM,CAAC,MAAM,6CAA6C,GAAG,gCAAgC,CAAC"}
|
package/dist/oidc/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { buildOidcProfileClaims } from "./profile-claims";
|
|
|
7
7
|
export type { OidcProfileClaims, OidcProfileClaimsSource, } from "./profile-claims";
|
|
8
8
|
export { OIDC_ENDPOINT_PATHS, getOidcEndpointUrl } from "./endpoints";
|
|
9
9
|
export { OAUTH_JWT_BEARER_CLIENT_ASSERTION_TYPE } from "./client-assertion";
|
|
10
|
+
export { OAUTH_TOKEN_EXCHANGE_GRANT_TYPE, OAUTH_ACCESS_TOKEN_TYPE, } from "./token-exchange";
|
|
10
11
|
export type { OidcEndpointName } from "./endpoints";
|
|
11
12
|
export { OIDC_TOKEN_RESOURCE_PARAM, OIDC_TOKEN_REFRESH_TOKEN_DELIVERY_PARAM, OIDC_REFRESH_TOKEN_DELIVERY_MODES, oidcRefreshTokenDeliveryModeSchema, DEFAULT_OIDC_REFRESH_TOKEN_DELIVERY_MODE, OIDC_TOKEN_REFRESH_TOKEN_EXPIRES_IN_FIELD, oidcTokenResponseExtensionsSchema, } from "./token-endpoint-extensions";
|
|
12
13
|
export type { OidcRefreshTokenDeliveryMode, OidcTokenResponseExtensions, } from "./token-endpoint-extensions";
|
package/dist/oidc/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { OIDC_SUB_CLAIM_DELIMITER, formatOidcSubClaim, parseOidcSubClaim, } from
|
|
|
4
4
|
export { buildOidcProfileClaims } from "./profile-claims";
|
|
5
5
|
export { OIDC_ENDPOINT_PATHS, getOidcEndpointUrl } from "./endpoints";
|
|
6
6
|
export { OAUTH_JWT_BEARER_CLIENT_ASSERTION_TYPE } from "./client-assertion";
|
|
7
|
+
export { OAUTH_TOKEN_EXCHANGE_GRANT_TYPE, OAUTH_ACCESS_TOKEN_TYPE, } from "./token-exchange";
|
|
7
8
|
export { OIDC_TOKEN_RESOURCE_PARAM, OIDC_TOKEN_REFRESH_TOKEN_DELIVERY_PARAM, OIDC_REFRESH_TOKEN_DELIVERY_MODES, oidcRefreshTokenDeliveryModeSchema, DEFAULT_OIDC_REFRESH_TOKEN_DELIVERY_MODE, OIDC_TOKEN_REFRESH_TOKEN_EXPIRES_IN_FIELD, oidcTokenResponseExtensionsSchema, } from "./token-endpoint-extensions";
|
|
8
9
|
export { buildOidcProviderMetadata } from "./provider-metadata";
|
|
9
10
|
export { DYNAMIC_CLIENT_REGISTRATION_ERRORS, DYNAMIC_CLIENT_MAX_REDIRECT_URIS, DYNAMIC_CLIENT_UNSUPPORTED_METADATA_FIELDS, dynamicClientRegistrationErrorSchema, dynamicClientRegistrationResponseSchema, parseDynamicClientRegistrationRequest, classifyDynamicClientRedirectUri, deriveDynamicClientNameFromRedirectUri, } from "./dynamic-client-registration";
|
package/dist/oidc/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/oidc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,mBAAm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,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAMhE,OAAO,EACL,kCAAkC,EAClC,gCAAgC,EAChC,0CAA0C,EAC1C,oCAAoC,EACpC,uCAAuC,EACvC,qCAAqC,EACrC,gCAAgC,EAChC,sCAAsC,GACvC,MAAM,+BAA+B,CAAC"}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { getOidcEndpointUrl } from "./endpoints";
|
|
18
18
|
import { OIDC_SUPPORTED_SCOPES } from "./scope";
|
|
19
|
+
import { OAUTH_TOKEN_EXCHANGE_GRANT_TYPE } from "./token-exchange";
|
|
19
20
|
/**
|
|
20
21
|
* Builds the provider metadata for the auth server at `issuer`. A
|
|
21
22
|
* trailing slash on `issuer` is stripped so the endpoints and the
|
|
@@ -41,10 +42,14 @@ export function buildOidcProviderMetadata(issuer, options = {}) {
|
|
|
41
42
|
// client_credentials (RFC 6749 §4.4) is restricted to confidential
|
|
42
43
|
// clients (apps with a registered client secret) and mints
|
|
43
44
|
// machine-to-machine access tokens for the app's service account.
|
|
45
|
+
// The RFC 8693 token exchange is restricted to them too: it swaps one
|
|
46
|
+
// of their users' access tokens for a delegated token on which the
|
|
47
|
+
// app's service account acts for the user (e.g. an agent).
|
|
44
48
|
grant_types_supported: [
|
|
45
49
|
"authorization_code",
|
|
46
50
|
"refresh_token",
|
|
47
51
|
"client_credentials",
|
|
52
|
+
OAUTH_TOKEN_EXCHANGE_GRANT_TYPE,
|
|
48
53
|
],
|
|
49
54
|
subject_types_supported: ["public"],
|
|
50
55
|
id_token_signing_alg_values_supported: ["RS256"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-metadata.js","sourceRoot":"","sources":["../../src/oidc/provider-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,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,kBAAkB,CACvC,iBAAiB,EACjB,cAAc,CACf;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** RFC 8693 §2.1 `grant_type` of a token exchange request. */
|
|
2
|
+
export declare const OAUTH_TOKEN_EXCHANGE_GRANT_TYPE: "urn:ietf:params:oauth:grant-type:token-exchange";
|
|
3
|
+
/**
|
|
4
|
+
* RFC 8693 §3 token type identifier of an OAuth 2.0 access token: the only
|
|
5
|
+
* `subject_token_type` the auth server exchanges and the only token type it
|
|
6
|
+
* issues (`requested_token_type`, `issued_token_type`).
|
|
7
|
+
*/
|
|
8
|
+
export declare const OAUTH_ACCESS_TOKEN_TYPE: "urn:ietf:params:oauth:token-type:access_token";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// OAuth 2.0 Token Exchange (RFC 8693) identifiers, shared by the auth server's
|
|
2
|
+
// token endpoint, its discovery document and the SDK helpers that call the
|
|
3
|
+
// grant (`exchangeTokenForDelegatedToken()` in @schemavaults/auth-server-sdk).
|
|
4
|
+
//
|
|
5
|
+
// The auth server uses the grant to mint DELEGATED access tokens: a
|
|
6
|
+
// confidential client swaps an access token one of its users holds for an
|
|
7
|
+
// API server for one on which the client's service account acts for that
|
|
8
|
+
// user (the token's `act` claim), e.g. for an agent the client runs in a
|
|
9
|
+
// sandbox.
|
|
10
|
+
/** RFC 8693 §2.1 `grant_type` of a token exchange request. */
|
|
11
|
+
export const OAUTH_TOKEN_EXCHANGE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:token-exchange";
|
|
12
|
+
/**
|
|
13
|
+
* RFC 8693 §3 token type identifier of an OAuth 2.0 access token: the only
|
|
14
|
+
* `subject_token_type` the auth server exchanges and the only token type it
|
|
15
|
+
* issues (`requested_token_type`, `issued_token_type`).
|
|
16
|
+
*/
|
|
17
|
+
export const OAUTH_ACCESS_TOKEN_TYPE = "urn:ietf:params:oauth:token-type:access_token";
|
|
18
|
+
//# sourceMappingURL=token-exchange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-exchange.js","sourceRoot":"","sources":["../../src/oidc/token-exchange.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,2EAA2E;AAC3E,+EAA+E;AAC/E,EAAE;AACF,oEAAoE;AACpE,0EAA0E;AAC1E,yEAAyE;AACzE,yEAAyE;AACzE,WAAW;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iDAA0D,CAAC;AAE7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAClC,+CAAwD,CAAC"}
|