fix(admin): require air-admin Keycloak realm role
This commit is contained in:
@@ -102,13 +102,13 @@ builder.Services
|
||||
};
|
||||
});
|
||||
|
||||
// All Blazor pages require the "admin" Keycloak realm role by default.
|
||||
// All Blazor pages require the "air-admin" Keycloak realm role by default.
|
||||
// Override per-page with [AllowAnonymous] (e.g. the login/challenge shim).
|
||||
builder.Services.AddAuthorization(options =>
|
||||
{
|
||||
options.FallbackPolicy = new AuthorizationPolicyBuilder()
|
||||
.RequireAuthenticatedUser()
|
||||
.RequireRole("admin")
|
||||
.RequireRole("air-admin")
|
||||
.Build();
|
||||
});
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
// A confidential client "sor-admin" must be created in the Keycloak realm with:
|
||||
// - Valid redirect URI: https://<admin-host>/signin-oidc
|
||||
// - Post-logout URI: https://<admin-host>/signout-callback-oidc
|
||||
// - "admin" realm role assigned to any user who should access this panel
|
||||
// - "air-admin" realm role assigned to any user who should access this panel
|
||||
"Keycloak": {
|
||||
"Authority": "https://auth.aeternalisgames.com/realms/aeternalis",
|
||||
"ClientId": "sor-admin",
|
||||
|
||||
Reference in New Issue
Block a user