我如何或在哪里可以访问我的保险库OIDC日志和JWT声称元数据
我已经设置了Hashicorp Vault(Enterprise Edition)的本地实例,以测试使用OIDC的Vault和Azure AD单登录的实现。我正在使用Terraform在Visual Studio代码中配置和配置我的OIDC组件,但遇到了与我的令牌索赔有关的错误(请参见下文)。
我如何或在哪里可以访问我的OIDC JWT声称元数据以验证其一些条目?我什至已经在我的 vault_jwt_auth_backend_role_role
配置中设置了 verbose_oidc_logging = true
true ,但无法弄清楚我可以在哪里访问日志。
以下是Vault_jwt_auth_backend_role配置的完整片段。
resource "vault_jwt_auth_backend_role" "azure" {
role_name = var.azure_role_name
backend = vault_jwt_auth_backend.root.path
user_claim = "email"
groups_claim = "groups"
bound_claims = { "groups": "VaultAdmins" }
role_type = "oidc"
oidc_scopes = var.oidc_scopes
allowed_redirect_uris = var.allowed_redirect_uris
verbose_oidc_logging = "true"
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您如何访问令牌取决于应用程序正在使用的流程。
如果是隐式流程,您应该能够在登录过程中看到HTTP请求的有效载荷中的令牌。
如果是授权代码流(可能),则可以使用Postman来形成请求,并且您需要从应用程序的Azure Ad App注册中的一些值。
client_id
client_secret
scopes
获取授权代码
使用上述信息以登录到您的应用程序的链接,该链接应编码URL。
示例
打开一个带有开发人员工具打开的浏览器窗口,并使用链接登录到您的应用程序。 Azure AD成功身份验证您之后,您应该在有效负载中查看带有
代码
的请求。这是将用于交换令牌的授权代码。复制此值。进行邮递员调用
方法
发布
url
https://login.microsoftonline.com/ {tenant_id}/oauth2/v2.0/token
标题
body
client_id
client_secret
redirect_url </
结果
中查看访问令牌和ID令牌
您可以在请求正文 src =“ https://i.sstatic.net/t48xm.png” alt =“在此处输入图像说明”>
How you access the tokens will depend on which flow the app is using.
If it's an implicit flow, you should be able to see the tokens in the payload of the HTTP request during sign-on.
If it's an authorization code flow (likely), you can use Postman to form a request, and you'll need a few values from the Azure AD app registration for your app.
tenant_Id
client_Id
client_secret
redirect_url
scopes
Obtain authorization code
Use the above info to form a link to login to your application, the link should be URL encoded.
Example
Open a browser window with the developer tools open, and login to your app using the link. After Azure AD successfully authenticates you, you should see a request with a
code
in the payload. This is the authorization code that will be used to exchange for your tokens. Copy this value.Make a Postman call
Method
POST
URL
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
Headers
Body
client_id
client_secret
code
redirect_url
scopes
Result
You can see the access token and the ID token in the request body