Upgrade to Elsa 3.9.0
What's new in Elsa 3.9.0 and how to upgrade from 3.8.
Elsa 3.9.0 ships Core, Studio and Extensions together. Upgrade all three at once: Studio 3.9 requires Core 3.9, and mixing versions can fail at AddElsa() with a TypeLoadException.
What's new
Permission-based access everywhere. Permissions use a structured
resource:verbmodel, and Studio hides what a user can't use. See Elsa API permissions.A dashboard for every user, gated per section. See Dashboard access.
Sign-out for Elsa Identity that revokes the session. See Sign out.
Simpler Roles screens in Studio. See Manage roles in Studio.
Tenant isolation fixes in Core, MongoDB and Dapper, and a bookmark queue that resumes in every tenant.
Dapper migrations work on fresh databases, including PostgreSQL.
New modules: User Tasks, BPMN, MQTT, LDAP and Proto.Actor Redis Pub/Sub.
Update packages
Set every Elsa.* and Elsa.Studio.* package to 3.9.0. The Studio npm packages are @elsa-workflows/elsa-studio-wasm and @elsa-workflows/elsa-studio-wasm-react.
If your Elsa.Templates version is older than 3.9.0, update the generated package references to 3.9.0, then follow this page.
Re-author role permissions
This is the biggest change. Permissions are now {resource}:{verb}, for example workflows/definitions:view. Legacy strings such as read:workflow-definitions no longer authorize anything.
*keeps working, so the seeded admin role still has full access.At startup, Elsa logs every stored permission that no longer resolves. The Studio Roles editor lists them under Review and repair.
Some legacy permissions map to several new ones. Use the full mapping rather than a one-for-one rename.
read:*andexec:*become*:viewand*:execute, which now cover every resource. Review roles that hold them.exec:csharp-expressionsandexec:python-expressionsare removed.CSharpOptions.AllowHostCodeExecutionandPythonOptions.AllowHostCodeExecutionare the only control.manage:user-tasksbecomesuser-tasks:supervise.Setting the default roles of an unlinked-identity policy needs
external-authentication/policies/default-roles:update.The
<Module>Permissionsconstant classes (DashboardPermissions,SecretsPermissionsand others) are removed. Use<Module>ResourcePermissionswith a verb.
Descriptor catalogs, GET /features/installed and GET /resilience/strategies are now readable by any signed-in user. The activity catalog includes workflows marked as usable as activities, so every signed-in user in the tenant can see their names, descriptions and inputs.
See the Core authorization model migration guide for details.
Identity and tokens
The default
AccessTokenLifetimeis 15 minutes (was 1 hour). Permission changes apply at the next token refresh.PermissionStamphas no effect in 3.9.Refresh with a missing, blank, conflicting or unknown subject returns
401(was200withisAuthenticated: false). Refresh tokens withoutsub, which only 3.8.0-preview1 issued, are rejected; those users sign in again. See Refresh-token subject requirements.Elsa-issued tokens always carry
permissions. A user with no grants getsnone.The
SecurityRootpolicy and the localhost permission grant are removed, includingEnableLocalHostPermissionGrantForSecurityRoot(). Bootstrap withUseDefaultAdminorUseAdminApiKey.POST /identity/secrets/hashrequiresidentity/users:create.A custom
IAccessTokenIssuermust implementIssueTokensAsync(User, SignInSession?, CancellationToken).DefaultIdentityRefreshTokenService's constructor requires aSessionRevoker. Resolve it from DI.
Database migrations
Elsa's startup migration applies these unless RunMigrations is off. Otherwise apply them yourself, and apply RevokedSessions before upgraded hosts refresh tokens.
Identity
PerTenantIdentityUniqueness, RevokedSessions
Labels
PerTenantLabelUniqueness
Secrets
SecretTenancy, SecretDefaultTenantUniqueness
User Tasks
Initial
MongoDB
3.9 treats an empty-string
TenantIdasnull. 3.9 previews stored""for default-tenant roles and users; migrate those rows tonull.Multitenant 3.8 installs: set code-defined workflow definition rows to
TenantId: "*", or delete them and let the populator recreate them. Otherwise other tenants logE11000at startup.
Dapper
Migration
20008runs on the next migrate. It createsKeyValuesand addsBookmarkQueueItems.SerializedOptionswhere they are missing.PostgreSQL databases on 3.6–3.8 stuck at migration
10002: runDELETE FROM "VersionInfo" WHERE "Version" = 10001;, then migrate up.Hand-made lowercase, unquoted PostgreSQL schemas are not supported.
Studio hosts
OIDC Blazor Server: sign-out is now an antiforgery-protected
POST /authentication/logout. A custom_Host.cshtmlneeds<persist-component-state />before_framework/blazor.server.js. See Studio Integration.The Elsa Identity and OpenID Connect sign-in modules add a user menu with Sign out. Remove your own user menu if you added one.
External Authentication interfaces are renamed to
IExternalAuthenticationConnectionManagementApiandIExternalIdentityLinkManagementApi, and their old permission constants are removed.DefaultMenuServicehas a new optionalIPermissionServiceparameter, andElsaIdentityRefreshTokenServicetakes anElsaIdentitySessionGate. Resolve them from DI; if you construct or subclass them, pass the new arguments.If a third-party OIDC token has no
permissionsclaim, Studio hides nothing and the server decides.
Behaviour changes
Named
WithVariable(name, value)now uses workflow storage, so the value survives suspend and resume.When a referenced workflow is published, ElsaScript and other source-based consumers are skipped with a warning and keep the old version.
PauseAsyncandResumeAsyncthrow when the token is already cancelled.MemoryKeyValueStore.SaveAsyncthrowsInvalidOperationExceptionon a cross-tenant key conflict.
API and extensibility
IKeyValueStore.TryDeleteAsyncis new, with a default implementation. Shared stores should override it; decorators must forward it.ISqlDialecthas new members with defaults:Update,QuoteIdentifier,BooleanLiteral.MemoryKeyValueStoreandKeyValueWorkflowDispatchOutboxStoretake an optionalITenantAccessor.EndpointPermissionRegistry.FindandAllleave out endpoints that accept any of several permissions. UseFindRequirementandAllRequirements.TryMarkInterruptedAsyncignoresallowFinishedCancelled.
Multitenant rolling upgrades
The bookmark queue lock and the outbox scan marker are now per tenant. The administrative pause key is now tenant-agnostic (elsa.quiescence.host-pause.{shell}). The first 3.9 node moves a 3.8 pause to the new key, so finish the upgrade before relying on AcrossReactivations. See the Core release notes for details and an optional cleanup query.
Known limitations
Access tokens stay valid until they expire after sign-out.
With MongoDB or Dapper, session revocation is held in memory per node.
Password reset and user deletion don't end sessions; there is no "sign out everywhere".
Studio shows permission changes, or a disabled user, after a page reload. Other tabs and Blazor Server circuits stay signed in until their next call.
Drain force-cancel doesn't reach running activities through their cancellation token (fix planned for 3.10).
Last updated