【发布时间】:2020-08-27 17:06:21
【问题描述】:
是否可以使用 Azure Key Vault 在 Angular 应用中获取保管库访问机密?
我正在使用隐式流处理 Azure Active Directory,这意味着我在没有后端的情况下实现所有内容。在我的 Angular 项目中,我使用 Microsoft 身份验证库 (Angular MSAL) 从 Microsoft Identity Platform 端点获取令牌以访问安全的 Web API。现在,我想使用 Azure Key Vault 作为安全存储和访问机密的工具。我打算用它来保护client-id、b2c-policy-name、b2c-scope。
我没有找到有关在前端实现逻辑以管理 Azure Key Vault 的可能性的任何信息。同时,我使用 ENV 创建了一个 Node JS 服务器项目来管理 Azure Key Vault,它运行成功,但我想在我的 Angular 应用程序中获得同样的效果。
export const msalConfig: Configuration = {
auth: {
clientId: MY_CLIENT_ID, // I want to use Key Vault here
authority: b2cPolicies.authorities.signUpSignIn.authority,
redirectUri: 'http://localhost:6420/',
postLogoutRedirectUri: 'http://localhost:6420/',
navigateToLoginRequestUrl: true,
validateAuthority: false,
},
cache: {
cacheLocation: 'localStorage',
storeAuthStateInCookie: isIE,
},
};
【问题讨论】:
标签: angular azure-active-directory azure-keyvault msal