-
Notifications
You must be signed in to change notification settings - Fork 46
Read in self signed-cert #36
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
Conversation
languageserver/src/client.ts
Outdated
auth: token, | ||
userAgent: userAgent || `GitHub Actions Language Server` | ||
}); | ||
const selfSignedCertPath = process.env.PATH_TO_SELF_SIGNED_CERT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This env var should be set by the user. I'm not sure what the best way to set this is. It looks like you can set env vars for the extension in launch.json
(reference)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally I can populate this env var by exporting a variable in zsh. Not sure if this will work on the installed extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtamsut I believe launch.json
would be for setting environment variables when developing the extension.
I don't think that's doable for installed extensions. I think we should lean on the existing mechanisms for VS Code Extension settings here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with us trying this out to see if it helps! Could you try messaging the users in the issue to let them know this will be released in the new version Friday + to give them info on options to try setting an env variable and have them let us know if it helps?
@@ -1,8 +1,26 @@ | |||
import {Octokit} from "@octokit/rest"; | |||
import {Agent} from "node:https"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking a dependency on a Node module could prevent this from being used in web browsers. It would be good to validate that there's a polyfill for this that we can use in Webpack, or a separate module altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. That's a great callout.
Closes github/vscode-github-actions#39
Background & Context
We have users that have self-signed CA certificates that are issued by an internal CA. This solution reads the certificate (provided by the user as an env var) and instantiates a Node HTTPS agent to make the request.
Octokit allows you to pass your own HTTP/HTTPS agent.