-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add entitlements support #314
Conversation
6c52957
to
d9fd649
Compare
Thanks for adding this, it's a timely addition for me! Looking forward to it in the next quill release. |
This worked perfectly for my needs! Thanks again, Christophe. |
Thanks @cfergeau this also worked for me! We'll get this in and release Quill =) |
I'm trying to replicate a failure I'm seeing locally in CI. Apologies, I want to isolate and figure out what's wrong before merging: On my local when checking out this branch"
|
👋 @cfergeau I tried to push to this branch to fix the Static Analysis error, but got an authentication problem against your branch. Here is the diff, but you can also just run
|
d05c1be
to
511497e
Compare
I'm seeing this issue with origin/master (+ a7d454d ), this is not new in this PR. |
"allow edit by maintainers" is checked in this PR, I don't know why you could not push. |
Bumps [github.com/blacktop/go-macho](https://github.com/blacktop/go-macho) from 1.1.198 to 1.1.199. - [Release notes](https://github.com/blacktop/go-macho/releases) - [Commits](blacktop/go-macho@v1.1.198...v1.1.199) --- updated-dependencies: - dependency-name: github.com/blacktop/go-macho dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
This requires additional configuration golangci/golangci-lint#3877 (comment) With the default config, a lot of errors are reported. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
This can be tested with https://github.com/crc-org/vfkit/releases/download/v0.5.1/vfkit The "entitlements" and "entitlementsDER" fields are theoritically 2 distinct slots/.., but handling them together in `describe` should not make a big differenc. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Special slots (requirements, entitlements, ...) are handled in 2 places: in GenerateSigningSuperBlob and in newCodeDirectory. This handling mostly hardcodes that there's a macho.CsSlotRequirements slot, and nothing else. For examples, to add handling for a new slot type, newCodeDirectory needs changes in at least 3 non-obvious places (`hashOff` computation, writing of the hashes, and NSpecialSlots). This code abstracts special slots handling by: - adding a new SpecialSlot struct to describe a special slot - the rest of the code no longer needs to know it's dealing with CsSlotRequirements or a CsSlotEntitlements (which I want to add support for) - it adds a SpecialSlotHashWriter type for use in newCodeDirectory to count the number of special slots, compute the `hashOff` value accordingly, write the slots in the correct order, ... This will be useful in the commits which add support for entitlements. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
With the abstraction work done in the previous commit, adding support for entitlements is now fairly straightforward, just need to build the entitlements blob and hashes using user-provided XML data. This fixes anchore#4 Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
My project (https://github.com/crc-org/vfkit) needs entitlements to be able to use the virtualization framework.
This PR reworks special slot handling in the signing code and then adds entitlements support.