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

lightblue-rest requires cert with CORS preflight request; this breaks Firefox + data management app #121

Open
alechenninger opened this issue Nov 12, 2015 · 2 comments

Comments

@alechenninger
Copy link
Contributor

lightblue-rest bug tracked here: lightblue-platform/lightblue-rest#187


Old description:

This is not really a bug in the app but it is affecting users. If Firefox can't do this for some legitimate reason, we should reconsider alternate strategies for implementing the lightblue communication.

For instance, originally, we tossed around the idea of having a backend be able to "impersonate" users or be able to give lightblue a request and a user and have it tell is if that user would be allowed to make that request, and if not, why.

Perhaps an even better fix would be (as mentioned in above issues) if we could use OAuth to authenticate apps to talk to lightblue via CORS instead (much more common way to CORS in the wild).

But first and foremost let's understand what the deal with Firefox is before we talk about any of that stuff.

@alechenninger
Copy link
Contributor Author

90% sure it's this: https://bugzilla.mozilla.org/show_bug.cgi?id=1019603

@alechenninger
Copy link
Contributor Author

It looks like this is due to a mishandling of OPTIONS request in lightblue-rest.

Per spec at http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#preflight-request the preflight request never includes cookies. Specifically, the spec says:

Exclude user credentials.

and that links to http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#user-credentials which says:

The term user credentials for the purposes of this specification means cookies, HTTP authentication, and client-side SSL certificates.

Source: http://stackoverflow.com/a/10135361

@alechenninger alechenninger changed the title Investigate why Firefox has trouble with CORS + client certs lightblue-rest requires cert with CORS preflight request; this breaks Firefox + data management app Nov 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant