首页 > 其他分享 >OIDC 配置发现

OIDC 配置发现

时间:2023-05-19 19:00:16浏览次数:43  
标签:发现 配置 http openid supported auth token localhost OIDC

@@oidc 发现页

 

 

术语

  • OpenID Connect :以下简称 oidc 协议
  • Relying Party:依赖方,也就是客户端,简称 RP
  • OpenID Provider:oidc 协议认证的实现方,简称 OP
  • End-User:用户,资源拥有者

介绍

In order for an OpenID Connect Relying Party to utilize OpenID Connect services for an End-User, the RP needs to know where the OpenID Provider is. OpenID Connect uses WebFinger [RFC7033] to locate the OpenID Provider for an End-User.

oidc 协议有很多的配置信息和 url,RP 需要对接 OP 来实现认证和授权,那么 RP 就需要知道这些配置信息,比如发起认证请求的 url 地址,token 交换的 url 地址等。为了方便对接,OP 提供了一个 url 来返回自己的所有配置信息(一个 json 对象格式),这样 RP 只需要调用这一个地址就知道了所有配置。这种提供信息的方式也是一个协议称为 WebFinger。WebFinger 是一种使用 http 协议来发现互联网上关于某个实体信息的协议,oidc 的配置(或者称为元数据)发现是一个典型例子。

在 oidc 协议官方文档中,这一模块称为 Discovery,即定义 RP 如何动态发现有关 OP 的信息。

发现

必须使用 GET 请求,url 后缀为 /.well-known/openid-configuration,比如 http://localhost:8080/auth/realms/springdemo/.well-known/openid-configuration,以下是 keycloak 的响应内容,这里面大多数字段是协议规定的,少部分是 OP 自己提供的。

{
"issuer": "http://localhost:8080/auth/realms/springdemo",
"authorization_endpoint": "http://localhost:8080/auth/realms/springdemo/protocol/openid-connect/auth",
"token_endpoint": "http://localhost:8080/auth/realms/springdemo/protocol/openid-connect/token",
"token_introspection_endpoint": "http://localhost:8080/auth/realms/springdemo/protocol/openid-connect/token/introspect",
"userinfo_endpoint": "http://localhost:8080/auth/realms/springdemo/protocol/openid-connect/userinfo",
"end_session_endpoint": "http://localhost:8080/auth/realms/springdemo/protocol/openid-connect/logout",
"jwks_uri": "http://localhost:8080/auth/realms/springdemo/protocol/openid-connect/certs",
"check_session_iframe": "http://localhost:8080/auth/realms/springdemo/protocol/openid-connect/login-status-iframe.html",
"grant_types_supported": [
"authorization_code",
"implicit",
"refresh_token",
"password",
"client_credentials"
],
"response_types_supported": [
"code",
"none",
"id_token",
"token",
"id_token token",
"code id_token",
"code token",
"code id_token token"
],
"subject_types_supported": [
"public",
"pairwise"
],
"id_token_signing_alg_values_supported": [
"PS384",
"ES384",
"RS384",
"HS256",
"HS512",
"ES256",
"RS256",
"HS384",
"ES512",
"PS256",
"PS512",
"RS512"
],
"id_token_encryption_alg_values_supported": [
"RSA-OAEP",
"RSA1_5"
],
"id_token_encryption_enc_values_supported": [
"A128GCM",
"A128CBC-HS256"
],
"userinfo_signing_alg_values_supported": [
"PS384",
"ES384",
"RS384",
"HS256",
"HS512",
"ES256",
"RS256",
"HS384",
"ES512",
"PS256",
"PS512",
"RS512",
"none"
],
"request_object_signing_alg_values_supported": [
"PS384",
"ES384",
"RS384",
"HS256",
"HS512",
"ES256",
"RS256",
"HS384",
"ES512",
"PS256",
"PS512",
"RS512",
"none"
],
"response_modes_supported": [
"query",
"fragment",
"form_post"
],
"registration_endpoint": "http://localhost:8080/auth/realms/springdemo/clients-registrations/openid-connect",
"token_endpoint_auth_methods_supported": [
"private_key_jwt",
"client_secret_basic",
"client_secret_post",
"tls_client_auth",
"client_secret_jwt"
],
"token_endpoint_auth_signing_alg_values_supported": [
"PS384",
"ES384",
"RS384",
"HS256",
"HS512",
"ES256",
"RS256",
"HS384",
"ES512",
"PS256",
"PS512",
"RS512"
],
"claims_supported": [
"aud",
"sub",
"iss",
"auth_time",
"name",
"given_name",
"family_name",
"preferred_username",
"email",
"acr"
],
"claim_types_supported": [
"normal"
],
"claims_parameter_supported": false,
"scopes_supported": [
"openid",
"address",
"email",
"microprofile-jwt",
"offline_access",
"phone",
"profile",
"roles",
"web-origins"
],
"request_parameter_supported": true,
"request_uri_parameter_supported": true,
"code_challenge_methods_supported": [
"plain",
"S256"
],
"tls_client_certificate_bound_access_tokens": true,
"introspection_endpoint": "http://localhost:8080/auth/realms/springdemo/protocol/openid-connect/token/introspect"
}

转 https://my.oschina.net/wecanweup/blog/4869316

标签:发现,配置,http,openid,supported,auth,token,localhost,OIDC
From: https://www.cnblogs.com/wl-blog/p/17416061.html

相关文章

  • RocketMQ 5.0 如何配置TLS加密传输?
    本文作者:李伟,社区里大家叫小伟,ApacheRocketMQCommitter,RocketMQPython客户端项目Owner,ApacheDorisContributor,腾讯云RocketMQ开发工程师。01传输架构图Namesrv:5.1.0Broker:5.1.0Dashboard:1.0.1-SNAPSHOT02准备Namesrv、Broker、Client的ca证书、密钥以下全部操作在......
  • 配置wordpress:在footer/页脚添加icp备案许可证号(wordpress 6.2)
    一,添加icp许可证号外观->主题文件编辑器->主题页脚:在class名为site-info的div中添加如下html代码:<div style="text-align:center"> <ahref="http://beian.miit.gov.cn/"class="imprint"rel="externalnofollow"target="_blank"......
  • springboot开启跨域security也开启跨域配置
    springboot开启跨域security也开启跨域配置浏览器同源策略,导致跨域失败,添加了security框架后,因为安全框架有一些列的过滤器,即使springboot把跨域打开,security的过滤器也可以能拦截。所以,如果要在服务器端设置,要改两处 方法一:先开放springboot的跨域 再开启security的跨......
  • 【Anaconda3】pytorch环境配置记录(CPU版本)
    安装Anaconda官网传送门点下载即可,默认下载最新版下载旧版可以去:开源镜像传送门创建Pytorch环境先在开始菜单栏打开然后输入condacreate-npytorchpython=本机Python版本号查看本机python版本按win+R输入cmd打开命令行,输入python查看python版本,版本多少上图红框中p......
  • springboot 2.4 版本后的多环境配置
    beanpackagecom.example.demo.tt;importorg.springframework.beans.factory.annotation.Value;importorg.springframework.stereotype.Component;importjavax.annotation.PostConstruct;@ComponentpublicclassTT{@Value("${test.ww}")pub......
  • 【Linux】详解六种配置Linux环境变量的方法(以centos为例)
    本文时间2023-05-19作者:sugerqube漆瓷本文重理解,!!忽略环境变量加载原理!!本文目标:理解六大环境变量配置,选择合适的配置文件进行配置配置环境的理由以shell编程为例现在我们想要运行名为"sugerqube.sh"的脚本需要运行的命令是./sugerqube.sh即在命令行输入脚本的地址注:.......
  • MySQL数据库的性能优化配置 五
    (一)减少数据库访问对于可以静态化的页面,尽可能静态化对一个动态页面中可以静态的局部,采用静态化部分数据可以生成XML,或者文本文件形式保存使用数据缓存技术,例如:MemCached (二)优化的检测方法1.用户体验检测2.Mysql状态检测在Mysql命令行里面使用showstatus命令,得到当前mysql状......
  • SpringBoot配置过滤器、拦截器
    拦截器概述SpringBoot提供了一种简单且强大的方式来定义和使用拦截器(Interceptor)。SpringBoot的拦截器基于Spring框架的拦截器机制,可以在请求的处理过程中插入自定义的逻辑。SpringBoot的拦截器主要用于在请求处理的不同阶段执行额外的逻辑操作,比如在请求进入控制器方法之前......
  • nginx proxy_set部分常见配置
    目录nginxproxy_set部分常见配置nginxproxy_set部分常见配置proxy_set_headerHost$host;#用途:设置要发送到代理服务器的HTTP请求头的Host字段。$host变量将被替换为客户端请求中的实际主机名。proxy_set_headerConnection"";#用途:清空要发送到代理服务器的HTTP请求头......
  • samba服务及vsftp服务及nfs服务简单配置
    转至:https://blog.51cto.com/rylan/19456021.建立samba共享,共享目录为/data,要求:(描述完整的过程)1)共享名为shared,工作组为magedu;2)添加组develop,添加用户gentoo,centos和ubuntu,其中gentoo和centos以develop为附加组,ubuntu不属于develop组;密码均为用户名;3)添加sa......