Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

injector: enforce using configured images #4131

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

shashankram
Copy link
Member

Description:
This change enforces that images configured by
the user or install time defaults are always
used at the time of sidecar injection.
Previously, default images were encoded in the
configurator which posed a security risk of
not using configured images in case those
values are unavailable in MeshConfig and the user
overrides the defaults. It's common practice for
users to use their own images from secure registries
of their choice, so OSM must enforce that. This problem
is made worse by the fact that OSM could silently use
defaults that the user is unaware of without raising
any warnings or approval from the user, which can
compromise their security requirements.

This change is also required to address #3715 where
default image digests will be encoded in the CLI
as a part of the release workflow without needing
to rebuild the control plane binaries.

Testing done:
Verified that configured images are always used.

Affected area:

Functional Area
Security [X]
Sidecar Injection [X]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project? no

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change? no

This change enforces that images configured by
the user or install time defaults are always
used at the time of sidecar injection.
Previously, default images were encoded in the
configurator which posed a security risk of
not using configured images in case those
values are unavailable in MeshConfig and the user
overrides the defaults. It's common practice for
users to use their own images from secure registries
of their choice, so OSM must enforce that. This problem
is made worse by the fact that OSM could silently use
defaults that the user is unaware of without raising
any warnings or approval from the user, which can
compromise their security requirements.

This change is also required to address openservicemesh#3715 where
default image digests will be encoded in the CLI
as a part of the release workflow without needing
to rebuild the control plane binaries.

Signed-off-by: Shashank Ram <[email protected]>
@shashankram shashankram requested a review from a team as a code owner September 17, 2021 16:55
@codecov-commenter
Copy link

Codecov Report

Merging #4131 (55883d3) into main (2bb06c0) will increase coverage by 0.04%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4131      +/-   ##
==========================================
+ Coverage   68.78%   68.83%   +0.04%     
==========================================
  Files         210      210              
  Lines       11406    11408       +2     
==========================================
+ Hits         7846     7853       +7     
+ Misses       3508     3503       -5     
  Partials       52       52              
Flag Coverage Δ
unittests 68.83% <92.85%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/injector/patch.go 90.78% <90.90%> (+0.02%) ⬆️
pkg/configurator/methods.go 74.25% <100.00%> (+2.43%) ⬆️
pkg/providers/kube/client.go 71.68% <0.00%> (+0.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bb06c0...55883d3. Read the comment docs.

@shashankram
Copy link
Member Author

All jobs except for the Go/Lint job have succeeded. The Go/Lint job is failing because of golint being deprecated. Merging this change.

@shashankram shashankram merged commit 60a9754 into openservicemesh:main Sep 17, 2021
@shashankram shashankram deleted the remove-default-image branch September 17, 2021 17:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants