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

helm: broken ingress #3175

Closed
wrenix opened this issue Aug 11, 2023 · 2 comments · Fixed by #3182
Closed

helm: broken ingress #3175

wrenix opened this issue Aug 11, 2023 · 2 comments · Fixed by #3182

Comments

@wrenix
Copy link
Contributor

wrenix commented Aug 11, 2023

current in helm-chart version: 0.13.1 (after #3077)

i got the host https with the following values:

dendrite_config:
  global:
    server_name: "example.net"
    # without https needed for https://federationtester.matrix.org
    well_known_server_name: "dendrite.example.net:443"
    # https needed for fluffychat
    well_known_client_name: "https://dendrite.example.net:443"

@Omar007 and @S7evinK do you take a look?

@Omar007
Copy link
Contributor

Omar007 commented Aug 12, 2023

I had a hard time understanding what you were saying but thanks to the config I'm suspecting specifically the client part of the ingress (ingress paths /_matrix/client and /_matrix/media) gets the host value https assigned instead of the expected dendrite.example.net?

Assuming that, I double checked the specs and I did indeed make a mistake here calculating the host values for the ingress object. The well_known_client_name expects a base URL, not just a hostname+port like the well_known_server_name; https://spec.matrix.org/v1.7/client-server-api/#getwell-knownmatrixclient
Additionally, I also realized that they would not currently support IPv6 addresses as a value. I'll have to push a fix to cover these cases later. Apologies for the inconvenience.

@wrenix
Copy link
Contributor Author

wrenix commented Aug 12, 2023

correct, thats https for client, for server and and wellknown it works.
your regex for fetch the domain from the well_kown, does NOT fetch the domain from an url, it stops after : which is not only an seperator for the port, it is also an seperator for the schema in an url.

S7evinK pushed a commit that referenced this issue Aug 29, 2023
…cheme (client) (#3182)

This updates the matchers for deriving the host values from the dendrite
config. The original version turned out to have 2 complications:
- It did not support IPv6 addresses as host value
- It failed for `well_known_client_host` which is a (base) URL instead
of a hostname+port.

I've verified `well_known_server_name` with
```
dendrite.example.net:443
dendrite.example.net
192.168.1.1
192.168.1.1:1324
[dead::beef]:1234
[dead::beef]
[ffff:dead::beef]
```
and `well_known_client_name` with:
```
https://dendrite.example.net:443
https://dendrite.example.net
https://dendrite.example.net/
http://dendrite.example.net:8080/
http://192.168.1.1
http://192.168.1.1:8080/
http://[dead::beef]:1234
http://[dead::beef]/
http://[ffff:dead::beef]
```

Fixes #3175

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [x] I have added Go unit tests or [Complement integration
tests](https://github.com/matrix-org/complement) for this PR _or_ I have
justified why this PR doesn't need tests
* [x] Pull request includes a [sign off below using a legally
identifiable
name](https://matrix-org.github.io/dendrite/development/contributing#sign-off)
_or_ I have already signed off privately

Signed-off-by: `Omar Pakker <Omar007@users.noreply.github.com>`

---------

Signed-off-by: Omar Pakker <Omar007@users.noreply.github.com>

[skip CI]
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

Successfully merging a pull request may close this issue.

2 participants