Coder Social home page Coder Social logo

Comments (5)

mtrmac avatar mtrmac commented on August 16, 2024

There already is remapIdentity. Isn’t this sufficient?

But, uh, in general, if the public identity users are aware of is registry.k8s.io, not some cloud host name, the signatures should sign the public identity name. That’s how users get an end-to-end-identity guarantee that they are getting the application they want. (Sure, there is registries.conf to redirect, and remapIdentity to change signatures, but those require local end-user knowledge that is almost certainly not transferred with similar integrity protection to the actual signature.)

Changing what name is signed seems to be the right thing to do. IIRC cosign can’t currently do it, follow https://issues.redhat.com/browse/RUN-1717 .

from image.

saschagrunert avatar saschagrunert commented on August 16, 2024

I'm not sure about remapIdentity, as mentioned this would require exact knowledge about the proxy setup and will possibly break in the future.

@mtrmac how would signing using registry.k8s.io work technically? Would we just change the docker-reference or add an additional field to the critical spec?

For ref:

> cosign verify --certificate-identity [email protected] --certificate-oidc-issuer https://accounts.google.com registry.k8s.io/security-profiles-operator/security-profiles-operator:v0.8.0 | jq
[
  {
    "critical": {
      "identity": {
        "docker-reference": "europe-west8-docker.pkg.dev/k8s-artifacts-prod/images/security-profiles-operator/security-profiles-operator"
      },
      "image": {
        "docker-manifest-digest": "sha256:2ff89db553e3d1a4c7cddef318607a851b9b3c185539e7d2b0395db31eb71a38"
      },
      "type": "cosign container image signature"
    },
    "optional": {
      "1.3.6.1.4.1.57264.1.1": "https://accounts.google.com",
      "Bundle": {
        "SignedEntryTimestamp": "MEYCIQCLLsNPrD//vITjR5cfW5UpBD49X8HIZcK4FzOmaRf8HAIhALu2W2NaTqsAMkqeKP6TIVoi4QqLg65lJhZ0CIirU5pt",
        "Payload": {
          "body": "eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiIzMGFhYzA2YTZiMTE0NDc5NjZkN2FjY2QxOWNhZjJlNjE3MzA3MWIyZWIwMmZiNzYyYTUxOTQ4ZmFhMW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681809893,
          "logIndex": 18264171,
          "logID": "c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"
        }
      },
      "Issuer": "https://accounts.google.com",
      "Subject": "[email protected]",
      "org.kubernetes.kpromo.version": "kpromo-"
    }
  }
]

from image.

mtrmac avatar mtrmac commented on August 16, 2024

Yes, change the docker-reference.

Typically the publishing workflow would be something like skopeo copy [--remove-signatures] --sign-by-sigstore=… --sign-identity=registry.example.com/public-product:$version docker://private-registry.example.com/testing-rc:$version docker://staging-registry.example.com/to-publish-product:$version.

from image.

saschagrunert avatar saschagrunert commented on August 16, 2024

I proposed something for discussion in sigstore/cosign#2984 and sigstore/sigstore#1166.

from image.

saschagrunert avatar saschagrunert commented on August 16, 2024

I see this as resolved now since sigstore/cosign#2995 merged

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.