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

Hawkbit redirects to http, breaking SSL-Termination with Proxy #1724

Closed
bauerstefan opened this issue Apr 25, 2024 · 3 comments
Closed

Hawkbit redirects to http, breaking SSL-Termination with Proxy #1724

bauerstefan opened this issue Apr 25, 2024 · 3 comments

Comments

@bauerstefan
Copy link

Hi,
my setup is simple:

Client -> =https = > NGINX (hawkbit.domain) -> =http= http://192.168.0.1:8080

Now curling from client-side shows:

$ curl -v https://hawkbit.domain/
*   Trying 1.2.3.4:443...
* Connected to hawkbit.domain (1.2.3.4) port 443 (#0)
*  SSL certificate verify ok.

> GET / HTTP/2
> Host: hawkbit.domain
> user-agent: curl/7.81.0

< location: http://hawkbit.domain/swagger-ui/index.html;jsessionid=16B76......?

Howto force hawkbit to not send http redirects? Maybe this is also a job for nginx?

I tried

    environment:
      SPRING_APPLICATION_JSON: '{
        "spring.datasource.url": "jdbc:mariadb://mysql-hawkbit:3306/hawkbit",
        "spring.rabbitmq.host": "rabbitmq",
        "spring.rabbitmq.username": "guest",
        "spring.rabbitmq.password": "guest",
        "spring.datasource.username": "root",
        "hawkbit.server.security.require-ssl": "true",
        "server.use-forward-headers": "true"
       }'

with no success.

Accessing https://hawkbit.local/swagger-ui/index.html directly works without redirects.

any help is greatly appreciated.

@mwiesenbauer
Copy link
Contributor

try:

environment:
  SPRING_APPLICATION_JSON: '{
    "spring.datasource.url": "jdbc:mariadb://mysql-hawkbit:3306/hawkbit",
    "spring.rabbitmq.host": "rabbitmq",
    "spring.rabbitmq.username": "guest",
    "spring.rabbitmq.password": "guest",
    "spring.datasource.username": "root",
    "hawkbit.server.security.require-ssl": true,
    "server.forward-headers-strategy": "FRAMEWORK"
   }'

for details: #1696 (comment)

@bauerstefan
Copy link
Author

try:

environment:
  SPRING_APPLICATION_JSON: '{
    "spring.datasource.url": "jdbc:mariadb://mysql-hawkbit:3306/hawkbit",
    "spring.rabbitmq.host": "rabbitmq",
    "spring.rabbitmq.username": "guest",
    "spring.rabbitmq.password": "guest",
    "spring.datasource.username": "root",
    "hawkbit.server.security.require-ssl": true,
    "server.forward-headers-strategy": "FRAMEWORK"
   }'

for details: #1696 (comment)

Awesome, that did the trick. Thanks a lot!

Unfortunately the hawkbit-simple-ui on port 8088 still does http redirect. Is there another command for that? ;)

@bauerstefan
Copy link
Author

Nevermind, works the same way as you described.

server.forward-headers-strategy": "FRAMEWORK" }

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

2 participants