-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: default GONOSUMDB to GONOPROXY if not specified #32184
Comments
On one hand, it is not good to default to a less secure state silently. On the other hand, this would help greatly with not training users to blindly set Given there's a lower risk of MITM anyway when going direct (although we do want to protect against malicious origins) and since I can't really think of many cases where you want to add a path to I would make an exception for |
@FiloSottile, s/ |
@bcmills yes, thanks. |
It is definitely true that there is something missing here. GONOSUMDB and GONOPROXY are both low-level things and you shouldn't have to configure both. I think we should do something for Go 1.13. Separately, @ianthehat asked me in the context of editor integration if there was some way to tell for a given package "is this an import that would make sense to hyperlink to godoc.org?". I am starting to think we should add a higher-level control knob GOPRIVATE and encourage that instead of the lower-level knobs. GOPRIVATE would set the default for both GONOSUMDB and GONOPROXY but other programs could also look at it to decide the more general question of whether this is a package known to public infrastructure or not. Thoughts? |
If you have GOPRIVATE, is there still a significant use case for GONOPROXY and/or GONOSUMDB at all, in fact? |
@rogpeppe, you might still have modules that are private but served from your local proxy. For those you want to get them from a proxy but not do the checksum database thing. So GOPRIVATE by itself is not enough: you really do need different knobs for proxy vs sumdb in the general case. But the general case is not anywhere near the common case, which is why GOPRIVATE might make sense for the common case. @bcmills and I both feel like GOPRIVATE is still not perfect but substantially better than making people set both GONOSUMDB and GONOPROXY, and probably we should do this soon (before Go 1.13 beta 1). I'm curious what @ianthehat, @jayconrod, and @myitcv think. /cc @andybons for beta 1 timeline FYI |
This would be my first/best guess based on a "finger in the air" analysis of our current setup and my understanding of others' current non-public setups (notice emphasis). Because the landscape might well/will change. That said, right now (i.e. for 1.13) it feels like #32184 (comment) is about right. But to be perfectly honest I'm not as close to the detail on all of this as others, so will happily defer 😄 |
I'm ambivalent on introducing
|
I was thinking about that yesterday and came to pretty much the same conclusion. |
You sound like the change is an argument against GOPRIVATE, but isn't it an argument in favor of GOPRIVATE? If GOPRIVATE means "these are non-public packages, act accordingly" then that can adapt to what actions need doing later, in ways that the more low-level GONOPROXY and GONOSUMDB do not. |
@rsc If |
Change https://golang.org/cl/181719 mentions this issue: |
I suspect that
GONOPROXY
will be used mainly for private modules. If you're using private modules, you probably don't want to be using the sum database for those either, so it seems like it would be useful ifGONOSUMDB
would useGONOPROXY
if not set.That would have saved me some time, because if you just set
GONOPROXY
for a private repo but notGONOSUMDB
, you'll get errors - it's not immediately clear that you need to setGONOSUMDB=$GONOPROXY
to get it to work.The text was updated successfully, but these errors were encountered: