@mastra/auth-okta 0.2.1 → 0.2.2-alpha.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/_types/@internal_auth/dist/_types/@internal_core/dist/base/index.d.ts +1 -1
- package/dist/_types/@internal_auth/dist/_types/@internal_core/dist/index-Biaf3BmX.d.ts +319 -0
- package/dist/_types/@internal_auth/dist/ee/interfaces/permissions.generated.d.ts +220 -220
- package/dist/auth-provider.d.ts.map +1 -1
- package/dist/index.cjs +89 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +89 -5
- package/dist/index.js.map +1 -1
- package/dist/rbac-provider.d.ts.map +1 -1
- package/package.json +6 -7
- package/CHANGELOG.md +0 -221
- package/dist/_types/@internal_auth/dist/_types/@internal_core/dist/index-S1lgaKO7.d.ts +0 -218
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/auth-okta",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2-alpha.0",
|
|
4
4
|
"description": "Mastra Okta Auth and RBAC integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
|
-
"dist"
|
|
23
|
-
"CHANGELOG.md"
|
|
22
|
+
"dist"
|
|
24
23
|
],
|
|
25
24
|
"license": "Apache-2.0",
|
|
26
25
|
"dependencies": {
|
|
@@ -37,11 +36,11 @@
|
|
|
37
36
|
"@vitest/ui": "4.1.10",
|
|
38
37
|
"eslint": "^10.7.0",
|
|
39
38
|
"tsdown": "0.22.9",
|
|
40
|
-
"typescript": "^
|
|
39
|
+
"typescript": "^7.0.2",
|
|
41
40
|
"vitest": "4.1.10",
|
|
42
|
-
"@internal/auth": "0.0.
|
|
43
|
-
"@internal/
|
|
44
|
-
"@internal/
|
|
41
|
+
"@internal/auth": "0.0.19",
|
|
42
|
+
"@internal/lint": "0.0.129",
|
|
43
|
+
"@internal/types-builder": "0.0.104"
|
|
45
44
|
},
|
|
46
45
|
"homepage": "https://mastra.ai",
|
|
47
46
|
"repository": {
|
package/CHANGELOG.md
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
# @mastra/auth-okta
|
|
2
|
-
|
|
3
|
-
## 0.2.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Fixed reading request headers from Express-style plain header objects so cookie-based auth providers no longer throw and fail with a misleading 401. ([#21261](https://github.com/mastra-ai/mastra/pull/21261))
|
|
8
|
-
|
|
9
|
-
Related to https://github.com/mastra-ai/mastra/issues/21253
|
|
10
|
-
|
|
11
|
-
## 0.2.1-alpha.0
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- Fixed reading request headers from Express-style plain header objects so cookie-based auth providers no longer throw and fail with a misleading 401. ([#21261](https://github.com/mastra-ai/mastra/pull/21261))
|
|
16
|
-
|
|
17
|
-
Related to https://github.com/mastra-ai/mastra/issues/21253
|
|
18
|
-
|
|
19
|
-
## 0.2.0
|
|
20
|
-
|
|
21
|
-
### Minor Changes
|
|
22
|
-
|
|
23
|
-
- Added an `audience` option to `MastraAuthOkta` so bearer-token verification is no longer pinned to the OAuth client ID. ([#21117](https://github.com/mastra-ai/mastra/pull/21117))
|
|
24
|
-
|
|
25
|
-
Previously the provider always required `aud` to equal the client ID, which is the audience of an Okta **ID token**. Okta **access tokens** carry the authorization server's audience instead, so machine-to-machine callers (MCP clients, CI jobs, service-to-service traffic) always got a 401 on an org authorization server. Those callers have no session cookie, so bearer was their only way in.
|
|
26
|
-
|
|
27
|
-
Set `audience` (or the `OKTA_AUDIENCE` environment variable) to the audience your tokens actually carry:
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
// Before: only ID tokens whose aud is the client ID were accepted
|
|
31
|
-
const auth = new MastraAuthOkta({ domain, clientId, clientSecret, redirectUri });
|
|
32
|
-
|
|
33
|
-
// After: accept access tokens from an org authorization server
|
|
34
|
-
const auth = new MastraAuthOkta({
|
|
35
|
-
domain,
|
|
36
|
-
clientId,
|
|
37
|
-
clientSecret,
|
|
38
|
-
redirectUri,
|
|
39
|
-
audience: 'https://your-org.okta.com',
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
// Or accept both ID tokens from the browser and access tokens from services
|
|
43
|
-
const auth = new MastraAuthOkta({ /* ... */ audience: [clientId, 'api://default'] });
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
The default is unchanged, so existing setups keep working.
|
|
47
|
-
|
|
48
|
-
## 0.2.0-alpha.0
|
|
49
|
-
|
|
50
|
-
### Minor Changes
|
|
51
|
-
|
|
52
|
-
- Added an `audience` option to `MastraAuthOkta` so bearer-token verification is no longer pinned to the OAuth client ID. ([#21117](https://github.com/mastra-ai/mastra/pull/21117))
|
|
53
|
-
|
|
54
|
-
Previously the provider always required `aud` to equal the client ID, which is the audience of an Okta **ID token**. Okta **access tokens** carry the authorization server's audience instead, so machine-to-machine callers (MCP clients, CI jobs, service-to-service traffic) always got a 401 on an org authorization server. Those callers have no session cookie, so bearer was their only way in.
|
|
55
|
-
|
|
56
|
-
Set `audience` (or the `OKTA_AUDIENCE` environment variable) to the audience your tokens actually carry:
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
// Before: only ID tokens whose aud is the client ID were accepted
|
|
60
|
-
const auth = new MastraAuthOkta({ domain, clientId, clientSecret, redirectUri });
|
|
61
|
-
|
|
62
|
-
// After: accept access tokens from an org authorization server
|
|
63
|
-
const auth = new MastraAuthOkta({
|
|
64
|
-
domain,
|
|
65
|
-
clientId,
|
|
66
|
-
clientSecret,
|
|
67
|
-
redirectUri,
|
|
68
|
-
audience: 'https://your-org.okta.com',
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
// Or accept both ID tokens from the browser and access tokens from services
|
|
72
|
-
const auth = new MastraAuthOkta({ /* ... */ audience: [clientId, 'api://default'] });
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
The default is unchanged, so existing setups keep working.
|
|
76
|
-
|
|
77
|
-
## 0.1.2
|
|
78
|
-
|
|
79
|
-
### Patch Changes
|
|
80
|
-
|
|
81
|
-
- Hardened several string-parsing code paths against regular-expression denial of service (ReDoS). Path normalization, URL trimming, LLM token stripping, and observation parsing now use linear-time string scanning instead of regexes that could back-track polynomially on adversarial input. No behavior changes. ([#18801](https://github.com/mastra-ai/mastra/pull/18801))
|
|
82
|
-
|
|
83
|
-
## 0.1.2-alpha.0
|
|
84
|
-
|
|
85
|
-
### Patch Changes
|
|
86
|
-
|
|
87
|
-
- Hardened several string-parsing code paths against regular-expression denial of service (ReDoS). Path normalization, URL trimming, LLM token stripping, and observation parsing now use linear-time string scanning instead of regexes that could back-track polynomially on adversarial input. No behavior changes. ([#18801](https://github.com/mastra-ai/mastra/pull/18801))
|
|
88
|
-
|
|
89
|
-
## 0.1.1
|
|
90
|
-
|
|
91
|
-
### Patch Changes
|
|
92
|
-
|
|
93
|
-
- Improved auth package builds by removing the direct core dependency from auth providers while preserving the existing public auth APIs. ([#17142](https://github.com/mastra-ai/mastra/pull/17142))
|
|
94
|
-
|
|
95
|
-
## 0.1.1-alpha.0
|
|
96
|
-
|
|
97
|
-
### Patch Changes
|
|
98
|
-
|
|
99
|
-
- Improved auth package builds by removing the direct core dependency from auth providers while preserving the existing public auth APIs. ([#17142](https://github.com/mastra-ai/mastra/pull/17142))
|
|
100
|
-
|
|
101
|
-
## 0.1.0
|
|
102
|
-
|
|
103
|
-
### Minor Changes
|
|
104
|
-
|
|
105
|
-
- Random bump ([#18178](https://github.com/mastra-ai/mastra/pull/18178))
|
|
106
|
-
|
|
107
|
-
### Patch Changes
|
|
108
|
-
|
|
109
|
-
- Updated dependencies [[`7c0d868`](https://github.com/mastra-ai/mastra/commit/7c0d868d97d0fdbc04c14d0166dbf44d4c5a4a62), [`d9d2273`](https://github.com/mastra-ai/mastra/commit/d9d2273c702690c9a26eab2aebea879701d4355a), [`b04369d`](https://github.com/mastra-ai/mastra/commit/b04369d6b167c698ef103981171a8bf92808e756), [`8f3c262`](https://github.com/mastra-ai/mastra/commit/8f3c262587b335588a02d96b17fd6aca34c885b3)]:
|
|
110
|
-
- @mastra/core@1.45.0
|
|
111
|
-
|
|
112
|
-
## 0.1.0-alpha.0
|
|
113
|
-
|
|
114
|
-
### Minor Changes
|
|
115
|
-
|
|
116
|
-
- Random bump ([#18178](https://github.com/mastra-ai/mastra/pull/18178))
|
|
117
|
-
|
|
118
|
-
### Patch Changes
|
|
119
|
-
|
|
120
|
-
- Updated dependencies [[`7c0d868`](https://github.com/mastra-ai/mastra/commit/7c0d868d97d0fdbc04c14d0166dbf44d4c5a4a62), [`d9d2273`](https://github.com/mastra-ai/mastra/commit/d9d2273c702690c9a26eab2aebea879701d4355a), [`b04369d`](https://github.com/mastra-ai/mastra/commit/b04369d6b167c698ef103981171a8bf92808e756), [`8f3c262`](https://github.com/mastra-ai/mastra/commit/8f3c262587b335588a02d96b17fd6aca34c885b3)]:
|
|
121
|
-
- @mastra/core@1.45.0-alpha.0
|
|
122
|
-
|
|
123
|
-
## 0.0.7
|
|
124
|
-
|
|
125
|
-
### Patch Changes
|
|
126
|
-
|
|
127
|
-
- Security remediation for the 2026-06-17 "easy-day-js" supply-chain incident. Patch bump to publish clean versions and move the `latest` dist-tag forward, superseding the compromised versions that declared the malicious `easy-day-js` dependency. ([#18056](https://github.com/mastra-ai/mastra/pull/18056))
|
|
128
|
-
|
|
129
|
-
- Updated dependencies [[`339c57c`](https://github.com/mastra-ai/mastra/commit/339c57c5b2c6dbe75a125e138228e0556528976f), [`1dd4117`](https://github.com/mastra-ai/mastra/commit/1dd4117dcbd8e031ede9f0489436bfbc6f0315b8), [`2b11d1f`](https://github.com/mastra-ai/mastra/commit/2b11d1f6ac7024c5dd2b2dd12a48a956ac9d63bd), [`77a2351`](https://github.com/mastra-ai/mastra/commit/77a2351ee79296e360bce822cb3391f7cfd6489d), [`b7dff0a`](https://github.com/mastra-ai/mastra/commit/b7dff0a3d1022eb6868f48dc40a2b1febd5c277f), [`02087e1`](https://github.com/mastra-ai/mastra/commit/02087e1fbc54aa07f3071f7a200df1bf5be601a8), [`49af8df`](https://github.com/mastra-ai/mastra/commit/49af8df589c4ff71a5015a4553b377b32704b691), [`30ce559`](https://github.com/mastra-ai/mastra/commit/30ce55902ecf819b8ab8697398dd68b108228063), [`c241b92`](https://github.com/mastra-ai/mastra/commit/c241b929dc8c8d6a7b7219c99ed13ac1f3124a77), [`7d6ff70`](https://github.com/mastra-ai/mastra/commit/7d6ff708727297a0526ca0e26e93eeb5bbaaa187), [`ab975d4`](https://github.com/mastra-ai/mastra/commit/ab975d4dd9488752f05bda7afa03166d207e3e2a), [`9d6aa1b`](https://github.com/mastra-ai/mastra/commit/9d6aa1bae407e2afa6a089abc2a6accbbcb287b8)]:
|
|
130
|
-
- @mastra/core@1.44.0
|
|
131
|
-
|
|
132
|
-
## 0.0.7-alpha.0
|
|
133
|
-
|
|
134
|
-
### Patch Changes
|
|
135
|
-
|
|
136
|
-
- Security remediation for the 2026-06-17 "easy-day-js" supply-chain incident. Patch bump to publish clean versions and move the `latest` dist-tag forward, superseding the compromised versions that declared the malicious `easy-day-js` dependency. ([#18056](https://github.com/mastra-ai/mastra/pull/18056))
|
|
137
|
-
|
|
138
|
-
- Updated dependencies [[`77a2351`](https://github.com/mastra-ai/mastra/commit/77a2351ee79296e360bce822cb3391f7cfd6489d)]:
|
|
139
|
-
- @mastra/core@1.43.1-alpha.0
|
|
140
|
-
|
|
141
|
-
## 0.0.4
|
|
142
|
-
|
|
143
|
-
### Patch Changes
|
|
144
|
-
|
|
145
|
-
- Removed Hono from @mastra/core and auth package runtime dependencies. Auth providers now receive framework-agnostic request types that support standard Request objects and Hono-compatible request shapes. MCP and deployer avoid relying on core-bundled Hono context types at package boundaries. ([#17410](https://github.com/mastra-ai/mastra/pull/17410))
|
|
146
|
-
|
|
147
|
-
- Updated dependencies [[`c973db4`](https://github.com/mastra-ai/mastra/commit/c973db428df1b564ff0c35d4b2a90e8f4f1e13fd), [`552285e`](https://github.com/mastra-ai/mastra/commit/552285e5af43cfc680a0972032cab8de8776c6a0), [`77e686c`](https://github.com/mastra-ai/mastra/commit/77e686c264e493e99ae5024e4dfe3ea5d5a09718), [`ece8dba`](https://github.com/mastra-ai/mastra/commit/ece8dba7ec1a5089eee8c33167cd762bfa91e509), [`e751af2`](https://github.com/mastra-ai/mastra/commit/e751af219433fbf4c7035b2d771b4c9ec8813b05), [`e2a8380`](https://github.com/mastra-ai/mastra/commit/e2a838017a7657850404c1e94c70d79ffdc6f14a), [`be3f1cd`](https://github.com/mastra-ai/mastra/commit/be3f1cd81f0e2a649e8eac15a024d542d814aef8), [`a34d9db`](https://github.com/mastra-ai/mastra/commit/a34d9dbc39fedb722f271318e9355ecee70489ab)]:
|
|
148
|
-
- @mastra/core@1.39.0
|
|
149
|
-
|
|
150
|
-
## 0.0.4-alpha.0
|
|
151
|
-
|
|
152
|
-
### Patch Changes
|
|
153
|
-
|
|
154
|
-
- Removed Hono from @mastra/core and auth package runtime dependencies. Auth providers now receive framework-agnostic request types that support standard Request objects and Hono-compatible request shapes. MCP and deployer avoid relying on core-bundled Hono context types at package boundaries. ([#17410](https://github.com/mastra-ai/mastra/pull/17410))
|
|
155
|
-
|
|
156
|
-
- Updated dependencies [[`c973db4`](https://github.com/mastra-ai/mastra/commit/c973db428df1b564ff0c35d4b2a90e8f4f1e13fd), [`552285e`](https://github.com/mastra-ai/mastra/commit/552285e5af43cfc680a0972032cab8de8776c6a0), [`77e686c`](https://github.com/mastra-ai/mastra/commit/77e686c264e493e99ae5024e4dfe3ea5d5a09718), [`ece8dba`](https://github.com/mastra-ai/mastra/commit/ece8dba7ec1a5089eee8c33167cd762bfa91e509), [`e751af2`](https://github.com/mastra-ai/mastra/commit/e751af219433fbf4c7035b2d771b4c9ec8813b05), [`e2a8380`](https://github.com/mastra-ai/mastra/commit/e2a838017a7657850404c1e94c70d79ffdc6f14a), [`be3f1cd`](https://github.com/mastra-ai/mastra/commit/be3f1cd81f0e2a649e8eac15a024d542d814aef8), [`a34d9db`](https://github.com/mastra-ai/mastra/commit/a34d9dbc39fedb722f271318e9355ecee70489ab)]:
|
|
157
|
-
- @mastra/core@1.39.0-alpha.0
|
|
158
|
-
|
|
159
|
-
## 0.0.3
|
|
160
|
-
|
|
161
|
-
### Patch Changes
|
|
162
|
-
|
|
163
|
-
- Fix endpoint URL construction for Okta org authorization servers. ([#15694](https://github.com/mastra-ai/mastra/pull/15694))
|
|
164
|
-
|
|
165
|
-
`MastraAuthOkta` concatenated `/v1/authorize` (and `/token`, `/keys`, `/logout`) directly onto `OKTA_ISSUER`. That yields the right endpoint for a custom authorization server (`https://{domain}/oauth2/default` → `.../oauth2/default/v1/authorize`), but 404s on an Okta org authorization server (`https://{domain}` → `.../v1/authorize`, whereas the real org endpoint is `.../oauth2/v1/authorize`).
|
|
166
|
-
|
|
167
|
-
An internal `endpointBase` is now derived from the issuer — verbatim when it already contains `/oauth2/`, otherwise `${issuer}/oauth2` — and used for the authorize, token, keys, and logout URLs. JWT `iss`-claim validation still uses the raw issuer so token validation stays correct on both server types. Trailing slashes on the issuer are also normalized so `OKTA_ISSUER=https://{domain}/` no longer produces `.../oauth2//v1/...`.
|
|
168
|
-
|
|
169
|
-
- Updated dependencies [[`452036a`](https://github.com/mastra-ai/mastra/commit/452036a0d965b4f4c1efd93606e4f03b50b807a5), [`c272d50`](https://github.com/mastra-ai/mastra/commit/c272d50610a54496b6b6d92ccd4d37b333a2613a), [`27fd1b7`](https://github.com/mastra-ai/mastra/commit/27fd1b79ac62eb7694f92587eb7d1be05b59be01), [`5ba7253`](https://github.com/mastra-ai/mastra/commit/5ba7253745c85e8df8012a76d954c640ffa336f7), [`5556cc1`](https://github.com/mastra-ai/mastra/commit/5556cc1befec71518d84f826b3bfe3a079a9daf7), [`f73980d`](https://github.com/mastra-ai/mastra/commit/f73980d651eb5f7f1ab20582de4615a1b6f10fce), [`5499303`](https://github.com/mastra-ai/mastra/commit/54993032c1ebc09642625b78d2014e0cf84a3cae), [`a702009`](https://github.com/mastra-ai/mastra/commit/a702009d3cfaa745120f501e21c783ed4d6a3072), [`9aee493`](https://github.com/mastra-ai/mastra/commit/9aee493ed6089b5133472623dcce49934bf2d509), [`d8692af`](https://github.com/mastra-ai/mastra/commit/d8692afa253028e39cdce2aafa0ac414071a762e), [`1a9cc60`](https://github.com/mastra-ai/mastra/commit/1a9cc6069f9910fc3d59e4953ac8cd95d89ad6f5), [`8cdb86c`](https://github.com/mastra-ai/mastra/commit/8cdb86ceed1137bc2768e147dce85a0692b9fb26), [`8534d79`](https://github.com/mastra-ai/mastra/commit/8534d791fa1cb70fe1c19e2604c4b63cc10dd051), [`eda90c5`](https://github.com/mastra-ai/mastra/commit/eda90c5bfd7de11805ecc9f4552716c895fbaf78), [`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0), [`9c88701`](https://github.com/mastra-ai/mastra/commit/9c8870195b41a38dc40b6ba2aa55eda04df8fa69), [`c78f8cd`](https://github.com/mastra-ai/mastra/commit/c78f8cd6222a86e6c60ae5210b6929ad5221b6fb), [`e146aad`](https://github.com/mastra-ai/mastra/commit/e146aadbba66c410ba0e74bac4c50135495cb8dd), [`ac79462`](https://github.com/mastra-ai/mastra/commit/ac79462b98f1062394c45093aa515b0766f27ee2), [`1a0ec78`](https://github.com/mastra-ai/mastra/commit/1a0ec789a26cae443744e9abbd62ed6ee676af39), [`e47bca7`](https://github.com/mastra-ai/mastra/commit/e47bca7b72866d3abd173b9f530ac4318113a8ff), [`afc004f`](https://github.com/mastra-ai/mastra/commit/afc004f5cc7e30697809e7021820b9f5881e6719), [`0031d0f`](https://github.com/mastra-ai/mastra/commit/0031d0f13831d7843ac5d498734a7d92862e2ce3), [`841a222`](https://github.com/mastra-ai/mastra/commit/841a222560d8c19238f8213713f30535cdd82284), [`64c1e0b`](https://github.com/mastra-ai/mastra/commit/64c1e0b35165c96b659818bd0177aa18794ef11f), [`40d83a9`](https://github.com/mastra-ai/mastra/commit/40d83a90d9be31a1b83e04649edb703eb7753e33), [`4e88dc6`](https://github.com/mastra-ai/mastra/commit/4e88dc6b89f154c0eae37221c8126be0c23c569f), [`19018f0`](https://github.com/mastra-ai/mastra/commit/19018f05722af74a5978781a7731a654b26f7f2a), [`19281c7`](https://github.com/mastra-ai/mastra/commit/19281c70424f757219782de16c2699743c5e04d0), [`3498b49`](https://github.com/mastra-ai/mastra/commit/3498b4946be94f4313cd817733589680dcda5278), [`d52b6fe`](https://github.com/mastra-ai/mastra/commit/d52b6fe1c56853eb38864baae0bbfa75cc739ccb), [`408be73`](https://github.com/mastra-ai/mastra/commit/408be73449dfab92b51eab8c6623b6c443debc25), [`359439b`](https://github.com/mastra-ai/mastra/commit/359439bb8c635e048176306828195f8297f50021), [`71a820b`](https://github.com/mastra-ai/mastra/commit/71a820b2353fa1406772c50760a3732058a8b337), [`1698f5e`](https://github.com/mastra-ai/mastra/commit/1698f5ec141d34f22a873efdb145ce3cdf848a5e)]:
|
|
170
|
-
- @mastra/core@1.36.0
|
|
171
|
-
|
|
172
|
-
## 0.0.3-alpha.0
|
|
173
|
-
|
|
174
|
-
### Patch Changes
|
|
175
|
-
|
|
176
|
-
- Fix endpoint URL construction for Okta org authorization servers. ([#15694](https://github.com/mastra-ai/mastra/pull/15694))
|
|
177
|
-
|
|
178
|
-
`MastraAuthOkta` concatenated `/v1/authorize` (and `/token`, `/keys`, `/logout`) directly onto `OKTA_ISSUER`. That yields the right endpoint for a custom authorization server (`https://{domain}/oauth2/default` → `.../oauth2/default/v1/authorize`), but 404s on an Okta org authorization server (`https://{domain}` → `.../v1/authorize`, whereas the real org endpoint is `.../oauth2/v1/authorize`).
|
|
179
|
-
|
|
180
|
-
An internal `endpointBase` is now derived from the issuer — verbatim when it already contains `/oauth2/`, otherwise `${issuer}/oauth2` — and used for the authorize, token, keys, and logout URLs. JWT `iss`-claim validation still uses the raw issuer so token validation stays correct on both server types. Trailing slashes on the issuer are also normalized so `OKTA_ISSUER=https://{domain}/` no longer produces `.../oauth2//v1/...`.
|
|
181
|
-
|
|
182
|
-
- Updated dependencies [[`27fd1b7`](https://github.com/mastra-ai/mastra/commit/27fd1b79ac62eb7694f92587eb7d1be05b59be01), [`a702009`](https://github.com/mastra-ai/mastra/commit/a702009d3cfaa745120f501e21c783ed4d6a3072), [`8534d79`](https://github.com/mastra-ai/mastra/commit/8534d791fa1cb70fe1c19e2604c4b63cc10dd051), [`c78f8cd`](https://github.com/mastra-ai/mastra/commit/c78f8cd6222a86e6c60ae5210b6929ad5221b6fb), [`e146aad`](https://github.com/mastra-ai/mastra/commit/e146aadbba66c410ba0e74bac4c50135495cb8dd), [`1a0ec78`](https://github.com/mastra-ai/mastra/commit/1a0ec789a26cae443744e9abbd62ed6ee676af39), [`d52b6fe`](https://github.com/mastra-ai/mastra/commit/d52b6fe1c56853eb38864baae0bbfa75cc739ccb)]:
|
|
183
|
-
- @mastra/core@1.36.0-alpha.10
|
|
184
|
-
|
|
185
|
-
## 0.0.2
|
|
186
|
-
|
|
187
|
-
### Patch Changes
|
|
188
|
-
|
|
189
|
-
- fix(auth-okta): harden security defaults and address code review feedback ([#14553](https://github.com/mastra-ai/mastra/pull/14553))
|
|
190
|
-
- Fix cache poisoning: errors in `fetchGroupsFromOkta` now propagate so the outer `.catch` evicts the entry and retries on next request
|
|
191
|
-
- Reduce cookie size: only store user claims, id_token (for logout), and expiry — access/refresh tokens are no longer stored, keeping cookies under the 4KB browser limit
|
|
192
|
-
- Add `id_token_hint` to logout URL (required by Okta)
|
|
193
|
-
- Add console.warn for auto-generated cookie password and in-memory state store in production
|
|
194
|
-
- Document missing env vars (`OKTA_CLIENT_SECRET`, `OKTA_REDIRECT_URI`, `OKTA_COOKIE_PASSWORD`) in README and examples
|
|
195
|
-
- Expand `MastraAuthOktaOptions` docs to include all fields (session config, scopes, etc.)
|
|
196
|
-
- Fix test to actually exercise `getUserId` cross-provider lookup path
|
|
197
|
-
|
|
198
|
-
- Updated dependencies [[`68ed4e9`](https://github.com/mastra-ai/mastra/commit/68ed4e9f118e8646b60a6112dabe854d0ef53902), [`085c1da`](https://github.com/mastra-ai/mastra/commit/085c1daf71b55a97b8ebad26623089e40055021c), [`be37de4`](https://github.com/mastra-ai/mastra/commit/be37de4391bd1d5486ce38efacbf00ca51637262), [`7dbd611`](https://github.com/mastra-ai/mastra/commit/7dbd611a85cb1e0c0a1581c57564268cb183d86e), [`f14604c`](https://github.com/mastra-ai/mastra/commit/f14604c7ef01ba794e1a8d5c7bae5415852aacec), [`4a75e10`](https://github.com/mastra-ai/mastra/commit/4a75e106bd31c283a1b3fe74c923610dcc46415b), [`f3ce603`](https://github.com/mastra-ai/mastra/commit/f3ce603fd76180f4a5be90b6dc786d389b6b3e98), [`423aa6f`](https://github.com/mastra-ai/mastra/commit/423aa6fd12406de6a1cc6b68e463d30af1d790fb), [`f21c626`](https://github.com/mastra-ai/mastra/commit/f21c6263789903ab9720b4d11373093298e97f15), [`41aee84`](https://github.com/mastra-ai/mastra/commit/41aee84561ceebe28bad1ecba8702d92838f67f0), [`2871451`](https://github.com/mastra-ai/mastra/commit/2871451703829aefa06c4a5d6eca7fd3731222ef), [`085c1da`](https://github.com/mastra-ai/mastra/commit/085c1daf71b55a97b8ebad26623089e40055021c), [`4bb5adc`](https://github.com/mastra-ai/mastra/commit/4bb5adc05c88e3a83fe1ea5ecb9eae6e17313124), [`4bb5adc`](https://github.com/mastra-ai/mastra/commit/4bb5adc05c88e3a83fe1ea5ecb9eae6e17313124), [`e06b520`](https://github.com/mastra-ai/mastra/commit/e06b520bdd5fdef844760c5e692c7852cbc5c240), [`d3930ea`](https://github.com/mastra-ai/mastra/commit/d3930eac51c30b0ecf7eaa54bb9430758b399777), [`dd9c4e0`](https://github.com/mastra-ai/mastra/commit/dd9c4e0a47962f1413e9b72114fcad912e19a0a6)]:
|
|
199
|
-
- @mastra/core@1.16.0
|
|
200
|
-
|
|
201
|
-
## 0.0.2-alpha.0
|
|
202
|
-
|
|
203
|
-
### Patch Changes
|
|
204
|
-
|
|
205
|
-
- fix(auth-okta): harden security defaults and address code review feedback ([#14553](https://github.com/mastra-ai/mastra/pull/14553))
|
|
206
|
-
- Fix cache poisoning: errors in `fetchGroupsFromOkta` now propagate so the outer `.catch` evicts the entry and retries on next request
|
|
207
|
-
- Reduce cookie size: only store user claims, id_token (for logout), and expiry — access/refresh tokens are no longer stored, keeping cookies under the 4KB browser limit
|
|
208
|
-
- Add `id_token_hint` to logout URL (required by Okta)
|
|
209
|
-
- Add console.warn for auto-generated cookie password and in-memory state store in production
|
|
210
|
-
- Document missing env vars (`OKTA_CLIENT_SECRET`, `OKTA_REDIRECT_URI`, `OKTA_COOKIE_PASSWORD`) in README and examples
|
|
211
|
-
- Expand `MastraAuthOktaOptions` docs to include all fields (session config, scopes, etc.)
|
|
212
|
-
- Fix test to actually exercise `getUserId` cross-provider lookup path
|
|
213
|
-
|
|
214
|
-
- Updated dependencies [[`f14604c`](https://github.com/mastra-ai/mastra/commit/f14604c7ef01ba794e1a8d5c7bae5415852aacec), [`e06b520`](https://github.com/mastra-ai/mastra/commit/e06b520bdd5fdef844760c5e692c7852cbc5c240), [`dd9c4e0`](https://github.com/mastra-ai/mastra/commit/dd9c4e0a47962f1413e9b72114fcad912e19a0a6)]:
|
|
215
|
-
- @mastra/core@1.16.0-alpha.4
|
|
216
|
-
|
|
217
|
-
## 0.0.1
|
|
218
|
-
|
|
219
|
-
### Patch Changes
|
|
220
|
-
|
|
221
|
-
- Initial release with Okta RBAC and Auth integration
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
import { Transform } from "stream";
|
|
2
|
-
//#region src/logger/index.d.ts
|
|
3
|
-
declare const RegisteredLogger: {
|
|
4
|
-
readonly AGENT: "AGENT";
|
|
5
|
-
readonly OBSERVABILITY: "OBSERVABILITY";
|
|
6
|
-
readonly AUTH: "AUTH";
|
|
7
|
-
readonly BROWSER: "BROWSER";
|
|
8
|
-
readonly NETWORK: "NETWORK";
|
|
9
|
-
readonly WORKFLOW: "WORKFLOW";
|
|
10
|
-
readonly LLM: "LLM";
|
|
11
|
-
readonly TTS: "TTS";
|
|
12
|
-
readonly VOICE: "VOICE";
|
|
13
|
-
readonly VECTOR: "VECTOR";
|
|
14
|
-
readonly BUNDLER: "BUNDLER";
|
|
15
|
-
readonly DEPLOYER: "DEPLOYER";
|
|
16
|
-
readonly MEMORY: "MEMORY";
|
|
17
|
-
readonly STORAGE: "STORAGE";
|
|
18
|
-
readonly EMBEDDINGS: "EMBEDDINGS";
|
|
19
|
-
readonly MCP_SERVER: "MCP_SERVER";
|
|
20
|
-
readonly SERVER_CACHE: "SERVER_CACHE";
|
|
21
|
-
readonly SERVER: "SERVER";
|
|
22
|
-
readonly WORKSPACE: "WORKSPACE";
|
|
23
|
-
readonly CHANNEL: "CHANNEL";
|
|
24
|
-
};
|
|
25
|
-
type RegisteredLogger = (typeof RegisteredLogger)[keyof typeof RegisteredLogger];
|
|
26
|
-
declare const LogLevel: {
|
|
27
|
-
readonly DEBUG: "debug";
|
|
28
|
-
readonly INFO: "info";
|
|
29
|
-
readonly WARN: "warn";
|
|
30
|
-
readonly ERROR: "error";
|
|
31
|
-
readonly NONE: "silent";
|
|
32
|
-
};
|
|
33
|
-
type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
34
|
-
interface BaseLogMessage {
|
|
35
|
-
runId?: string;
|
|
36
|
-
msg: string;
|
|
37
|
-
level: LogLevel;
|
|
38
|
-
time: Date;
|
|
39
|
-
pid: number;
|
|
40
|
-
hostname: string;
|
|
41
|
-
name: string;
|
|
42
|
-
}
|
|
43
|
-
declare abstract class LoggerTransport extends Transform {
|
|
44
|
-
constructor(opts?: any);
|
|
45
|
-
listLogsByRunId(_args: {
|
|
46
|
-
runId: string;
|
|
47
|
-
fromDate?: Date;
|
|
48
|
-
toDate?: Date;
|
|
49
|
-
logLevel?: LogLevel;
|
|
50
|
-
filters?: Record<string, any>;
|
|
51
|
-
page?: number;
|
|
52
|
-
perPage?: number;
|
|
53
|
-
}): Promise<{
|
|
54
|
-
logs: BaseLogMessage[];
|
|
55
|
-
total: number;
|
|
56
|
-
page: number;
|
|
57
|
-
perPage: number;
|
|
58
|
-
hasMore: boolean;
|
|
59
|
-
}>;
|
|
60
|
-
listLogs(_args?: {
|
|
61
|
-
fromDate?: Date;
|
|
62
|
-
toDate?: Date;
|
|
63
|
-
logLevel?: LogLevel;
|
|
64
|
-
filters?: Record<string, any>;
|
|
65
|
-
returnPaginationResults?: boolean;
|
|
66
|
-
page?: number;
|
|
67
|
-
perPage?: number;
|
|
68
|
-
}): Promise<{
|
|
69
|
-
logs: BaseLogMessage[];
|
|
70
|
-
total: number;
|
|
71
|
-
page: number;
|
|
72
|
-
perPage: number;
|
|
73
|
-
hasMore: boolean;
|
|
74
|
-
}>;
|
|
75
|
-
}
|
|
76
|
-
declare const createCustomTransport: (stream: Transform, listLogs?: LoggerTransport["listLogs"], listLogsByRunId?: LoggerTransport["listLogsByRunId"]) => LoggerTransport;
|
|
77
|
-
interface IMastraLogger {
|
|
78
|
-
debug(message: string, ...args: any[]): void;
|
|
79
|
-
info(message: string, ...args: any[]): void;
|
|
80
|
-
warn(message: string, ...args: any[]): void;
|
|
81
|
-
error(message: string, ...args: any[]): void;
|
|
82
|
-
trackException(error: Error, metadata?: Record<string, unknown>): void;
|
|
83
|
-
getTransports(): Map<string, LoggerTransport>;
|
|
84
|
-
listLogs(_transportId: string, _params?: {
|
|
85
|
-
fromDate?: Date;
|
|
86
|
-
toDate?: Date;
|
|
87
|
-
logLevel?: LogLevel;
|
|
88
|
-
filters?: Record<string, any>;
|
|
89
|
-
page?: number;
|
|
90
|
-
perPage?: number;
|
|
91
|
-
}): Promise<{
|
|
92
|
-
logs: BaseLogMessage[];
|
|
93
|
-
total: number;
|
|
94
|
-
page: number;
|
|
95
|
-
perPage: number;
|
|
96
|
-
hasMore: boolean;
|
|
97
|
-
}>;
|
|
98
|
-
listLogsByRunId(_args: {
|
|
99
|
-
transportId: string;
|
|
100
|
-
runId: string;
|
|
101
|
-
fromDate?: Date;
|
|
102
|
-
toDate?: Date;
|
|
103
|
-
logLevel?: LogLevel;
|
|
104
|
-
filters?: Record<string, any>;
|
|
105
|
-
page?: number;
|
|
106
|
-
perPage?: number;
|
|
107
|
-
}): Promise<{
|
|
108
|
-
logs: BaseLogMessage[];
|
|
109
|
-
total: number;
|
|
110
|
-
page: number;
|
|
111
|
-
perPage: number;
|
|
112
|
-
hasMore: boolean;
|
|
113
|
-
}>;
|
|
114
|
-
}
|
|
115
|
-
declare abstract class MastraLogger implements IMastraLogger {
|
|
116
|
-
protected name: string;
|
|
117
|
-
protected level: LogLevel;
|
|
118
|
-
protected transports: Map<string, LoggerTransport>;
|
|
119
|
-
constructor(options?: {
|
|
120
|
-
name?: string;
|
|
121
|
-
level?: LogLevel;
|
|
122
|
-
transports?: Record<string, LoggerTransport>;
|
|
123
|
-
});
|
|
124
|
-
abstract debug(message: string, ...args: any[]): void;
|
|
125
|
-
abstract info(message: string, ...args: any[]): void;
|
|
126
|
-
abstract warn(message: string, ...args: any[]): void;
|
|
127
|
-
abstract error(message: string, ...args: any[]): void;
|
|
128
|
-
getTransports(): Map<string, LoggerTransport>;
|
|
129
|
-
trackException(_error: Error, _metadata?: Record<string, unknown>): void;
|
|
130
|
-
listLogs(transportId: string, params?: {
|
|
131
|
-
fromDate?: Date;
|
|
132
|
-
toDate?: Date;
|
|
133
|
-
logLevel?: LogLevel;
|
|
134
|
-
filters?: Record<string, any>;
|
|
135
|
-
page?: number;
|
|
136
|
-
perPage?: number;
|
|
137
|
-
}): Promise<{
|
|
138
|
-
logs: BaseLogMessage[];
|
|
139
|
-
total: number;
|
|
140
|
-
page: number;
|
|
141
|
-
perPage: number;
|
|
142
|
-
hasMore: boolean;
|
|
143
|
-
}>;
|
|
144
|
-
listLogsByRunId({ transportId, runId, fromDate, toDate, logLevel, filters, page, perPage }: {
|
|
145
|
-
transportId: string;
|
|
146
|
-
runId: string;
|
|
147
|
-
fromDate?: Date;
|
|
148
|
-
toDate?: Date;
|
|
149
|
-
logLevel?: LogLevel;
|
|
150
|
-
filters?: Record<string, any>;
|
|
151
|
-
page?: number;
|
|
152
|
-
perPage?: number;
|
|
153
|
-
}): Promise<{
|
|
154
|
-
logs: BaseLogMessage[];
|
|
155
|
-
total: number;
|
|
156
|
-
page: number;
|
|
157
|
-
perPage: number;
|
|
158
|
-
hasMore: boolean;
|
|
159
|
-
}>;
|
|
160
|
-
}
|
|
161
|
-
type LogFilterContext = {
|
|
162
|
-
component?: RegisteredLogger;
|
|
163
|
-
level: LogLevel;
|
|
164
|
-
message: string;
|
|
165
|
-
args: unknown[];
|
|
166
|
-
};
|
|
167
|
-
type LogFilter = (ctx: LogFilterContext) => boolean;
|
|
168
|
-
interface ConsoleLoggerOptions {
|
|
169
|
-
name?: string;
|
|
170
|
-
level?: LogLevel;
|
|
171
|
-
component?: RegisteredLogger;
|
|
172
|
-
filter?: LogFilter;
|
|
173
|
-
}
|
|
174
|
-
declare class ConsoleLogger extends MastraLogger {
|
|
175
|
-
protected component?: RegisteredLogger;
|
|
176
|
-
protected filter?: LogFilter;
|
|
177
|
-
constructor(options?: ConsoleLoggerOptions);
|
|
178
|
-
child(componentOrBindings: RegisteredLogger | Record<string, unknown>): ConsoleLogger;
|
|
179
|
-
private shouldLog;
|
|
180
|
-
private prefix;
|
|
181
|
-
debug(message: string, ...args: any[]): void;
|
|
182
|
-
info(message: string, ...args: any[]): void;
|
|
183
|
-
warn(message: string, ...args: any[]): void;
|
|
184
|
-
error(message: string, ...args: any[]): void;
|
|
185
|
-
listLogs(_transportId: string, _params?: {
|
|
186
|
-
fromDate?: Date;
|
|
187
|
-
toDate?: Date;
|
|
188
|
-
logLevel?: LogLevel;
|
|
189
|
-
filters?: Record<string, any>;
|
|
190
|
-
page?: number;
|
|
191
|
-
perPage?: number;
|
|
192
|
-
}): Promise<{
|
|
193
|
-
logs: never[];
|
|
194
|
-
total: number;
|
|
195
|
-
page: number;
|
|
196
|
-
perPage: number;
|
|
197
|
-
hasMore: boolean;
|
|
198
|
-
}>;
|
|
199
|
-
listLogsByRunId(_args: {
|
|
200
|
-
transportId: string;
|
|
201
|
-
runId: string;
|
|
202
|
-
fromDate?: Date;
|
|
203
|
-
toDate?: Date;
|
|
204
|
-
logLevel?: LogLevel;
|
|
205
|
-
filters?: Record<string, any>;
|
|
206
|
-
page?: number;
|
|
207
|
-
perPage?: number;
|
|
208
|
-
}): Promise<{
|
|
209
|
-
logs: never[];
|
|
210
|
-
total: number;
|
|
211
|
-
page: number;
|
|
212
|
-
perPage: number;
|
|
213
|
-
hasMore: boolean;
|
|
214
|
-
}>;
|
|
215
|
-
}
|
|
216
|
-
//#endregion
|
|
217
|
-
export { LogFilter as a, LoggerTransport as c, createCustomTransport as d, IMastraLogger as i, MastraLogger as l, ConsoleLogger as n, LogFilterContext as o, ConsoleLoggerOptions as r, LogLevel as s, BaseLogMessage as t, RegisteredLogger as u };
|
|
218
|
-
//# sourceMappingURL=index-S1lgaKO7.d.ts.map
|