vdk-jupyter: add oauth2 authentication implementation #2590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is adding the server part of Oauth2 authentication process.
It adds 1 more APIs:
/login
When called it without "code" query paramter, it will start the authentication proces as per OAuth2 standard .
We are using only native app workflow with PKCE (RFC 7636) because we cannot really secure the server side so we cannot reliably use client secret.
When called with "code" query paramter it will finish the process and exchange the code for access token (and refresh token) and safe it in VDK storage.
This change add integration with jupyter configuration. This way the extension can be configured more natively using jupyter configuration mechanism.
So now configuration can be set in any of the ways juptyer server supports - https://jupyter-server.readthedocs.io/en/latest/users/configuration.html
E.g
I've set locally in
~/.jupyter/jupyter_lab_config.py
In future change we can add integration between VDK configuration mechanims and jupyter so that properties set in VDK can be recognized in Jupyter and vice-versa but that's more advanced use-case