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

https redirect url #32

Open
sckott opened this issue Apr 28, 2016 · 7 comments
Open

https redirect url #32

sckott opened this issue Apr 28, 2016 · 7 comments

Comments

@sckott
Copy link

sckott commented Apr 28, 2016

Curious why you require a secure url for redirect? What are examples of acceptable redirect url's ?

@cakesifu
Copy link
Contributor

Hi @sckott

We're following the RFC 6749 recommendations for redirect endpoints confidentiality. The standard says that the redirection endpoint SHOULD require the use of TLS and if not, the authorization server should emit a warning to the user, however our security policies are a bit more strict and we're enforcing this as a MUST.

Any absolute url as defined in RFC 3986 section 4.3 should do, as long as the scheme is HTTPS. Here are a few examples:

  • https://my-figshare-app.com/
  • https://my-figshare-app.com/oauth/callback
  • https://some.other.domain.com/callbacks/figshare.php

TL;DR: we're sending sensitive info (an authorization code) through this redirect endpoint. On unsecured networks, such as public WiFi, anyone can read that code unless the redirect endpoint is secured.

I hope this helps.

@sckott
Copy link
Author

sckott commented Apr 29, 2016

thanks for the quick response @cezar-berea - Using this from R, and we typically use http://localhost:1410 as a redirect URL when doing OAuth - If oauth flow is being done locally on someone's machine (not on a public website), would a http redirect url not lead to security problems?

@cakesifu
Copy link
Contributor

cakesifu commented May 3, 2016

When working locally it's safe to use http because there's no risk of traffic sniffing. I suppose we could make the validation smarter and allow http for localhost/127.0.0.1 hosts. We'll look into this and it in the backlog.

@sckott
Copy link
Author

sckott commented May 3, 2016

okay, thanks, seems hard to imagine the rfc wouldn't allow for localhost workflows, but i imagine that is an edge case

@sckott
Copy link
Author

sckott commented May 4, 2016

Thanks for looking into this @cezar-berea - AFAICT there's no way for our R client for figshare https://github.com/ropensci/rfigshare to work unless we can do a http redirect

@TomBaxter
Copy link
Contributor

Any update on adding exception for localhost? This would be very helpful for local development against the API.

@carrn7k
Copy link

carrn7k commented Nov 21, 2022

Is there any update on this? I'm currently unable to develop locally due to the https requirement for localhost.

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

4 participants