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

Test and document how to use HTTP basic auth in the guide #2459

Closed
Tracked by #2406
romac opened this issue Jul 25, 2022 · 2 comments · Fixed by #2522
Closed
Tracked by #2406

Test and document how to use HTTP basic auth in the guide #2459

romac opened this issue Jul 25, 2022 · 2 comments · Fixed by #2522
Assignees
Labels
I: documentation Internal: improvements or additions to documentation I: guide Internal: issues with the Hermes guide
Milestone

Comments

@romac
Copy link
Member

romac commented Jul 25, 2022

@adizere:
The guide has no details about connecting via HTTP basic auth, but it seems some relayer operators need this and they're using the feature, so we might as well document it for future users.

Quoting @romac:

We don't have special support for HTTP authentication right now. If they are using HTTP Basic auth they can try using http://username:[email protected]:1234/ which should send the username and password through the Authorization header, but we haven't tested that.

https://github.com/informalsystems/ibc-rs/issues/2406#issue-1304490093

@romac romac mentioned this issue Jul 25, 2022
7 tasks
@romac romac changed the title The guide/ has no details about connecting via HTTP basic auth, but it seems some relayer operators need this and they're using the feature, so we might as well document it for future users Test and document how to use HTTP basic auth in the guide Jul 25, 2022
@romac romac added I: guide Internal: issues with the Hermes guide I: documentation Internal: improvements or additions to documentation labels Jul 25, 2022
@adizere adizere added this to the v1.0.0 milestone Jul 26, 2022
@romac
Copy link
Member Author

romac commented Jul 28, 2022

Specifying the username/password in the URL does not seem to work.

To reproduce:

  1. Install Caddy
  2. Start gm etc. using the gm.toml below
  3. Do a health check and verify that it succeeds:
$ hermes health-check
  1. Put the following in a file named Caddyfile
:2022

reverse_proxy localhost:27000

basicauth /* {
  romac JDJhJDE0JEsveWtDYWRLSFNnUzFBNlY0TUo1MmUzcDVXSldVRlBNakdmWnZYeG5BY1d6eWFrYlpMWmJt
}
  1. Start the reverse proxy
$ caddy run
  1. Check that you can connect to the authenticated RPC endpoint of ibc-0:
$ curl -v -u "romac:test" http://localhost:2022/abci_info
  1. Update rpc_addr for chain ibc-0 in ~/.hermes/config.toml to use the authenticated endpoint:
http://romac:test@localhost:2022
  1. Run hermes health-check again
2022-07-28T08:15:33.115674Z  INFO ThreadId(01) [ibc-0] performing health check...
ERROR
   0: failed to spawn chain runtime
   1: relayer error
   2: RPC error to endpoint http://romac:test@localhost:2022/
   3:
   3:    0: serde parse error
   3:    1: EOF while parsing a value at line 1 column 0

To be continued.

@romac romac self-assigned this Jul 28, 2022
@romac
Copy link
Member Author

romac commented Jul 28, 2022

Update: I am working on adding support for basic auth to tendermint-rpc.

romac added a commit that referenced this issue Aug 3, 2022
romac added a commit that referenced this issue Aug 8, 2022
romac added a commit that referenced this issue Aug 8, 2022
* Bump Hermes to v1.0.0-rc.2

* Bump crates to 0.18.0 and ibc-proto to 0.19.1

* Update lockfile

* Add self-documenting `help` target to the Makefile

* Remove tutorial with raw commands from the guide

* Add changelog entry for #2459

* Update changelog and upgrading instructions

* Release version 1.0.0-rc.2 of the changelog

* Add changelog entry for #2466

* Add changelog entry for #2380

* Bump tendermint-rs dependencies to 0.23.9

* Bump prost to version 0.11

* Regenerate protos with Prost 0.11

* Update lockfiles

* Use our own fork of `ics23` with Prost 0.11

* Bump `ibc-proto` version to 0.20.0 because of the Prost update

* Bump `ics23` to 0.8.0

* Fix comment in proto definition

* Fix no-std-check Makefile

* Update `ics23` to version 0.8.1

* Update lockfile

* Fix typo
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this issue Sep 13, 2022
* Bump Hermes to v1.0.0-rc.2

* Bump crates to 0.18.0 and ibc-proto to 0.19.1

* Update lockfile

* Add self-documenting `help` target to the Makefile

* Remove tutorial with raw commands from the guide

* Add changelog entry for informalsystems#2459

* Update changelog and upgrading instructions

* Release version 1.0.0-rc.2 of the changelog

* Add changelog entry for informalsystems#2466

* Add changelog entry for informalsystems#2380

* Bump tendermint-rs dependencies to 0.23.9

* Bump prost to version 0.11

* Regenerate protos with Prost 0.11

* Update lockfiles

* Use our own fork of `ics23` with Prost 0.11

* Bump `ibc-proto` version to 0.20.0 because of the Prost update

* Bump `ics23` to 0.8.0

* Fix comment in proto definition

* Fix no-std-check Makefile

* Update `ics23` to version 0.8.1

* Update lockfile

* Fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: documentation Internal: improvements or additions to documentation I: guide Internal: issues with the Hermes guide
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants