Coder Social home page Coder Social logo

Comments (6)

mtrmac avatar mtrmac commented on July 18, 2024

Thanks for your report.

Structurally, as to “where to file this”, we’ve made a mess of things: see #1726 .


WRT the idea itself, I’m generally wary of adding any variability to signature enforcement. Admittedly there already is a precedent in looking for per-user files, and the /etc vs. /usr thing is a reasonably established pattern…

I ran into one such case in osbuild/osbuild#1410 where /usr/ gets mounted in from the "host" but /etc/ doesn't.

… but I don’t see this as a strong argument; there are infinite ways to create a broken system.

Actually, “the policy file got somehow lost” is exactly a good reason to “fail closed” and not fall back to some other policy. The default policy in /usr would, I think, have to be pretty permissive (maybe restricting repositories where the OS provider ships code, to be signed by keys from that OS provider) — so falling back from a site-wide strict policy to the built-in fairly permissive one could be a problem.

from image.

dustymabe avatar dustymabe commented on July 18, 2024

maybe restricting repositories where the OS provider ships code, to be signed by keys from that OS provider

That's what we do today. We (the OS provider being Fedora/Red Hat) ships:

    "transports": {
        "docker": {
	    "registry.access.redhat.com": [
		{
		    "type": "signedBy",
		    "keyType": "GPGKeys",
		    "keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
		}
	    ],
	    "registry.redhat.io": [
		{
		    "type": "signedBy",
		    "keyType": "GPGKeys",
		    "keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
		}
	    ]
	},

but we ship it in /etc/ and not /usr/ like we probably should.

I guess there's another argument to make here being that the keys referenced in that config are also in /etc/.

from image.

mtrmac avatar mtrmac commented on July 18, 2024

Yes, but if that file is “lost” then we don’t fall back to any other policy, we just fail and force the user to provide a policy.

(Admittedly if the user sets up the policy with something valid but not what was intended, there is no way for policy consumers to tell — and I don’t have a strong argument that “forgot to provide a policy” is a more important failure case than “provided the wrong one”. But still, if we can’t do better in some cases, I don’t think that means we should give up on doing better in other cases.)

from image.

dustymabe avatar dustymabe commented on July 18, 2024

Thanks for the discussion.

from image.

mtrmac avatar mtrmac commented on July 18, 2024

I very much appreciate the irony that just filing a “also read from /usr” issue without more justification would probably have had a smoother path; and that adding a real-world use case is what triggered my “oh, wait, this is actually good not to do” reaction.

I don’t really know what’s the best path forward here. It’s definitely valuable to have an issue filed, so that the decision can be centralized and tracked.

from image.

rhatdan avatar rhatdan commented on July 18, 2024

I think we should move the c/i config files to usr and overrride in /etc for consistency, and then users can just blow away /etc/ to get back to default configuration.

from image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.