Projects
Running Spoletta with projects
For whoever installs and runs Spoletta: what a new install and an upgrade start with, letting people in, setting up groups, and what projects don't keep apart.
A new install
A new install has one project, Legacy, empty, which gets what Spoletta is configured with outside the app. The people whose emails are in ADMIN_EMAILS are admins of Spoletta and enter it, and every project, as owners. Anyone else signing in is in no project, and is told to ask the admins, until given access. Without sign-in there is nobody: everyone is every project's owner.
An admin then sets up Legacy, or makes a project per team on the Projects page and lets people in. See With Docker, With Podman or On Kubernetes for installing, and Sign-in and secrets for ADMIN_EMAILS and the identity provider.
Upgrading to projects
v3.0.0 brings projects. As the webapp starts, its migrations put everything there is in Legacy, and make everyone who was there its member by hand: admins as owners, everyone else as editors. Deploy the worker first, or both together, never the webapp alone. Scripts calling the app's /api/ must then name a project in an X-Spoletta-Project header; see Starting flows over the API. The Upgrading to v3.0.0 note on each install page has the whole of it, going back included.
Letting people in
After an upgrade, everyone who was there is in Legacy, but someone signing in for the first time is in no project. A project's owners let people in, in its settings' Access tab, in any of three ways:
- Everyone, as before: set Legacy's Everyone else signed in to Change and run it, and anyone signed in enters it as an editor, as they did before projects.
- By group: give each project to the groups that work in it; see Groups.
- By hand: add people by email, once they have signed in or an admin of Spoletta has added them; see Giving access.
Setting up groups
For a project to be given to a group, your identity provider must say which groups people are in. Set OIDC_GROUPS_CLAIM to the claim that says so, such as groups, and map the groups into it at your provider: a string or a list of strings, in the ID token or in what the provider's userinfo endpoint says. Each sign-in replaces the person's groups with those it carries. Signing in with Google carries none.
While someone is signed in, their groups are read again every hour, or every half of GROUPS_MAX_AGE if that is shorter, with the refresh token the provider gave their session; let the client use refresh tokens at your provider. Where they can't be read again, the session of someone in any group ends once their groups are older than GROUPS_MAX_AGE, 24 hours unless set, so they sign in again. Someone in no group isn't read again, so a group they are put in counts from their next sign-in. See Groups for the settings.
What projects don't keep apart
- Steps in one process. With
SANDBOX=processa step can read every project's workspaces, shared repositories and the worker's environment. Run steps in containers or pods once projects are anyone's but one team's; see Between projects. - Owners' addresses. The addresses a project's owners set are called from the webapp: a model provider's, an MCP server's and a connector's at any address, and a credential's at any but a few. So an owner of any project can have the webapp call a service on its own network. Make owners of people you would trust with that. Only steps' own internet access is kept to public addresses outside Legacy.
- Disk. A project's shared repositories count toward no run's disk limit.
- Groups. Groups are as fresh as their last reading, and what runs on someone's behalf counts their groups as last read.
- Within a project. Access is to a whole project; within it, a flow is kept to its maker or a team by who it belongs to.