Add migration to update ApiClients with centralized authorization scopes
This migration updates the ScopesJson for the ApiClient with Id 91000000-0000-0000-0000-000000000001 to include additional authorization scopes for improved API access control. The Down method reverts the changes if necessary.
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.SelfService.Portal.Core.API.Authorization;
|
||||
using Microsoft.SelfService.Portal.Core.API.Models;
|
||||
|
||||
namespace Microsoft.SelfService.Portal.Core.API.Services
|
||||
@@ -138,13 +139,19 @@ namespace Microsoft.SelfService.Portal.Core.API.Services
|
||||
|
||||
return
|
||||
[
|
||||
"deployment.read",
|
||||
"deployment.write",
|
||||
"queue.process",
|
||||
"template.read",
|
||||
"credential.resolve",
|
||||
"token.manage",
|
||||
"token.admin"
|
||||
ApiScopes.ConfigurationRead,
|
||||
ApiScopes.ConfigurationWrite,
|
||||
ApiScopes.CredentialRead,
|
||||
ApiScopes.CredentialWrite,
|
||||
ApiScopes.CredentialResolve,
|
||||
ApiScopes.DeploymentRead,
|
||||
ApiScopes.DeploymentWrite,
|
||||
ApiScopes.QueueRead,
|
||||
ApiScopes.QueueProcess,
|
||||
ApiScopes.TemplateRead,
|
||||
ApiScopes.TemplateWrite,
|
||||
ApiScopes.TokenManage,
|
||||
ApiScopes.TokenAdmin
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user