Azure-使用证书邮递员访问令牌请求



我想使用证书测试对密钥库的访问场景第二种情况:使用证书访问令牌请求https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow

我正在努力提供

客户端断言

您需要创建的断言(JSON web令牌(,并使用您注册为应用程序凭据的证书进行签名。阅读证书凭据,了解如何注册证书和断言的格式。

我不知道为什么必须使用powershell,而且我没有pfx,所以不能使用https://blogs.aaddevsup.xyz/2020/10/how-to-use-postman-to-perform-a-client-credentials-grant-flow-with-a-certificate/

是否可以使用邮递员生成签名JWT?

注:增加了邮递员的证书。因此该部分由负责

我认为你不能直接在poster中生成client_assertion,请使用下面的脚本创建一个自分配证书,然后你可以使用你提到的脚本来获得令牌。

$certroopath = "C:UsersAdministratorDesktop"
$certname = "mycert1"
$certpassword = "P@ssw0rd1234"
$cert = New-SelfSignedCertificate -DnsName "$certname" -CertStoreLocation cert:CurrentUserMy
$pwd = ConvertTo-SecureString -String $certpassword -Force -AsPlainText
$certwithThumb = "cert:CurrentUsermy"+$cert.Thumbprint
$filepath = "$certroopath$certname.pfx"
Export-PfxCertificate -cert $certwithThumb -FilePath $filepath -Password $pwd

最新更新