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

Support allowInsecureProtocol #163

Closed
markslater opened this issue Apr 12, 2021 · 4 comments
Closed

Support allowInsecureProtocol #163

markslater opened this issue Apr 12, 2021 · 4 comments
Milestone

Comments

@markslater
Copy link
Contributor

Setting distBaseUrl to an HTTP URL (for me, using Artifactory over HTTP as a proxy is a corporate requirement) causes a warning using Gradle 6.8.3 and gradle-node-plugin 3.0.1:

Using insecure protocols with repositories, without explicit opt-in, has been deprecated. This is scheduled to be removed in Gradle 7.0. Switch Ivy repository [etc]

Sure enough, upgrading to Gradle 7.0 causes my build to fail.

This can be rectified by exposing allowInsecureProtocol on the Ivy repository.

I'd be happy to submit a PR.

@bsautel
Copy link
Contributor

bsautel commented Apr 13, 2021

Thanks for reporting this issue!

As a workaround, I suggest to set distBaseUrl to null and declare yourself the ivy repository in which you can set allowInsecureProtocol to true. Here is how to declare a Node.js ivy repository. The dependencyResolutionManagement is not mandatory, I am only talking about the ivy part that can be added to the build.gradle file.

How would you want to fix this issue? Always adding alwaysInsecureProtocol to true is simple but not very satisfying since that would block this security improvement on Gradle's side. We should probably add a flag to NodeExtension to force allowing insecure protocol?

@markslater
Copy link
Contributor Author

Thanks for the pointer to the workaround. I can confirm that fixes the issue.

I'm happy enough to live with the workaround, but I have created PR #164 with a change to add a flag to NodeExtension that is passed through to the IvyRepository that is created, if you're interested in having this feature. Let me know what you think.

@humbinal
Copy link

When will this feature be released?

@deepy deepy added this to the 3.2 milestone Dec 14, 2021
@deepy
Copy link
Member

deepy commented Jan 3, 2022

Coming in 3.2

@deepy deepy closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants