More debugging of credentials
This commit is contained in:
parent
3b3012e891
commit
e4afb79aeb
3 changed files with 10 additions and 3 deletions
5
lib/start-proxy-action.js
generated
5
lib/start-proxy-action.js
generated
|
|
@ -37,6 +37,9 @@ const UPDATEJOB_PROXY_URL = "https://github.com/github/codeql-action/releases/do
|
||||||
const PROXY_USER = "proxy_user";
|
const PROXY_USER = "proxy_user";
|
||||||
const KEY_SIZE = 2048;
|
const KEY_SIZE = 2048;
|
||||||
const KEY_EXPIRY_YEARS = 2;
|
const KEY_EXPIRY_YEARS = 2;
|
||||||
|
function CredentialToStr(c) {
|
||||||
|
return `Type: ${c.type}; Host: ${c.host}; Username: ${c.username}; Password: ${c.password !== undefined}; Token: ${c.token !== undefined}`;
|
||||||
|
}
|
||||||
const CERT_SUBJECT = [
|
const CERT_SUBJECT = [
|
||||||
{
|
{
|
||||||
name: "commonName",
|
name: "commonName",
|
||||||
|
|
@ -87,7 +90,7 @@ async function runWrapper() {
|
||||||
core.saveState("proxy-log-file", proxyLogFilePath);
|
core.saveState("proxy-log-file", proxyLogFilePath);
|
||||||
// Get the configuration options
|
// Get the configuration options
|
||||||
const credentials = getCredentials();
|
const credentials = getCredentials();
|
||||||
logger.debug(`Credentials loaded for the following URLs:\n ${credentials.map(c => c.host).join("\n")}`);
|
logger.info(`Credentials loaded for the following URLs:\n ${credentials.map(c => CredentialToStr(c)).join("\n")}`);
|
||||||
const ca = generateCertificateAuthority();
|
const ca = generateCertificateAuthority();
|
||||||
const proxyAuth = getProxyAuth();
|
const proxyAuth = getProxyAuth();
|
||||||
const proxyConfig = {
|
const proxyConfig = {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -30,6 +30,10 @@ export type Credential = {
|
||||||
token?: string;
|
token?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function CredentialToStr(c: Credential): string {
|
||||||
|
return `Type: ${c.type}; Host: ${c.host}; Username: ${c.username}; Password: ${c.password !== undefined}; Token: ${c.token !== undefined}`
|
||||||
|
}
|
||||||
|
|
||||||
export type BasicAuthCredentials = {
|
export type BasicAuthCredentials = {
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
|
|
@ -99,7 +103,7 @@ async function runWrapper() {
|
||||||
|
|
||||||
// Get the configuration options
|
// Get the configuration options
|
||||||
const credentials = getCredentials();
|
const credentials = getCredentials();
|
||||||
logger.debug(`Credentials loaded for the following URLs:\n ${credentials.map(c => c.host).join("\n")}`)
|
logger.info(`Credentials loaded for the following URLs:\n ${credentials.map(c => CredentialToStr(c)).join("\n")}`);
|
||||||
|
|
||||||
const ca = generateCertificateAuthority();
|
const ca = generateCertificateAuthority();
|
||||||
const proxyAuth = getProxyAuth();
|
const proxyAuth = getProxyAuth();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue