0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
Commit graph

4 commits

Author SHA1 Message Date
Joel Smith
f23aaea9a7
chore: update Enterprise Edition license (#24708)
Updates the repository's Enterprise Edition license from Version 1.0 to
Version 2.0, effective September 22, 2026. The new terms define
Enterprise Features, Development and Testing, Production Use,
license-key requirements, agreement precedence, termination, and general
legal terms.\n\nTest plan: reviewed the rendered license text and ran
`git diff --check`. No package changes or runtime tests are required for
this license-only update.
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/mastra-ai/mastra/pull/24708"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## ELI5

This PR replaces the Enterprise Edition license with clearer Version 2.0
terms. It explains what users may do during development and what is
required for production use.

## Summary

- Updates `ee/LICENSE` to Version 2.0, effective September 22, 2026.
- Defines Enterprise Features and Development and Testing.
- Requires a written agreement and valid License Key for Production Use.
- Adds rules for modifications, redistribution, hosted services, License
Keys, entitlement checks, termination, and third-party components.
- Defines agreement precedence and general legal terms.
- Makes no code or package changes.

## Testing

- Review the rendered license text.
- Run `git diff --check`.
- Runtime tests are not required.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-23 16:19:37 -07:00
Joel Smith
c38d8f1af4
chore: update Enterprise Edition license (#22336)
Updates the Mastra Enterprise Edition license to Version 1.0, effective
August 24, 2026. It also clarifies that conflicting
limitation-of-liability, warranty, and termination terms in a written
agreement with Kepler take precedence over the license.
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/mastra-ai/mastra/pull/22336"
target="_blank">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open in Devin Review">
  </picture>
</a>
<!-- devin-review-badge-end -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## ELI5

The development server now shows a clear command for deployment. The
Enterprise Edition license also includes its effective date and clearer
agreement rules.

## Changes

- Added `Deploy: mastra deploy` to `DevLogger.ready()`.
- Added tests for the Studio URL, API URL, deploy command, order, and
alignment.
- Updated the Enterprise Edition license:
  - Effective date: August 24, 2026.
- Conflicting limitation-of-liability, warranty, and termination terms
in a written agreement with Kepler take precedence.
- Added a patch changeset for `mastra`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-25 17:01:32 -04:00
Joel Smith
428262fb61
Revise LICENSE with updated copyright and terms (#16744)
Updated copyright year and clarified terms for production use of
enterprise features

## Description
Worked with our team to update our enterprise license for clarity around
what changes are needed and what kind of agreement is required with our
team.
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/mastra-ai/mastra/pull/16744"
target="_blank">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open in Devin Review">
  </picture>
</a>
<!-- devin-review-badge-end -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## ELI5 (Explain Like I'm 5)

This PR updates the license agreement for Mastra's Enterprise Edition to
reflect the current year (2026) and clarifies the rules for using
enterprise features in production. Instead of referencing specific
license seat requirements, companies now need to get a custom written
agreement directly from Kepler Software to use it in production.

## Changes

### License Text Updates (`ee/LICENSE`)

The Enterprise Edition license has been revised with the following key
changes:

**Copyright & Effective Date**
- Updated copyright year to 2026

**Production Use Requirements**
- Replaced the generic production restriction with a requirement for an
explicitly written agreement from Kepler Software that permits
production use
- Removed specific references to Mastra Terms of Service URLs
- Removed specific reference to "valid Mastra Enterprise License for the
correct number of user seats"

**Modifications & Patches**
- Changed the permitted action from "publishing patches" to "submitting
patches to Kepler for upstream inclusion"

**Warranty & Liability**
- Updated the "AS IS" warranty disclaimer to include "WITH ALL FAULTS"
- Expanded liability language to explicitly reference Kepler or its
licensors (as applicable), including affiliates
- Refined third-party component licensing language for clarity

**Impact**: 32 lines added, 24 lines removed

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/mastra-ai/mastra/pull/16744?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-18 17:32:11 -04:00
Ryan Hansen
6dbeeb94a8
feat: auth core, server RBAC, and adapter permission enforcement (#13163)
## Summary

PR 1 of 3 from the `auth-rbac-cms` branch split. This PR adds all
backend plumbing for auth/RBAC. PRs 2 (auth providers) and 3 (playground
UI) depend on this and can land in parallel once this merges.

- **New `@mastra/core/auth` export** — interfaces for RBAC, sessions,
SSO, credentials, ACL, and user management, plus default implementations
(static RBAC provider, cookie/memory session providers, built-in roles)
- **Server auth handlers** — login, signup, logout, session management,
and SSO flows with Zod-validated schemas
- **Route-level permission enforcement** — `requiresPermission` on route
configs with convention-based derivation from path/method (e.g. `GET
/agents/:id` → `agents:read`)
- **Server adapter RBAC middleware** (Hono, Express, Fastify, Koa) —
resolves user permissions via RBAC provider, cookie auth fallthrough for
session-based auth
- **Authorization policy fix** — `isProtectedPath` now uses
`isProtectedCustomRoute` instead of `!isCustomRoutePublic`, fixing a bug
where studio UI couldn't load in production
- **Deployer updates** — `MASTRA_PACKAGES_FILE` env var injection,
dynamic CORS origin when auth configured
- **Client SDK** — `getFullUrl` helper, `AuthCapabilities` type export

### Key behavioral changes

| Change | Risk | Mitigation |
|---|---|---|
| `SimpleAuth<TUser>` → `SimpleAuth<TUser extends EEUser>` | Medium —
requires `id` + `email` fields | Intentional; compile-time catch |
| `isProtectedPath` logic change | Medium — authorization policy | New
tests cover this; required for studio login in prod |
| Cookie fallthrough in Hono auth middleware | Low | Falls back to 401
if no user found |
| No RBAC → authenticated users get full access | Low — intentional |
Auth-only mode preserved |
| CORS dynamic origin when auth configured | Low | Only activates with
auth config; user can override |

### Deviation from plan

`deployers/cloud/package.json` — the plan called for adding
`@mastra/auth-cloud` dependency, but that package is created in PR 2.
Omitted here to avoid workspace resolution failure; PR 2 will add it.

### Fixed pre-existing test bug

All 4 adapter RBAC tests had a failing test ("should derive permissions
from route path/method when not explicitly set") that registered an API
handler at `/agents/test` with no prefix. That's a frontend/SPA path —
real API handlers are always under `/api/*`. Fixed the test to use
`prefix: '/api'` so the route is at `/api/agents/test`, matching how
routes are actually registered. Verified the bug exists on
`auth-rbac-cms` with clean install + build.

## Test plan

- [x] `pnpm build:packages` — 35/35 tasks pass
- [x] Core auth tests (cookie.test.ts) — 16/16 pass
- [x] Server tests (permissions, helpers, system) — 177/177 pass
- [x] Hono RBAC tests — 21/21 pass
- [x] Express RBAC tests — 15/15 pass
- [x] Fastify RBAC tests — 15/15 pass
- [x] Koa RBAC tests — 15/15 pass
- [x] Client SDK tests (base.test.ts) — 5/5 pass
- [ ] Verify no auth configured → all existing behavior identical (no
403s, no auth prompts)
- [ ] Verify pre-commit hooks pass (eslint + prettier)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Enterprise auth: SSO and credentials sign-in/sign-up, login/logout,
cookie and in-memory sessions, auth capabilities and current-user
endpoints.
* RBAC: default roles, static RBAC provider, route-level permission
enforcement and middleware across adapters.
  * Client: full-URL helper; system responses include isDev.
* Deploy/build: bundling emits package metadata; deployers set runtime
packages file and adjust CORS when auth is enabled.

* **Bug Fixes**
  * Studio UI loads correctly in production.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Shane Thomas <shane@codekarate.com>
Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai>
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-03-03 22:49:10 +01:00