Not able to to establish Github Oauth2 authentication for Spring cloud dataflow

23 Views Asked by At

I am trying to establish authentication with GitHub in the Spring Cloud dataflow server. referring this document https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#configuration-security-oauth2 It's clearly mention As of Spring Cloud Data Flow 2.0, OAuth2 is the only mechanism for providing authentication and authorization. So I have configured GiyHUb auth below is my application.yml file

    info:
  app:
    name: "@project.artifactId@"
    description: "@project.name@"
    version: "@project.version@"
spring:
  jpa:
    hibernate:
      ddl-auto: none
server:
  port: 8443
  ssl:
    enabled: true
    key-alias: dataflow
    key-store: \path\dataflow.keystore
    key-store-type: jks
    key-store-password: dataflow
    key-password: dataflow
security:
  oauth2:
    client:
      registration:
        github: 
          client-id: client_id
          client-secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
          access-token-uri: https://github.com/login/oauth/access_token
          user-authorization-uri: https://github.com/login/oauth/authorize
      resource:
        user-info-uri: https://api.github.com/user
management:
  contextPath: /management
  security:
    enabled: true      
    

after the build when I hit https://localhost:8443/about page the security info

"authenticationEnabled": false,
"authenticated": false,
"username": null,
"roles": []
},

Can anyone tell me if this correct configuration or if I need to only go with uaa authentication?

0

There are 0 best solutions below