Skip to content

Conversation

@chultquist
Copy link
Contributor

Hi,

I believe I've found a bug in the way that OPTIONS requests are handled by the notebook server. Pre-flighted OPTIONS requests do not include authentication information, which means that we should not expect these to be authenticated and so should not be using the @web.authenticated decorator. Authentication will be validated when the real PUT/POST etc request is issued after the preflight.

FWIW this behaviour is documented by others in different contexts (see for example: http://giix.nl/2015/03/10/cross-origin-resource-sharing-cors-and-kerberos-webserver-auth/).

Thanks,

Carl

P.S. to provide some context, in our environment, we use Kerberos for authenticating against the notebook server to provide single sign-on, and we're working on developing a tool that uses jupyter-js-services to programatically launch kernels via the notebook server and run commands on them. This mostly works great except when the js-services API initiates a POST request with content-type of application/json. The CORS specification dictates that these requests must be pre-flighted, and because the pre-flighted OPTIONS request does not include authenticating material it gets rejected.

Pre-flighted OPTIONS requests do not include authentication information,
which means that we should not expect these to be authenticated.
Authentication will be validated when the real PUT/POST etc request is
issued after the preflight.
@Carreau
Copy link
Member

Carreau commented Apr 8, 2016

ping @rgbkrk @minrk

@minrk minrk added this to the 4.2 milestone Apr 8, 2016
@minrk minrk merged commit 2d0b8a6 into jupyter:master Apr 8, 2016
minrk added a commit that referenced this pull request Apr 8, 2016
Hi,

I believe I've found a bug in the way that OPTIONS requests are handled by the notebook server. Pre-flighted OPTIONS requests do not include authentication information, which means that we should not expect these to be authenticated and so should not be using the @web.authenticated decorator. Authentication will be validated when the real PUT/POST etc request is issued after the preflight.

FWIW this behaviour is documented by others in different contexts (see for example: http://giix.nl/2015/03/10/cross-origin-resource-sharing-cors-and-kerberos-webserver-auth/).
...
yuvipanda pushed a commit to yuvipanda/notebook that referenced this pull request Jul 26, 2016
Hi,

I believe I've found a bug in the way that OPTIONS requests are handled by the notebook server. Pre-flighted OPTIONS requests do not include authentication information, which means that we should not expect these to be authenticated and so should not be using the @web.authenticated decorator. Authentication will be validated when the real PUT/POST etc request is issued after the preflight.

FWIW this behaviour is documented by others in different contexts (see for example: http://giix.nl/2015/03/10/cross-origin-resource-sharing-cors-and-kerberos-webserver-auth/).
...
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants