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

Fix Raspiblitz integration (auth header) #121

Closed
ghost opened this issue Feb 22, 2022 · 5 comments
Closed

Fix Raspiblitz integration (auth header) #121

ghost opened this issue Feb 22, 2022 · 5 comments
Labels
bug Something isn't working integration Issues related to full-node integrations

Comments

@ghost
Copy link

ghost commented Feb 22, 2022

Due to the basic auth setup required in Umbrel, we changed the auth header sent by the UI containing the JoinMarket bearer token to x-jm-authorization. See #102. That means any webserver hosting the web UI needs to rewrite this header back to Authorization before proxying requests to JoinMarket's jmwalletd daemon.

The Raspiblitz NGINX config doesn't know about this and therefore doesn't rewrite the authorization header. That means all requests to jmwalletd will fail on the RaspiBlitz because jmwalletd, of course, expects the token in the Authorization header, not in x-jm-authorization.

Not sure how/if we can patch this properly. Ideally we fix this on the UI end. Then we don't need to wait for a Raspiblitz version bump to fix the integration script.

What would work (not super clean but it would probably work) is to revert the x-jm-authorization header change and go back to sending the bearer token in the standard Authorization header. Umbrel would not be affected since that is pinned to the v0.0.3 version. However, Raspiblitz users can update to a newer version by running config.scripts/bonus.joinmarket-webui.sh update command.
That of course assumes that we implement #120 before we do the next Umbrel release.

Thoughts on how to best resolve this?

@ghost ghost added bug Something isn't working integration Issues related to full-node integrations labels Feb 22, 2022
@ghost ghost added this to the v0.0.4 - Bugfixes & Cleanup milestone Feb 22, 2022
@ghost
Copy link
Author

ghost commented Feb 23, 2022

Ok knowing that there is raspiblitz/raspiblitz#2987, we can probably also fix this directly in the Raspiblitz NGINX config. See joinmarket-webui/jam-docker#12 for reference.

@ghost
Copy link
Author

ghost commented Feb 23, 2022

@dennisreimann Do you think it would make sense to add the fix for this to your existing raspiblitz/raspiblitz#2987 Raspiblitz PR to minimize confusion for them, or better have it be two separate PRs?

@dennisreimann
Copy link
Contributor

I don't have the time to do so right now – feel free to do so if you can!

@ghost
Copy link
Author

ghost commented Feb 23, 2022

Yep already on it! Just checking how we should handle it logistically. If you think it makes sense to do it in one go I can send you patches, otherwise I'd open a new PR for Raspiblitz.

@ghost
Copy link
Author

ghost commented Feb 23, 2022

Opened a second PR with a minimal fix here: raspiblitz/raspiblitz#2988

Doesn't enable Basic Auth for Raspiblitz, just makes sure the token gets sent along to jmwalletd in the correct header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integration Issues related to full-node integrations
Projects
Status: Done
Development

No branches or pull requests

2 participants