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

Support API entered as URL with Basic Auth #1586

Closed
lidel opened this issue Aug 10, 2020 · 2 comments · Fixed by #1613
Closed

Support API entered as URL with Basic Auth #1586

lidel opened this issue Aug 10, 2020 · 2 comments · Fixed by #1613
Assignees
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP status/in-progress In progress
Milestone

Comments

@lidel
Copy link
Member

lidel commented Aug 10, 2020

Support API as URL with Basic Auth was introduced in ipfs-inactive/ipfs-redux-bundle#28
Deprecating ipfs-redux-bundle and switching to ipfs-provider (#1563) introduced a small regression: it is no longer possible to connect to API defined as URL with basic auth credentials. Entering URL and pressing Submit does nothing:

2020-08-11--01-32-31

We need to restore this feature in webui (and release new ipfs-provider, if needed).

Ref.

@lidel lidel added kind/bug A bug in existing code (including security flaws) exp/intermediate Prior experience is likely helpful P0 Critical: Tackled by core team ASAP need/triage Needs initial labeling and prioritization effort/hours Estimated to take one or several hours labels Aug 10, 2020
@jessicaschilling
Copy link
Contributor

We should also add some basic guidance to the running text: something like "if your API isn't on localhost, you'll need to include your authorization credentials, e.g. blahblah".

@lidel lidel added this to the v2.11 milestone Aug 11, 2020
@lidel
Copy link
Member Author

lidel commented Sep 2, 2020

Quick update:

As suspected, this was broken, but should be easy to fix: http client expects us to create explicit Authorization: Basic ... header, so we will do just that.

I'll prepare PR which:

  • accepts URLs with user/password
  • converts it to options object accepted by ipfs-http-client constructor
  • adds support for advanced options object (Status and Settings pages)
  • adds e2e tests which confirm basic auth works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP status/in-progress In progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants