Skip to content

Question about extending the VS Code Jupyter extension for OAuth2 token injection into kernels #17352

@mhadhbi-sgcib

Description

@mhadhbi-sgcib

Hello,

I am evaluating whether it is possible to build a VS Code extension that integrates with the Microsoft Jupyter extension.

My extension authenticates the user inside VS Code using an OAuth2 implicit flow and obtains a short-lived JWT. This token must then be provided to the active Python kernel so that notebook code can call external services.

The extension also continuously refreshes the JWT, and the kernel must always be able to use the latest token: especially during long-running cell executions, where the token may expire before the cell finishes.

Before choosing an architecture, I would like to ask:

  1. Is there any supported API or extensibility mechanism that allows a VS Code extension to deliver (and update) runtime data such as a refreshed JWT token to a running Jupyter kernel ?
  2. If not, what recommended approach should be used for passing continously-refreshed authentication tokens from an VS Code extension to the kernel ?
  3. Is kernel-side communication extensibility something that may be exposed in the future ?

Any guidance you can provide would by greatly appreciated.

Best Regards,
Ahmed M.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions