-
Notifications
You must be signed in to change notification settings - Fork 610
docs(docs): Document multi-org OSS and the upgrade path #4677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
243a5cf
docs(docs): multi-org OSS docs and GitButler workflow notes
jp-agenta 6a393bf
docs(agents): GitButler stacking gotchas and oplog recovery
jp-agenta f09c3b8
docs(docs): add OSS to EE switch runbook for self-hosting
jp-agenta c24a288
docs(docs): pin OSS to EE switch guide to v0.104.0 in title and intro
jp-agenta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 47 additions & 12 deletions
59
docs/docs/self-host/guides/06-restrict-organization-creation.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,64 @@ | ||
| --- | ||
| title: Restrict Organization Creation | ||
| sidebar_label: Restrict Org Creation | ||
| description: Control which users can create organizations in your self-hosted Agenta Enterprise deployment. | ||
| title: Restrict Sign-ups and Organization Creation | ||
| sidebar_label: Restrict Access | ||
| description: Control who can sign up and who can create organizations in your self-hosted Agenta deployment, in both the open source and Enterprise editions. | ||
| --- | ||
|
|
||
| import Admonition from "@theme/Admonition"; | ||
| By default, anyone who can reach your Agenta instance can sign up and gets their own organization. This guide shows how to close that down. All settings on this page work in both the open source and Enterprise editions. | ||
|
jp-agenta marked this conversation as resolved.
|
||
|
|
||
| <Admonition type="warning" title="Enterprise Feature"> | ||
| Organization creation restriction requires an Agenta Enterprise license. <a href="https://cal.com/mahmoud-mabrouk-ogzgey/demo">Book a demo</a> or <a href="mailto:team@agenta.ai">contact our team</a> to get started. | ||
| </Admonition> | ||
| ## Restrict who can create organizations | ||
|
|
||
| Set `AGENTA_ORG_CREATION_ALLOWLIST` to a comma-separated list of emails allowed to create organizations. | ||
| Set `AGENTA_ACCESS_ALLOWED_OWNER_EMAILS` to a comma-separated list of emails allowed to create organizations: | ||
|
|
||
| ```bash | ||
| AGENTA_ORG_CREATION_ALLOWLIST=admin@company.com,ops@company.com | ||
| AGENTA_ACCESS_ALLOWED_OWNER_EMAILS=admin@company.com,ops@company.com | ||
| ``` | ||
|
|
||
| When this variable is set, only the listed emails can create organizations. Everyone else must be invited to an existing one. When it is not set, any user can create organizations (the default). | ||
| When this variable is set, only the listed emails get an organization on signup and can create new ones. Everyone else must be invited to an existing organization. When it is not set, any user who signs up gets their own organization (the default). | ||
|
|
||
| Restart your Agenta deployment after changing this variable. | ||
| The legacy names `AGENTA_ORG_CREATION_ALLOWLIST` and `AGENTA_ACCESS_ORG_CREATION_ALLOWLIST` are still parsed as aliases. | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| :::caution First user must be in the allowlist | ||
| The first user to sign up needs to be in the allowlist. Otherwise, they will not be able to create the initial organization. | ||
| ::: | ||
|
|
||
| ## Restrict who can sign up | ||
|
|
||
| To limit sign-ups to your own domains, set `AGENTA_ACCESS_ALLOWED_DOMAINS`: | ||
|
|
||
| ```bash | ||
| AGENTA_ACCESS_ALLOWED_DOMAINS=company.com | ||
| ``` | ||
|
|
||
| Subdomains match too (`user@team.company.com` is allowed by `company.com`). Any email outside the listed domains is denied at sign-in and sign-up. | ||
|
|
||
| To block specific addresses or domains instead, use the block lists: | ||
|
|
||
| ```bash | ||
| AGENTA_ACCESS_BLOCKED_EMAILS=spammer@example.com | ||
| AGENTA_ACCESS_BLOCKED_DOMAINS=example.org | ||
| ``` | ||
|
|
||
| When `AGENTA_ACCESS_ALLOWED_DOMAINS` is set, the block lists for domains are not consulted; the allowlist wins. | ||
|
|
||
| Restart your Agenta deployment after changing any of these variables. | ||
|
|
||
| ## How restricted users join | ||
|
|
||
| Users not in the allowlist can still sign up, but they will not have an organization. You need to either enable auto-join for a domain from **Settings > Access & Security**, or invite users from **Settings > Workspace > Members** before they sign up. | ||
| Users who pass the sign-up checks but are not allowed to create an organization can still sign in. They have no organization until someone invites them: | ||
|
|
||
| 1. As an organization member with invite rights, go to **Settings > Workspace > Members** and invite their email. | ||
| 2. The user accepts the invitation and becomes a member of that organization. | ||
|
|
||
| On Enterprise, you can also enable auto-join for a verified domain from **Settings > Access & Security**, so users from that domain join the organization automatically on signup. | ||
|
|
||
| ## Reference | ||
|
|
||
| | Variable | Effect | | ||
| |---|---| | ||
| | `AGENTA_ACCESS_ALLOWED_OWNER_EMAILS` | Only listed emails can create organizations | | ||
| | `AGENTA_ACCESS_ALLOWED_DOMAINS` | Only listed domains (and subdomains) can sign up | | ||
| | `AGENTA_ACCESS_BLOCKED_DOMAINS` | Listed domains cannot sign up | | ||
| | `AGENTA_ACCESS_BLOCKED_EMAILS` | Listed emails cannot sign up | | ||
|
|
||
| See the [configuration reference](/self-host/configuration) for the full list of environment variables. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| --- | ||
| title: Migrate to Multi-Organization OSS (v0.104.0) | ||
| sidebar_label: pre-v0.104.0 → v0.104.0 (multi-org OSS) | ||
| description: 'What changes for self-hosted OSS deployments upgrading to v0.104.0, when Agenta becomes multi-organization: open signup replaces invite-only, membership rows are backfilled, and the access env vars are now enforced. Covers what to set before upgrading.' | ||
| --- | ||
|
|
||
| :::info When you need this guide | ||
| You're on this page if you run a self-hosted **OSS** Agenta instance on a version before **v0.104.0**. v0.104.0 removes the single-organization limit from OSS: every allowed user gets their own organization on signup, organizations can be created, renamed, transferred, and deleted from the UI, and the `AGENTA_ACCESS_*` variables are enforced the same way as in EE. EE deployments are unaffected; their behavior already worked this way. | ||
| ::: | ||
|
|
||
| ## The one thing to do before upgrading | ||
|
|
||
| **Your instance flips from invite-only to open signup.** Before v0.104.0, only the first user could sign up freely; everyone else needed an invitation to your single organization. After v0.104.0, anyone who can reach your instance can sign up and gets their own organization. | ||
|
|
||
| If your instance is reachable beyond a trusted network, set access controls in your environment file **before** upgrading: | ||
|
|
||
| ```bash | ||
| # Only these emails can create organizations; everyone else needs an invitation | ||
| AGENTA_ACCESS_ALLOWED_OWNER_EMAILS=admin@company.com | ||
|
|
||
| # Optional: only these domains can sign up at all | ||
| AGENTA_ACCESS_ALLOWED_DOMAINS=company.com | ||
| ``` | ||
|
|
||
| See [Restrict Sign-ups and Organization Creation](/self-host/guides/restrict-organization-creation) for all options. If your instance is on a private network or open signup is what you want, there is nothing to do. | ||
|
|
||
| ## What the migration does to your data | ||
|
|
||
| The schema migrations run as part of the normal [upgrade process](/self-host/upgrading). For existing deployments they: | ||
|
|
||
| - Create the `organization_members`, `workspace_members`, and `project_members` tables and backfill them: the organization owner becomes an `owner` member, and every user who joined through an invitation becomes a member with the role from their invitation. | ||
| - Keep your existing organization as a normal organization. Its members, projects, and data are untouched; it just stops being special. | ||
| - Tighten a few constraints (`api_keys.project_id`, `projects.organization_id`/`workspace_id` become required). API keys created before project scoping existed are removed; they could not authenticate anything. | ||
| - Drop the legacy tables of the old app-centric architecture (`app_db`, `app_variants`, old `testsets`, old evaluation tables, and similar). Their data was migrated to the current entities by earlier releases. If you skipped many releases, upgrade through them in order. | ||
|
|
||
| ## What changes day to day | ||
|
|
||
| - Users in your organization see an organization switcher and a "New organization" entry in the sidebar. Whether new organizations can actually be created depends on `AGENTA_ACCESS_ALLOWED_OWNER_EMAILS`. | ||
| - Organization owners can rename, transfer, and delete organizations from the sidebar. | ||
| - Inviting users works as before. Accepted invitations now create explicit membership records. | ||
| - Role-based access control, SSO, and domain verification remain EE features. OSS roles stay coarse (owner and member). | ||
|
|
||
| ## Rollback | ||
|
|
||
| The membership backfill and constraint changes are reversible with `alembic downgrade`, but the legacy-table drop is not. Take a database backup before upgrading, as with any release. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.