Skip to content

Migrating to v11 ​

The changes below break a host or module that compiles against GrydAuth. Apply the Auth migrations before starting the new version.

Access-grant events ​

AddAuthMembershipAuditIntegration now also registers routes for auth.user-role.changed, auth.user-permission.changed and auth.role-permission.changed, each with an acknowledgement consumer that writes nothing. A host already composed needs no change and never sends these messages to OUTBOX_NO_CONSUMERS. A host using RequireRouteAdmission must admit the three kinds with AdmitRoute; until it does, their messages stay pending and hold back later messages of the same stream.

Details are in User write observability.

Assigning or removing a role or direct permission advances UserTenant.AccessChangeSequence, and changing a role's permissions advances the new Role.AccessChangeSequence. Both are concurrency tokens: two concurrent changes to the same link or role now produce a conflict instead of both succeeding.

A production host does not start with the seeded admin's public password ​

The migrations seed an admin (admin@local.com) whose password the framework publishes. Outside Development the host now refuses to start while that admin is active and still has it. The error names the way out and never prints the password. The tables not existing yet is only a warning; the check runs again on the next start.

For a host in production, in this order:

  1. Provide the new password as GrydAuth:SeedAdmin:Password, through the secret store of the deploy and never in a committed file.

  2. Turn the step on where the host applies the migrations:

    csharp
    await app.ApplyGrydAuthMigrationsAsync(new GrydAuthMigrationOptions
    {
        ReplaceSeedAdminPublicPassword = true
    });
  3. Deploy. The step replaces the password on the first run and requires the admin to change it at the first login. It touches the admin only while it still has the public password, so every later start and every password the admin chose are left alone. Without GrydAuth:SeedAdmin:Password it does nothing.

If the admin's password was already changed by hand, nothing is needed: the host starts. A host that must start with the public password anyway — a test host outside Development, for instance — sets GrydAuth:SeedAdmin:AllowPublicPassword to true. Development is never checked.

Signatures ​

BeforeNow
PlatformGrant.OfRoles(keys)IPlatformAuthorizationCatalog.GrantOf(keys)
IRolePermissionComposer.ComposeFromCatalogTemplateComposeNewFromCatalogTemplate for a new role; ConvergeFromCatalogTemplate for an existing one
new AuthorizationCatalogContribution(permissions, roles)adds retiredPermissions and retiredRolePermissions
IUserRelationshipServiceremoved; it had no caller
Permission.Create and UpdateDetails refused platform namesuse ITenantPermissionWriter, which also knows contributed names
UserPlatformRole.Grant refused unknown keysuse IPlatformRoleGrantService, the only path allowed to grant
IUserDirectoryReader only in AddGrydAuthReadersalso in AddGrydAuth; both compositions add IUserCultureReader

Audit routes and the Jobs dashboard ​

GrydAuth.Infrastructure references GrydAudit.Infrastructure, not the GrydAudit aggregator. A host that exposed the audit routes only through that transitive reference must reference GrydAudit or GrydAudit.API.

The GrydJobs dashboard is read-only for everyone. Operate through the API routes, which require manage:jobs and write JobOperation audit entries.

Released under the MIT License.