TLS redirect_cleartext_from doesn't preserve path
See original GitHub issueDescribe the bug url path is not preserved with redirect_cleartext_from set
To Reproduce
-
Follow TLS Termination documentation to create cert and store as kubernetes secret
-
Deploy ambassador with helm chart 2.2.1 with values:
service:
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Module
name: tls
config:
server:
enabled: True
secret: ambassador-certs
redirect_cleartext_from: 8080
- Deploy httpbin service to test redirect
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Mapping
name: httpbin_mapping
prefix: /httpbin/
service: httpbin.org:80
host_rewrite: httpbin.org
spec:
ports:
- name: httpbin
port: 80
- curl the endpoint using http
curl -Li http://hostname/httpbin/
- Result: path is not preserved on redirect
HTTP/1.1 301 Moved Permanently
location: https://hostname/
date: Wed, 24 Apr 2019 20:12:19 GMT
server: envoy
content-length: 0
HTTP/2 404
date: Wed, 24 Apr 2019 20:12:19 GMT
server: envoy
Expected behavior
Path should be preserved and redirect to https://hostname/httpbin/
Versions (please complete the following information):
- Ambassador: [0.60.0] (using Helm chart 2.2.1)
- Kubernetes environment: [AKS]
- Version [1.12.7]
Additional context
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:27 (12 by maintainers)
Top Results From Across the Web
How to make `sudo` preserve $PATH? - Unix Stack Exchange
You can always do: sudo env "PATH=$PATH" godi_console. As a security measure on Debian, /etc/sudoers has the secure_path option set to a safe...
Read more >sudo (-E) doesn't preserve path, even when configured ...
In short, setting Defaults !env_reset and using sudo env "PATH=$PATH" works well. Thanks for the comments.
Read more >How to keep environment variables when using sudo
First you need to export HTTP_PROXY . Second, you need to read man sudo , and look at the -E flag. This works:...
Read more >Configure TLS with Keystores and Truststores
This topic describes TLS as supported by Mule and how to configure TLS in Mule apps. ... Set path to the location of...
Read more >How to set path for sudo commands - linux - Super User
This is normally set by the secure_path option in /etc/sudoers . From man sudoers : secure_path Path used for every command run from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is that we shouldn’t be setting
"path_redirect": "/"
if the intention is to preserve the path in the request. There is a logic in Envoy for that:I will open a PR shortly with the fix. Thanks!
@bpehling @christianhuening Thanks for the info. I will need to debug Envoy.