myKEY4.Permissions 18.13.0-a.100

myKEY4.Permissions

Authorization for the myKEY4 hosts: one policy per PermissionType, evaluated against the permissions schema, with the results cached in a FusionCache shared by every host.

Registration

Once per host that authorizes requests, both calls:

builder.Services.AddPermissionsCache(builder.Configuration);   // reads ConnectionStrings:Redis
builder.Services.AddAuthorizationServices<WriteDbContext>();   // or AddAuthorizationServices(connectionString)

AddPermissionsCache registers the named cache permissions (PermissionsCacheConstants): keys and backplane channel prefixed mykey4.permissions:, on a dedicated Redis connection mykey4.permissions, 5 minutes in memory and in Redis, no fail-safe. The prefix is the same in every host on purpose: that is what lets an eviction made by one host reach the others. A host that calls AddAuthorizationServices without AddPermissionsCache, or registers the cache twice, stops at startup.

Evicting an entry

After SaveChanges, once the data has changed, call the matching PermissionsCacheInvalidator method (a singleton registered by AddAuthorizationServices):

await permissionsCache.InvalidateClientOperationsAsync(clientId, cancellationToken);
Method After a change to
InvalidateClientsAsync the list of clients
InvalidateClientOperationsAsync(clientId) the events or communities of a client
InvalidateCommunityEventsAsync(communityId) the events of a community
InvalidateOperationModulesAsync(operationId) the modules activated on an operation
InvalidateApplicationUserRolesAsync(identityUserId) the roles of a user
InvalidateApplicationClientRolesAsync(jwtClientId) the roles of an application client

The cache keys are internal: the invalidator is the only way to evict an authorization entry.

Tests

Register the permissions cache in the test composition yourself: a per-factory prefix on keys and backplane for Redis-backed tests, a NullFusionCache named permissions otherwise. Never the production prefix in a shared test Redis. TestsHelpers/MockedAuthorizationReadDbContext evicts through its CacheProvider.

No packages depend on myKEY4.Permissions.

Version Downloads Last updated
18.19.0-a.87 9 09/25/2026
18.18.0-a.84 5 09/24/2026
18.17.0-a.83 2 09/24/2026
18.17.0-a.82 7 09/23/2026
18.16.0-a.79 4 09/22/2026
18.16.0-a.76 3 09/22/2026
18.16.0-a.75 3 09/22/2026
18.15.0 78 10/23/2026
18.15.0-a.105 1 10/23/2026
18.15.0-a.80 3 09/23/2026
18.15.0-a.78 2 09/22/2026
18.15.0-a.77 1 09/22/2026
18.15.0-a.69 3 09/20/2026
18.15.0-a.68 8 09/19/2026
18.14.0 61 10/15/2026
18.14.0-a.103 0 10/15/2026
18.14.0-a.67 3 09/19/2026
18.14.0-a.66 6 09/19/2026
18.13.0 45 10/06/2026
18.13.0-a.101 2 10/06/2026
18.13.0-a.100 3 10/01/2026
18.13.0-a.65 4 09/18/2026
18.13.0-a.64 3 09/18/2026
18.13.0-a.63 4 09/18/2026
18.13.0-a.62 4 09/18/2026
18.13.0-a.61 3 09/18/2026
18.13.0-a.58 18 09/15/2026
18.12.0 36 09/30/2026
18.12.0-a.98 2 09/30/2026
18.12.0-a.54 4 09/15/2026
18.12.0-a.50 4 09/15/2026
18.12.0-a.48 9 09/13/2026
18.11.1-a.97 1 09/30/2026
18.11.0 20 09/28/2026
18.11.0-a.92 1 09/30/2026
18.11.0-a.90 3 09/28/2026
18.11.0-a.89 2 09/28/2026
18.11.0-a.86 7 09/25/2026
18.11.0-a.81 3 09/23/2026
18.11.0-a.55 2 09/15/2026
18.11.0-a.47 3 09/12/2026
18.11.0-a.46 15 09/12/2026
18.10.1 17 09/30/2026
18.10.1-a.95 2 09/30/2026
18.10.0 44 09/22/2026
18.10.0-a.73 3 09/22/2026
18.10.0-a.56 5 09/15/2026
18.10.0-a.51 3 09/15/2026
18.10.0-a.43 11 09/10/2026
18.9.0 12 09/21/2026
18.9.0-a.71 3 09/21/2026
18.9.0-a.70 5 09/21/2026
18.9.0-a.60 3 09/17/2026
18.9.0-a.59 3 09/17/2026
18.9.0-a.57 3 09/15/2026
18.9.0-a.52 4 09/15/2026
18.9.0-a.49 16 09/15/2026
18.9.0-a.45 6 09/10/2026
18.9.0-a.44 5 09/10/2026
18.9.0-a.42 3 09/08/2026
18.9.0-a.41 4 09/08/2026
18.9.0-a.40 12 09/07/2026
18.9.0-a.39 4 09/04/2026
18.8.0 7 09/02/2026
18.8.0-a.53 3 09/15/2026
18.8.0-a.37 5 09/01/2026
18.8.0-a.36 8 08/31/2026
18.7.0 8 08/31/2026
18.7.0-a.34 5 08/31/2026
18.7.0-a.33 6 08/27/2026
18.7.0-a.27 18 08/25/2026
18.6.0 86 08/21/2026
18.6.0-a.32 6 08/27/2026
18.6.0-a.31 5 08/26/2026
18.6.0-a.30 4 08/25/2026
18.6.0-a.29 5 08/25/2026
18.6.0-a.28 4 08/25/2026
18.6.0-a.26 5 08/24/2026
18.6.0-a.23 4 08/21/2026
18.5.0 10 08/19/2026
18.4.0 23 08/18/2026
18.4.0-a.20 4 08/18/2026
18.3.0 5 08/18/2026
18.3.0-a.17 5 08/18/2026
18.2.0 27 08/13/2026
18.2.0-a.13 6 08/10/2026
18.2.0-a.12 6 08/10/2026
18.2.0-a.11 8 08/04/2026
18.2.0-a.10 4 08/04/2026
18.2.0-a.9 5 08/04/2026
18.2.0-a.8 7 07/30/2026
18.2.0-a.5 6 07/28/2026
18.1.0 54 07/28/2026
18.1.0-a.7 7 07/29/2026
18.1.0-a.6 6 07/29/2026
18.1.0-a.3 5 07/28/2026
18.0.0 6 07/27/2026
9.14.0 36 07/23/2026
9.14.0-a.140 10 07/22/2026
9.13.0 47 07/17/2026
9.12.0 11 07/17/2026
9.12.0-a.136 15 07/15/2026
9.11.0 76 07/02/2026
9.11.0-a.134 6 07/02/2026
9.10.0 243 06/23/2026
9.10.0-a.133 6 06/29/2026
9.10.0-a.132 5 06/29/2026
9.10.0-a.131 5 06/29/2026
9.10.0-a.129 7 06/23/2026
9.9.0 9 06/16/2026
9.9.0-a.127 7 06/16/2026
9.8.0 237 06/11/2026
9.8.0-a.126 7 06/16/2026
9.8.0-a.123 7 06/11/2026
9.7.0 214 05/06/2026
9.7.0-a.125 9 06/15/2026
9.7.0-a.117 10 05/06/2026
9.6.0 246 04/23/2026
9.6.0-a.114 9 04/23/2026
9.6.0-a.113 10 04/23/2026
9.6.0-a.112 9 04/22/2026
9.6.0-a.111 9 04/22/2026
9.6.0-a.110 10 04/22/2026
9.6.0-a.109 9 04/22/2026
9.5.0 175 04/08/2026
9.5.0-a.107 10 04/08/2026
9.5.0-a.106 10 04/08/2026
9.4.0 11 04/07/2026
9.4.0-a.104 10 04/08/2026
9.4.0-a.102 11 04/07/2026
9.3.0 36 04/03/2026
9.3.0-a.100 11 03/31/2026
9.2.0 36 03/31/2026
9.2.0-a.98 10 03/30/2026
9.1.0 47 03/27/2026
9.1.0-a.95 10 03/27/2026
9.0.0 156 03/18/2026
9.0.0-a.93 10 03/18/2026
8.3.0-a.97 10 03/27/2026
8.2.0 497 02/07/2026
8.2.0-a.92 34 02/13/2026
8.1.0 229 12/15/2025
8.1.0-a.89 11 12/09/2025
8.0.0 159 11/26/2025
8.0.0-a.87 15 11/26/2025
8.0.0-a.86 11 11/26/2025
8.0.0-a.85 12 11/26/2025
8.0.0-a.84 14 11/26/2025
7.0.2 121 11/12/2025
7.0.1 57 11/10/2025
7.0.0 15 11/07/2025
7.0.0-a.81 12 11/10/2025
7.0.0-a.80 15 11/07/2025
7.0.0-a.79 12 11/07/2025
7.0.0-a.78 12 11/07/2025
6.3.0 22 11/07/2025
6.3.0-a.75 14 11/07/2025
6.3.0-a.73 13 11/07/2025
6.3.0-a.72 14 11/07/2025
6.2.0 43 11/05/2025
6.2.0-a.71 12 11/05/2025
6.2.0-a.69 14 11/05/2025
6.2.0-a.68 42 10/29/2025
6.1.0 91 10/28/2025
6.1.0-a.77 12 11/07/2025
6.1.0-a.66 14 10/28/2025
6.1.0-a.65 16 10/28/2025
6.1.0-a.64 13 10/28/2025
6.1.0-a.63 39 10/27/2025
6.0.0 3,511 12/05/2024
6.0.0-a.47 21 12/05/2024
5.2.0 606 09/20/2024
5.2.0-a.44 18 09/20/2024
5.2.0-a.43 21 09/20/2024
5.2.0-a.42 20 09/20/2024
5.1.0 148 08/14/2024
5.1.0-a.40 19 08/14/2024
5.0.0 284 06/28/2024
5.0.0-a.39 21 08/13/2024
5.0.0-a.37 20 06/28/2024
4.2.0 241 05/16/2024
4.2.0-a.116 9 04/29/2026
4.2.0-a.33 21 05/16/2024
4.1.0 104 05/13/2024
4.1.0-a.30 20 05/13/2024
4.0.0 348 04/09/2024
4.0.0-MYK4-6046 21 05/13/2024
4.0.0-a.28 19 04/09/2024
3.0.0 211 03/28/2024
3.0.0-a.26 21 03/28/2024
2.3.0 153 03/18/2024
2.3.0-a.24 19 03/18/2024
2.2.0 50 03/15/2024
2.2.0-a.22 19 03/15/2024
2.1.2 93 03/05/2024
2.1.2-a.20 19 03/05/2024
2.1.1 20 03/05/2024
2.1.1-a.18 21 03/05/2024
2.1.0 539 02/23/2024
2.1.0-a.16 20 02/23/2024
2.0.0 55 02/22/2024
2.0.0-a.14 18 02/22/2024
1.3.0 61 02/19/2024
1.3.0-a.12 17 02/19/2024
1.3.0-a.11 20 02/19/2024
1.3.0-a.10 22 02/19/2024
1.3.0-a.9 20 02/19/2024
1.2.0 349 02/05/2024
1.2.0-a.7 20 02/05/2024
1.1.0 79 02/01/2024
1.1.0-a.5 21 02/01/2024
1.1.0-a.4 21 01/31/2024
1.0.0 168 01/17/2024
1.0.0-a.2 19 01/17/2024
1.0.0-a.1 18 01/16/2024