-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Issuer should not support path component #1435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @jgrandja, could you please elaborate on how to deal with an authorization server that has server.servlet.context-path configured? With this change the metadata no longer contains the correct path. |
Hello @jgrandja, we just tried to upgrade our authorization server which is behind a proxy under a different path with the |
We also are affected by this and have to find a workaround to be able to upgrade. We currently hard code paths like this.
|
@rd-marc-lehnert @jonkjenn I'm not sure how you were even able to get it working with a path component? As mentioned in the main issue:
If you apply the patch However, if you require a path component in your current setup, then you can configure Hope this helps? |
Hi @jgrandja ,thanks for the hints, I will try that on Monday. Regarding your question how we got it working: sure, standalone the uris might be inconsistent. What matters is the outside perspective with the proxy in place. And this way everything works properly. |
- 主要更新 - [升级] Spring Boot 版本升级至 3.2.0 - [升级] Spring Cloud 版本升级至 2023.0.0-RC1 - [升级] Spring Authorization Server 版本升级至 1.2.0 - 其它更新 - [重构] 重构相关代码,适配 Spring Boot 3.2.0 fix: #I7W5C3 - [重构] 重构相关代码,适配 Spring Cloud 2023.0.0-RC1 fix: #7W5C6 - [重构] 重构 Spring Authorization Server 自定义 Provider 代码,适配最新的 Spring Authorization Server 1.2.0 版本。fix: #I7W5BY - [重构] 重构 Spring Authorization Server 配置代码,去除过时方法,适配最新代码。 - [修复] 修复 Emqx 监控数据转 Influxdb2 的 Spring Integration 流程注入配置条件错误。 - [修复] 修复 docker-compose 文件中,polaris 镜像名称不正确问题。 - [新增] Spring Cloud Tencent Polaris 配置导入包,方便环境搭建和配置 - [优化] 调整 Polaris 本地配置缓存目录,防止与新增配置导入包冲突和混淆 - [修复] 调整 polaris docker-compose 默认端口,适配最新版本 Polarismesh Server。 - [优化] 优化各个服务中,Spring Cloud Tencent 相关配置,去除无用的或者与默认参数相同的配置。 - [新增] 新增 Spring Cloud Tencent 读取和使用本地缓存统一化配置。 - [优化] 临时解决 SAS 1.2.0 不兼容问题,后续根据实际情况进行完善和修改。spring-projects/spring-authorization-server#1435 - [优化] 删除 dependencies 中重复的或无用的版本控制配置,统一使用 Spring Boot Dependencies 控制依赖版本
- 主要更新 - [升级] Spring Boot 版本升级至 3.2.0 - [升级] Spring Cloud 版本升级至 2023.0.0-RC1 - [升级] Spring Authorization Server 版本升级至 1.2.0 - 其它更新 - [重构] 重构相关代码,适配 Spring Boot 3.2.0 fix: #I7W5C3 - [重构] 重构相关代码,适配 Spring Cloud 2023.0.0-RC1 fix: #7W5C6 - [重构] 重构 Spring Authorization Server 自定义 Provider 代码,适配最新的 Spring Authorization Server 1.2.0 版本。fix: #I7W5BY - [重构] 重构 Spring Authorization Server 配置代码,去除过时方法,适配最新代码。 - [修复] 修复 Emqx 监控数据转 Influxdb2 的 Spring Integration 流程注入配置条件错误。 - [修复] 修复 docker-compose 文件中,polaris 镜像名称不正确问题。 - [新增] Spring Cloud Tencent Polaris 配置导入包,方便环境搭建和配置 - [优化] 调整 Polaris 本地配置缓存目录,防止与新增配置导入包冲突和混淆 - [修复] 调整 polaris docker-compose 默认端口,适配最新版本 Polarismesh Server。 - [优化] 优化各个服务中,Spring Cloud Tencent 相关配置,去除无用的或者与默认参数相同的配置。 - [新增] 新增 Spring Cloud Tencent 读取和使用本地缓存统一化配置。 - [优化] 临时解决 SAS 1.2.0 不兼容问题,后续根据实际情况进行完善和修改。spring-projects/spring-authorization-server#1435 - [优化] 删除 dependencies 中重复的或无用的版本控制配置,统一使用 Spring Boot Dependencies 控制依赖版本
+1 - this one breaks our app too which runs under a custom servlet context-path which is mapped on a proxy before - this is unexpected to break in a minor/patch version upgrade here, could you revert that one on the 1.x branch or at least break it only in a new major version? |
@tkrah Can you please provide more details on your setup so I can understand your issue. Did you configure |
I did configure both, the |
Hello. If we use |
@tkrah Since you're setting
The To solve this, simply remove the |
We did manage to upgrade now though by running the same path internally as externally. One remaining issue with the new |
@jonkjenn Hello. Could you please tell us how you managed to configure the external path, and did you manage to get the correct configuration from |
I have to, the external url is not the same like the one from the host which is running the auth server, so I need to set that issuer URI to get correct URLs and I need the context path to map it from the proxy from proxy X -> destination Y and using:
I just use 1.1.3 and I can tell you it does resolve that path component, the token endpoint is reachable with configured context path and issuer with context path, it works here without a problem.
That does not work because I need a custom issuer URI - which all works in 1.1.3 ;) |
@Prigovor Just by making sure that whatever path we had publicly e.g. Yes then our |
Thanks a lot. |
@rd-marc-lehnert, @jonkjenn, @tkrah, @Prigovor Apologies for the issue this update has caused. I did not account for Proxy related settings. I went ahead and reverted this update across all branches. |
My authorization server also behind proxy, upgrade and hit the same issue. With help in this thread, and another one spring-projects/spring-security#5631, I got it running. Here is what I did, FYI:
Looking forward to get configure issuer URI capability back. Thanks. |
@jgrandja Thank you so much for the revert! |
ok I'm confused. using spring auth server with boot 3.2.0 running in port 4002. I trying to implement the BFF implementation. so there is a reverse proxy with port 7080. I had the error where I could not specify http://localhost:7080/auth as the issuer. from reading this thread multiple time all I gather is that as @dopsun said I should remove the issuer setting
and add |
The issuer setting, if supplied via
AuthorizationServerSettings.getIssuer()
, should not support a path component.With the current and all previous versions, if
AuthorizationServerSettings.getIssuer()
was explicitly set withhttps://provider.com/issuer1
, the protocol endpoint URI's returned byOidcProviderConfigurationEndpointFilter
andOAuth2AuthorizationServerMetadataEndpointFilter
would all be incorrect. For example,token_endpoint
would behttps://provider.com/issuer1/oauth2/token
, which would not resolve for the client since the token endpoint matches on/oauth2/token
(by default) and not/issuer1/oauth2/token
.This fix should add a validation preventing a path component for issuer.
NOTE: The path component enables supporting multiple issuers per host for multi-tenant configurations. This enhancement request is being tracked in gh-1342.
Related gh-1419 gh-1416
The text was updated successfully, but these errors were encountered: