-
Notifications
You must be signed in to change notification settings - Fork 546
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
Plan for sget! #1363
Comments
Let's get a rough plan of the end goal and what it's going to do, then figure out how to get from here to there! |
Somewhat stream-of-thought notes based on the community call yesterday: Terminology note:
First, come up with a plan that answers the questions:
Finally, with that plan in place (not yet done, just agreed upon):
Anything missing? Anything horribly incorrect? |
Oh! Another point: If So maybe |
Just a note: If sget-go is deprecated/deleted and OCI features are removed from sget-rs (or sget-$lang), you won't have any way of retrieving blobs / signing materials from an OCI registry. This might be OK, but keep in mind the |
I think this is missing the "what should sget-new do" part still. A skeleton command line surface or mock showing how a user would interact with it, and what checks it should perform. If we start with that, then we can figure out the best language and repo for the tool to live in. |
Fetching-verifying-policying blobs in OCI could move to
"Replace - curl https://my.site/install.sh | sh
+ sget https://my.site/install.sh | sh What it does behind the scenes to make that a safer alternative to Or: if we think we want In that future, it's not |
What would be the storage medium here if OCI is out of the picture? I know you like the idea of http @imjasonh , but it's a sticky one to get working with signing materials (how to map artifact to signature , websites get hacked a lot). I honestly love the git method (I even prefer it over OCI), but unfortunately the very meagre rate limits github / gitlab have for API access means it won't work on any project that see's a decent amount of hits, so that's dead in the water now :( |
This is feeling like we need another meeting :) What do we think about trying to set up an hour next week to get in sync around the long term vision? I think we're close but not on the exact same page. |
Here's one idea for what a flow might look like for the MVP. The user copies a command from a project README and runs it. $ sget https://my.site/install.sh | sh Here's what sget does1. Retrieve the HTTP resource
2. Verify retrieved bytesBefore sending any bytes to stdout, we verify the bytes we just retrieved. To do this, we:
3. Output verified bytesSend the entire payload to stdout, such that the user can pipe those bytes to a command like Who does the user trust?IMHO, this is the hardest and most important piece of the user experience. I don't fully understand the TUF-like system that was proposed earlier, and I don't think we should expose something like TUF to users under normal circumstances (if ever), but I do like the idea of using OIDC IDs (e.g. I'm wondering if we need some kind of local state on the user's machine that specifies the identities that the user trusts. I'm not sure what/who these identities should be, and how they should be represented. Maybe we can prompt the user for trusting new identities as we encounter them (e.g. exit non-zero, with an error message like "You don't trust the signer; if you want to start trusting them, run command X."). If we're going for mass adoption, I think we should avoid anything too esoteric or difficult to use. Benefits of this approachThere's very little work for project maintainers to do: sign your artifact (e.g. shell script), such that the signature is sent to Rekor. No other HTTP resources besides the artifact (e.g. shell script) need to exist on the remote server. And there's even less for the user to do: just run |
@luhring this sounds great, thanks for writing that up! I think there's still some questions to sort out, but I think that's roughly along the lines of something we'd need for this to work for arbitrary URLs, especially when the maintainers might not have done anything to enable better assurances for
This seems unavoidable, basically. Do we need some separation of globally trusted identities and per-site trusted identities? I might trust anything Luke has signed, but might only trust something Dan signs in the context of Dan's site. Or is trust a globally binary state? I'm not sure. In the absence of trusted identities, can we show a warning like "NNN users have marked this as trustworthy, here are a handful of them: Both of these require some flow for prompting users to note their trust of the artifact, which might also be challenging. Once you
I think nailing this will be crucial to adoption, especially early on while |
I've been thinking a lot about Jason's comment above. This trust thing is a fascinating problem!
I definitely see value in this distinction (it reminds me vaguely of SSH config: "here are my trust settings for any host, here are my settings for host X, etc."). I think something like this would be good to include. I'm wondering if it should be in the MVP or not.
I love this! ❤️ It adds a social component to the world of OSS software installation. It reminds me a bit of GitHub stars. "Oh, I see Dan Lorenc trusts this thing? Okay yeah, I'm willing to trust it, too." Tangent: It might be neat to have a web UI to showcase this, maybe sourcing data from Rekor, to make things more grokkable for the average user. I'm envisioning a way to browse signed things (e.g. scripts) (indexed by digest and/or content URL). And for each thing, you can see how many identities have signed it, and for each identity, some context about who they are (thanks to OIDC). Maybe you can also see each person's list of things they trust. If I'm getting too web-of-trust-y, call me out! 😃 I think it would be helpful if, when This could help the user verify that the resource author intended for a given resource to be what's provided by a specific URL. For example, without this in place, the following would be possible:
(In other words, this could help prevent "rollback" and "indefinite freeze" attacks described on the TUF site.) If the signature payload included the intended URL, Also, users may want Another thought, for later on: I've been thinking about the "requirements" concept in Apple's code signing system. This might relate to the claims/annotations feature in Cosign (although I'm still learning about this feature). This is a way for the software publisher to specify additional constraints for the verifying client to check, in addition to the raw signature being verified successfully. These "requirements" can be things like "the root cert should be Apple's root CA", or "the signing cert should be X", etc. Down the road, I could see these making sense as optional flags to
This would serve to narrow the scope of what signatures are considered valid. If This wouldn't protect against attacks on the README content. But it might be a nice, simple mechanism for "trusting the right thing for this particular installation". The other advantage is that it could provide a secure approach to a stateless user environment, provided the |
These sound like a good set of questions to answer tomorrow in the call. I'll suggest we do it in a bit different of an order:
Then:
|
I really recommend that before delving into questions such as how will the UX play out, what language, flags etc, we first define and outline what is the current and projected scope of sget-go. Otherwise you risk misunderstandings coming up later on. |
I think that's a bit circular - sget-go is on pause until we resolve what's happening with the other sget(s). I can explain what I originally wanted to do here with it, but we're trying to make sure there's only one sget and all of these plans can change to make sure we get one thing everyone is happy with. |
So we met, and I think we all in general agreed to the following course of action:
(I'm probably missing things, please add anything else!) Folks in the call seemed pretty aligned that a more secure curl alternative was useful, and that we have some ideas we want to explore and build out, and that this is an agreeable path toward that future. @lukehinds we wanted to get your feedback on the plan before we started clicking buttons. WDYT? |
LGTM! |
This one actually might be too hard to do without circular imports, happy to punt on that one if it complicates stuff too much.
I think there's a |
That sgtm too. 👍 If we don't keep it as a wrapper we just have to coordinate with packagers who expect to find it there.
Sounds like you're volunteering 😉 |
Why not! Let's give it a try. |
From @lukehinds in Slack:
Sounds like we can start clicking buttons 👍 Thanks everyone! |
Closing as outdated, as sget has been archived. |
Cc @imjasonh
The text was updated successfully, but these errors were encountered: