oauth-2.0 - How to disable device flow and implicit flow in identity server?
问题描述
I am using Identity Server 4 and developing a financial application. I assume that none of the API clients will be using device code flow. And hence as a security good practice, I want to disable it for all clients and hide it in discovery document. I have checked the identity server official document but did not find any resources. so my question is.
- How can I disable the device code flow grant type for all the clients.
- How can I hide it in the discovery document.
解决方案
您可以禁用端点:
services
.AddIdentityServer(options =>
{
options.Endpoints.EnableDeviceAuthorizationEndpoint = false;
})
这也应该将其从发现文档中删除。
请注意,您不能为客户端禁用流,因为您必须明确配置客户端才能使用它。换句话说,由于客户端没有配置为使用授权类型,它不能使用它。无需以其他方式禁用它。
如果端点可用且可见,则您无法隐藏每个客户端的端点。这是一份公开文件。
推荐阅读
- arrays - 将整数附加到数组(使用 express 和 pg-promise)
- delphi - 指向另一个过程变量
- c - 从 C 程序到 Gnuplot 的问题管道数据
- c++ - 在永远运行的深度优先搜索代码中找不到错误
- reactjs - React bootstrap 必须将每个自定义类标记为 !important
- numpy - 将 2D 高斯核分离为两个 1D 核
- javascript - Nativescript:页面出口路由器不工作
- javascript - 如何使用 HTML、CSS、JS 在中心块中左对齐循环打字机动画文本?
- kubernetes - Airflow Kubernetes Operator 的测试策略
- docker - Docker 和 Redis:SQLSTATE[HY000] [2002] 连接被拒绝