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

HTTP Authentication #22

Closed
ghost opened this issue Mar 14, 2019 · 7 comments
Closed

HTTP Authentication #22

ghost opened this issue Mar 14, 2019 · 7 comments

Comments

@ghost
Copy link

ghost commented Mar 14, 2019

Dear Tim Visée,

thank you very much for developing ffsend!

I use it with send.firefox.com and now want to use it with my own server.

My server is behind a reverse proxy. All services behind that are protected from abuse by HTTP basic authentication (plus TLS).

I would be really grateful if ffsend could send/use HTTP basic auth credentials.

Probably the underlying rust library already implements this, it would be really nice if this could be exposed to the command line (and perhaps some ENVIRONMENT variable).

Hopefully not coming across as some lazy freeloader i would be grateful if this feature could be implemented, i might not be the only user of this :)

kind regards.

@timvisee
Copy link
Owner

Yes, this sounds doable. I'd be fine with implementing it. I'll take a look at what's possible later today, and notify this issue.

Thanks!

@timvisee
Copy link
Owner

I've created the following implementation issue for now which I recommend to follow for any progress updates:
https://gitlab.com/timvisee/ffsend/issues/70

I'll keep this issue open until it has been implemented.

@ghost
Copy link
Author

ghost commented Mar 14, 2019

Thanks a lot! :)

@timvisee
Copy link
Owner

timvisee commented Mar 19, 2019

@GHQB I've just implemented basic HTTP authentication to use for a protected reverse proxy. This has been implemented in 12e6606 and will be part of v0.2.38. The release will be available as soon as this pipeline succeeds:
https://gitlab.com/timvisee/ffsend/pipelines/52649353

For now, I've added the --basic-auth <USER:PASSWORD> flag, and the environment variable FFSEND_BASIC_AUTH which uses the same format. I might automatically derive these credentials from the host or share URL in the future as well.

Here's an example command:

bash upload --basic-auth user:secret my-file.txt

I haven't truly tested the implementation on a protected reverse proxy, but I'm quite sure the implementation is correct. It would be awesome if you could give it a try, to confirm this is working.

Sorry that it took me a while.

I'll close this issue for now as I believe it has been resolved. Be sure to open it again if the implementation doens't seem to work correctly.

@waldauf
Copy link

waldauf commented Nov 13, 2019

Hello @timvisee,

I set env variable FFSEND_BASIC_AUTH=my@email.com:PasswordWith@Sign and it's not possible for me to send the file to the server:

export FFSEND_BASIC_AUTH="my@email.com:PasswordWith@Sign"
ffsend upload --force --verbose -e 7d picture.jpg
error: failed to upload the specified file
caused by: failed to upload the file
caused by: got invalid response from server

For detailed errors try '--verbose'
For more information try '--help'

The --verbose switch didn't write more information to stdout. I tried to add --basic-auth=my@email.com:PasswordWith@Sign switch and no success too.

Can I ask you for help what I do bad?

@waldauf
Copy link

waldauf commented Nov 13, 2019

Now I found your answer on GitLab. So already it's not neccessary to answer me. :]

@timvisee
Copy link
Owner

timvisee commented Nov 13, 2019

This issue is on HTTP authentication, not FxA authentication, both are different things. Good to hear you found it. I'm sorry I'm not able to implement this until Mozilla accepts third-party applications.

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

No branches or pull requests

2 participants