Skip to content
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

strictSSL configuration? #2

Closed
atiniir opened this issue Apr 26, 2019 · 9 comments
Closed

strictSSL configuration? #2

atiniir opened this issue Apr 26, 2019 · 9 comments
Labels
enhancement New feature or request
Milestone

Comments

@atiniir
Copy link

atiniir commented Apr 26, 2019

hey just curious if there is any way to set strictSSL=false?

@dave-hagedorn
Copy link
Owner

dave-hagedorn commented Apr 29, 2019

Hi there - not familiar with this setting - do you know where this would be set? Thanks.

@dave-hagedorn dave-hagedorn added the enhancement New feature or request label Apr 30, 2019
@atiniir
Copy link
Author

atiniir commented May 7, 2019

I'm curious about this as I'm getting this error when I try to run a job:

[2019-05-07 11:15:46.764] [Jenkins] [info] Fetching remote XML config for job kris-tester @https://myjenkins
[2019-05-07 11:15:47.357] [Jenkins] [error] Error starting job kris-tester #undefined @Myjenkins}: Error: jenkins: job.config: unable to verify the first certificate

I get the same error from the https://marketplace.visualstudio.com/items?itemName=janjoerke.jenkins-pipeline-linter-connector plugin unless i set the option "Jenkins > Pipeline > Linter > Connector: Strictssl

Looking at the source for that plugin at https://github.com/janjoerke/vscode-jenkins-pipeline-linter-connector/blob/71f8178f13660310cdfac7051f5b9ba34c003f49/src/extension.ts it looks like in the validateRequest fn they are using it for a similarly named flag to reading a filestream...

<snip>
        let filestream = fs.createReadStream(path);
        const chunks: any = [];
        filestream.on('data', (chunk: any) => {
            chunks.push(chunk.toString());
        });
        filestream.on('end', () => {
            let options: any = {
                method: 'POST',
                url: url,
                strictSSL: strictssl,
                formData: {
                    'jenkinsfile': chunks.join()
                }
            };
<snip>

@dave-hagedorn
Copy link
Owner

Ah, cool - thanks for the info.

@atiniir
Copy link
Author

atiniir commented May 9, 2019

I looked at the jenkins package you are using but I didn't notice a straightforward way to set this when init'ing the jenkins instance.

@dave-hagedorn
Copy link
Owner

Hi there - just curious - are you using a self-signed or otherwise unverified SSL cert?

I can reproduce something similar (but not quite the same) by setting up a local Jenkins instance with a self-signed cert, and connecting over SSL

dave-hagedorn pushed a commit that referenced this issue May 18, 2019
This can be used to ignore SSL cert errors.  These are I think seen when using a self-signed on unverifiable cert.

Use with caution.

Fix a bug where some host settings were not updated until next restart.

Fix launch config - compile before launch
@dave-hagedorn dave-hagedorn added this to the 1.2.0 milestone May 18, 2019
@dave-hagedorn
Copy link
Owner

dave-hagedorn commented May 19, 2019

Hello - I just released a new version - this adds the rejectUnauthorizedCert option to a host config.

I would suggest you with this set to false. This allowed me to use a self-signed SSL cert, which was previously failing.

@dave-hagedorn
Copy link
Owner

FYI - make sure you get the 1.2.2 version - 1.2.1 had a minor bug.

@atiniir
Copy link
Author

atiniir commented Jun 13, 2019

that works brilliantly! thank you so much for addressing this. apologies it took me so long to test and confirm.

@dave-hagedorn
Copy link
Owner

NP - glad to hear it's working! Thanks for following up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants