Keycloak Ouath2集成在Spring Cloud Dataflow 2.3.0中不起作用 [英] Keycloak Ouath2 integration is not working in spring cloud dataflow 2.3.0

查看:78
本文介绍了Keycloak Ouath2集成在Spring Cloud Dataflow 2.3.0中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试将keycloak与Spring Cloud Dataflow 2.3.0集成,但是文档中显示的配置不适用于该版本.我对Spring Cloud Dataflow 2.2.2版本进行了相同的尝试,并且集成工作正常.这是我在两个版本的application.yaml中添加的配置,

I am currently trying to integrate keycloak with spring cloud dataflow 2.3.0 but the configurations are showing in the documentation is not working for this version. I tried the same with version spring cloud dataflow 2.2.2 and the integrations worked okay. This the config I am added in application.yaml for both the versions,

spring:
  cloud:
    dataflow:
      security:
        authorization:
          map-oauth-scopes: true
security:
  oauth2:
    client:
      client-id: dataflow
     client-secret: 44ed8e53-f52f-4d2e-a205
     access-token-uri: http://localhost:8080/auth/realms/dataflow/protocol/openid-connect/token
     user-authorization-uri: http://localhost:8080/auth/realms/dataflow/protocol/openid-connect/auth
  resource:
    user-info-uri: http://localhost:8080/auth/realms/dataflow/protocol/openid-connect/userinfo
    token-info-uri: http://localhost:8080/auth/realms/dataflow/protocol/openid-connect/token/introspect

在应用配置后,我可以在2.2.2日志中看到以下条目,但在2.3.0中没有看到

I can see the below entries in the 2.2.2 logs after the config is applied but not in 2.3.0

2020-10-18 11:31:40.829  INFO 1 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL95Dialect
2020-10-18 11:31:40.977  INFO 1 --- [           main] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@5965844d
2020-10-18 11:31:42.027  INFO 1 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-10-18 11:31:43.113  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'GET' | 'hasRole('ROLE_VIEW')' | '/about'
2020-10-18 11:31:43.114  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'GET' | 'hasRole('ROLE_VIEW')' | '/audit-records'
2020-10-18 11:31:43.121  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'GET' | 'hasRole('ROLE_VIEW')' | '/audit-records/**'
2020-10-18 11:31:43.122  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'GET' | 'hasRole('ROLE_MANAGE')' | '/management/**'
2020-10-18 11:31:43.122  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'GET' | 'hasRole('ROLE_VIEW')' | '/apps'
2020-10-18 11:31:43.122  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'GET' | 'hasRole('ROLE_VIEW')' | '/apps/**'
2020-10-18 11:31:43.123  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'DELETE' | 'hasRole('ROLE_DESTROY')' | '/apps/**'
2020-10-18 11:31:43.123  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'POST' | 'hasRole('ROLE_CREATE')' | '/apps'
2020-10-18 11:31:43.123  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'POST' | 'hasRole('ROLE_CREATE')' | '/apps/**'
2020-10-18 11:31:43.124  INFO 1 --- [           main] o.s.c.c.s.support.SecurityConfigUtils    : Authorization 'PUT' | 'hasRole('ROLE_MODIFY')' | '/apps/**'

我在这里 https://docs.spring.io/spring-cloud-dataflow/docs/2.3.0.RELEASE/reference/htmlsingle/#configuration-security-oauth2 ,并且不理解为什么它在2.3.0中不起作用.是否有人能够成功地将上述数据流版本2.3.0与keycloak(不是UAA)集成在一起?另外,我使用Keycloak进行SSO,不需要用户注册.

I have followed the details in here https://docs.spring.io/spring-cloud-dataflow/docs/2.3.0.RELEASE/reference/htmlsingle/#configuration-security-oauth2 and don't understand why it's not working in 2.3.0. Is anyone able to successfully integrate dataflow version 2.3.0 above with keycloak ( not UAA)?. Also, I am using keycloak for SSO and no user registration required.

推荐答案

配置已从2.3.0版本更改,该版本未在数据流文档中进行记录.我在github https://github.com/中仅添加了与keycloak相关的配置.ChimbuChinnadurai/spring-cloud-dataflow-keycloak-integration

The configurations are changed from the version 2.3.0 which is not documented in the dataflow documentations. I have added only the keycloak related configuration in github https://github.com/ChimbuChinnadurai/spring-cloud-dataflow-keycloak-integration

这篇关于Keycloak Ouath2集成在Spring Cloud Dataflow 2.3.0中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆