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

some button in dashboard does not work if we have Spring Cloud Gateway(enabled with basic auth) set in front of SCDF #3404

Open
amberHuang-arc opened this issue May 23, 2024 · 2 comments

Comments

@amberHuang-arc
Copy link

amberHuang-arc commented May 23, 2024

I reported a bug to SCDF but maybe this is a SCG bug, so also report here.

spring-cloud/spring-cloud-dataflow-ui#2002

The SCG config I set up as below:

spring.application.name=scdf-gateway
server.port=9999

spring.cloud.gateway.routes[0].id=scdf-server
spring.cloud.gateway.routes[0].uri=http://localhost:9393/
spring.cloud.gateway.routes[0].predicates[0]=Path=/**
#spring.cloud.gateway.routes[0].filters[0]=AddRequestHeader=Authorization, Basic xxxx
#spring.cloud.gateway.routes[0].filters[0]=HttpsToHttp
#spring.cloud.gateway.routes[0].filters[1].name=ChangePort
#spring.cloud.gateway.routes[0].filters[1].args.newPort=9393
spring.cloud.gateway.routes[0].filters[0]=PreserveHostHeader
#spring.cloud.gateway.routes[0].filters[1]=CustomAddRefererHeaderFilter


#spring.cloud.gateway.routes[0].filters[1]=AddRefererHeader

#spring.cloud.gateway.routes[0].filters[0]=PreserveHostHeader
#spring.cloud.gateway.routes[0].filters[1]=AddRequestHeader=Referer, ${http.request.headers.Referer}
spring.cloud.gateway.routes[0].metadata.cors.allowedOrigins=*
spring.cloud.gateway.routes[0].metadata.cors.allowedMethods[0]=GET
spring.cloud.gateway.routes[0].metadata.cors.allowedMethods[1]=POST
spring.cloud.gateway.routes[0].metadata.cors.allowedMethods[2]=PUT
spring.cloud.gateway.routes[0].metadata.cors.allowedMethods[3]=DELETE
spring.cloud.gateway.routes[0].metadata.cors.allowedMethods[4]=OPTIONS
spring.cloud.gateway.routes[0].metadata.cors.allowedHeaders=*
#spring.cloud.gateway.routes[0].metadata.cors.maxAge=30

#spring.cloud.gateway.globalcors.add-to-simple-url-handler-mapping=true
#spring.cloud.gateway.globalcors.cors-configurations.[/**].allowedOrigins=*
#spring.cloud.gateway.globalcors.cors-configurations.[/**].allowedMethods[0]=GET
#spring.cloud.gateway.globalcors.cors-configurations.[/**].allowedMethods[1]=POST
#spring.cloud.gateway.globalcors.cors-configurations.[/**].allowedMethods[2]=PUT
#spring.cloud.gateway.globalcors.cors-configurations.[/**].allowedMethods[3]=DELETE
#spring.cloud.gateway.globalcors.cors-configurations.[/**].allowedMethods[4]=OPTIONS
#spring.cloud.gateway.globalcors.cors-configurations.[/**].allowedHeaders=*
#spring.cloud.gateway.globalcors.cors-configurations.[/**].allowCredentials=true

spring.cloud.gateway.httpclient.pool.maxConnections=1000
spring.cloud.gateway.httpclient.pool.acquireTimeout=5000

spring.cloud.gateway.thread.pool.coreSize=10
spring.cloud.gateway.thread.pool.maxSize=200


# Basic Auth Properties
spring.security.basic.enabled=true
spring.security.user.name=user
spring.security.user.password=password



logging.level.org.springframework.cloud.gateway=DEBUG
logging.level.org.springframework.security=DEBUG


@spencergibb
Copy link
Member

I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference.

What does "some button in dashboard does not work" mean? What http error are you getting?

This will be difficult to diagnose without a complete, minimal, verifiable sample (something that we can unzip attached to this issue or git clone, build, and deploy) that reproduces the problem. Minimal, meaning no custom filters and a simple downstream application (not dataflow).

@amberHuang-arc
Copy link
Author

the button in dashboard means spring cloud dataflow dashboard. Here is the sample code.
scg_scdf.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants