Skip to content
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

Exception on the Issuer-URL configuration #1

Open
lewiseliu opened this issue Dec 26, 2022 · 0 comments
Open

Exception on the Issuer-URL configuration #1

lewiseliu opened this issue Dec 26, 2022 · 0 comments

Comments

@lewiseliu
Copy link

lewiseliu commented Dec 26, 2022

Hi,
I am trying to do IDaaS integration test with Aliyun official sample (https://github.com/aliyunidaas/java-spring-oidc-sample).
Application was registered on IDaaS server end as below URL.
However, when starting the sample spring boot code, exception on the issuer-url was raised.

Question:

Detail as below:

IDaaS server end:
Discovery URL: https://xxxxx.login.aliyunidaas.com/public/api/v1.2/application/plugin_oidc/oidc/.well-known/openid-configuration

  "issuer": "https://xxxxxx.login.aliyunidaas.com/",
  "authorization_endpoint": "https://xxxxxx.login.aliyunidaas.com/public/api/v1.2/application/plugin_oidc/oidc/authorize",
  "token_endpoint": "https://xxxxxx.login.aliyunidaas.com/public/api/v1.2/application/plugin_oidc/oidc/token",
  "userinfo_endpoint": "https://xxxxxxx.login.aliyunidaas.com/public/api/v1.2/application/plugin_oidc/oidc/user_info"

application.yml:

                provider:
                    aliyunidaas:  # aliyunidaas 即为 {registrationId}, 可为任意字符串
                        issuer-uri: https://xxxxxxxx.login.aliyunidaas.com/public/api/v1.2/application/plugin_oidc/oidc  # idaas 中拿到的 issuer

Standard Log during starting:

2022-12-26 18:27:24.027 DEBUG 26808 --- [           main] o.s.w.c.RestTemplate                     : HTTP GET https://xxxxxxx.login.aliyunidaas.com/public/api/v1.2/application/plugin_oidc/oidc/.well-known/openid-configuration/.well-known/openid-configuration 
2022-12-26 18:27:24.037 DEBUG 26808 --- [           main] o.s.w.c.RestTemplate                     : Accept=[application/json, application/*+json]
2022-12-26 18:27:24.452 DEBUG 26808 --- [           main] o.s.w.c.RestTemplate                     : Response 404 NOT_FOUND
2022-12-26 18:27:24.459 DEBUG 26808 --- [           main] o.s.w.c.RestTemplate                     : HTTP GET https://xxxxxx.login.aliyunidaas.com/.well-known/openid-configuration/public/api/v1.2/application/plugin_oidc/oidc/.well-known/openid-configuration 
2022-12-26 18:27:24.459 DEBUG 26808 --- [           main] o.s.w.c.RestTemplate                     : Accept=[application/json, application/*+json]

2022-12-26 18:27:24.650  WARN 26808 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through method 'setContentNegotationStrategy' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.OAuth2ClientConfiguration$OAuth2ClientWebMvcSecurityConfiguration': Unsatisfied dependency expressed through method 'setClientRegistrationRepository' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/servlet/OAuth2ClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "https://xxxxxxx.login.aliyunidaas.com/public/api/v1.2/application/plugin_oidc/oidc/.well-known/openid-configuration" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant