Skip to content
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

Allow certs to be include in an image #97

Merged
merged 3 commits into from
Apr 12, 2022
Merged

Allow certs to be include in an image #97

merged 3 commits into from
Apr 12, 2022

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Apr 11, 2022

Summary

Prior to this PR, a helper is added at build time. This helper will execute in the runtime environment and load any ca-certs that are presented through a binding. This is the most flexible, but requires the individual executing the image to specify the binding with the CA certificates. If the CA certificates binding is skipped/forgotten, then the run will likely fail.

Since CA certificates are public certificates and not secret, we can build the CA certificates into the image if the user would prefer. This provides the CA certificates by default, so there is no ca-certificates binding required at runtime. You can add additional CA certs at runtime with a binding, but you cannot remove CA certs baked into the image without rebuilding.

To include in the image, set BP_EMBED_CERTS=true and rebuild your image.

CA certificates are copied into the layer. Then the normal symlinking procedure is applied referencing the copies.

This resolves #94.

In addition, this PR deprecates BP_ENABLE_RUNTIME_CERT_BINDING because this has a default true value and we are moving all config to be default false. This env variable is replaced by BP_RUNTIME_CERT_BINDING_DISABLED which defaults to false. The meaning is basically the same. Going forward, set BP_RUNTIME_CERT_BINDING_DISABLED=true to remove the runtime helper from the produced image.

Use Cases

#94

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@dmikusa dmikusa added the type:enhancement A general enhancement label Apr 11, 2022
@dmikusa dmikusa requested a review from a team as a code owner April 11, 2022 20:58
@dmikusa dmikusa added the semver:minor A change requiring a minor version bump label Apr 11, 2022
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Daniel Mikusa and others added 3 commits April 12, 2022 10:08
Prior to this PR, a helper is added at build time. This helper will execute in the runtime environment and load any ca-certs that are presented through a binding. This is the most flexible, but requires the individual executing the image to specify the binding with the CA certificates. If the CA certificates binding is skipped/forgotten, then the run will likely fail.

Since CA certificates are public certificates and not secret, we can build the CA certificates into the image if the user would prefer. This provides the CA certificates by default, so there is no ca-certificates binding required at runtime. You can add additional CA certs at runtime with a binding, but you cannot remove CA certs baked into the image without rebuilding.

To include in the image, set `BP_EMBED_CERTS=true` and rebuild your image.

CA certificates are copied into the layer. Then the normal symlinking procedure is applied referencing the copies.

This resolves #94.

In addition, this PR deprecates `BP_ENABLE_RUNTIME_CERT_BINDING` because this has a default `true` value and we are moving all config to be default `false`. This env variable is replaced by `BP_RUNTIME_CERT_BINDING_DISABLED` which defaults to false. The meaning is basically the same. Going forward, set `BP_RUNTIME_CERT_BINDING_DISABLED=true` to remove the runtime helper from the produced image.

Signed-off-by: Daniel Mikusa <[email protected]>
Co-authored-by: David O'Sullivan <[email protected]>
Co-authored-by: David O'Sullivan <[email protected]>
@dmikusa dmikusa merged commit 5ebb697 into main Apr 12, 2022
@dmikusa dmikusa deleted the embed branch April 12, 2022 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable CA certificates to be baked into an image
2 participants