Skip to content

Conversation

lei-tang
Copy link
Contributor

This PR has URLs pointing to: #5162.
Thus the lint test will fail until these PRs are merged.

Please provide a description for what this PR is for: istio/istio#17061.

Design documents:
[1]https://docs.google.com/document/d/1VHyBre8943USOx_YEVtA18KfEoGTmLT1iBHESO5bzcA/edit#heading=h.qex63c29z2to
[2] https://docs.google.com/document/d/1v8BxI07u-mby5f5rCruwF7odSXgb9G8-C9W5hQtSIAg/edit#heading=h.xw1gqgyqs5b

And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.

[ ] Configuration Infrastructure
[ ] Docs
[ X] Installation
[ X] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ X] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

@lei-tang lei-tang requested a review from a team as a code owner October 29, 2019 19:34
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Oct 29, 2019
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 29, 2019
@lei-tang lei-tang added this to the 1.4 milestone Oct 30, 2019
@ericvn
Copy link
Contributor

ericvn commented Oct 31, 2019

/test lint_istio.io

Copy link
Contributor

@adammil2000 adammil2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments here, but looks great! Thanks!

target_release: 1.4
---

Istio has two webhooks: Galley and Sidecar Injector. Both of them are critical to Istio,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Istio has two webhooks: Galley and Sidecar Injector. Both of them are critical to Istio,
Istio has two webhooks: Galley and Sidecar Injector. Both of them are crucial for Istio,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thank you!

caption="An example attack"
>}}

In Istio 1.4, we introduce a new feature that uses `istioctl` to securely manage webhooks, with which:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In Istio 1.4, we introduce a new feature that uses `istioctl` to securely manage webhooks, with which:
To protect against this kind of attack, Istio 1.4 introduces a new feature to securely manage
webhooks using `istioctl`:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thank you!

Copy link
Contributor

@adammil2000 adammil2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@jwendell
Copy link
Member

jwendell commented Nov 2, 2019

@lei-tang Could you please verify the lint failure?

@lei-tang
Copy link
Contributor Author

lei-tang commented Nov 2, 2019

@jwendell This PR has URLs pointing to: #5162. Thus the lint test will fail until the PR 5162 is merged.

Copy link
Contributor

@rcaballeromx rcaballeromx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the blog post announcement for the feature.
However, the text is very difficult to follow and contains forward looking statements.
@adammil2000 Could you help @lei-tang address some of the issues still present?

target_release: 1.4
---

Istio has two webhooks: Galley and Sidecar Injector. Both of them are crucial for Istio,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not capitalize the sidecar injector unless you are referring specifically to the value in a config file.

Suggested change
Istio has two webhooks: Galley and Sidecar Injector. Both of them are crucial for Istio,
Istio has two webhooks: Galley and the sidecar injector. Both of them are crucial for Istio,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.

sidecar containers.

By default, Galley and Sidecar Injector manage their own webhook configurations, which may
have a security risk if they are compromised (e.g., by buffer overflow attacks). Configuring
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
have a security risk if they are compromised (e.g., by buffer overflow attacks). Configuring
have a security risk if they are compromised, for example, through buffer overflow attacks. Configuring

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.

To protect against this kind of attack, Istio 1.4 introduces a new feature to securely manage
webhooks using `istioctl`:

1. `istioctl`, instead of Galley and Sidecar Injector, manage the webhook configurations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph is very confusing. @lei-tang What are the features introduced? You are not talking about istioctl but rather the ability to use istioctl to perform certain operations. Please revisit the text on this list and mke it clear to the readers the following:

  • What new operations they can perform using istioctl?
  • What are the new sub-commands or flags?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature introduced is istioctl, instead of Galley and the sidecar injector, manage the webhook configurations. The sentences here highlights the advantages of the new feature; the details of the new feature is in the user guide.

and whether the certificate chain used by the webhook server is valid, which reduces the errors
caused by an unready server and by invalid certificates.

To try this new feature, please follow its [user guide](/docs/setup/install/webhook).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not introduce the content for this functionality as part of our setup guide. The content should be within /docs/tasks/security/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.


Istio has two webhooks: Galley and the sidecar injector. Both of them are crucial for Istio,
with Galley validating Kubernetes resources and the sidecar injector injecting Istio
sidecar containers.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Istio has two webhooks: Galley and the sidecar injector. Both of them are crucial for Istio,
with
Galley validates Kubernetes resources and the sidecar injector injectsing sidecar containers into Istio
sidecar containers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.

sidecar containers.

By default, Galley and the sidecar injector manage their own webhook configurations, which may
have a security risk if they are compromised, for example, through buffer overflow attacks. Configuring
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, Galley and the sidecar injector manage their own webhook configurations.,which may
have
This can pose a security risk if they are compromised, for example, through buffer overflow attacks. Configuring

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.

have a security risk if they are compromised, for example, through buffer overflow attacks. Configuring
a webhook is a highly privileged operation as a webhook may monitor and mutate all
Kubernetes resources. In the following example, the attacker compromises
Galley and modifies the webhook configuration of Galley to eavesdrop all Kubernetes secrets
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lley and modifies the webhook configuration of Galley to eavesdrop on all Kubernetes secrets

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.

Kubernetes resources. In the following example, the attacker compromises
Galley and modifies the webhook configuration of Galley to eavesdrop all Kubernetes secrets
(the `clientConfig` is modified by the attacker to direct the `secrets` resources to the
a service owned by the attacker).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the clientConfig is modified by the attacker to direct the secrets resources to the
a service owned by the attacker).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.

webhooks using `istioctl`:

1. `istioctl`, instead of Galley and the sidecar injector, manage the webhook configurations.
Galley and the sidecar injector are de-privileged such that even if they are compromised, they
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Galley and the sidecar injector are de-privileged such that so even if they are compromised, they

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.

will not be able to alter the webhook configurations.

1. Before configuring a webhook, `istioctl` will verify whether the webhook server is up
and whether the certificate chain used by the webhook server is valid, which reduces the errors
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before configuring a webhook, istioctl will verify whether the webhook server is up
and whether that the certificate chain used by the webhook server is valid, which reduces the errors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised accordingly.

Copy link

@zjory zjory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rcaballeromx Completed content review

---
title: Secure webhook management
description: A more secure way to manage Istio webhooks.
publishdate: 2019-10-29
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the date of both of your blogs be changed to align with the release date?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

will not be able to alter the webhook configurations.

1. Before configuring a webhook, `istioctl` will verify the webhook server is up
and that the certificate chain used by the webhook server is valid, which reduces the errors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and that the certificate chain used by the webhook server is valid, which reduces the errors
and that the certificate chain used by the webhook server is valid. This reduces the errors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


1. Before configuring a webhook, `istioctl` will verify the webhook server is up
and that the certificate chain used by the webhook server is valid, which reduces the errors
caused by an unready server and by invalid certificates.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this is saying? Maybe:

Suggested change
caused by an unready server and by invalid certificates.
that can occur before a server is ready or has invalid certificates.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

and that the certificate chain used by the webhook server is valid, which reduces the errors
caused by an unready server and by invalid certificates.

To try this new feature, please follow its [user guide](/docs/setup/security/webhook).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To try this new feature, please follow its [user guide](/docs/setup/security/webhook).
To try this new feature, refer to the [Istio webhook management task](/docs/setup/security/webhook).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

By default, Galley and the sidecar injector manage their own webhook configurations.
This can pose a security risk if they are compromised, for example, through buffer overflow attacks.
Configuring a webhook is a highly privileged operation as a webhook may monitor and mutate all
Kubernetes resources. In the following example, the attacker compromises
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Kubernetes resources. In the following example, the attacker compromises
Kubernetes resources.
In the following example, an attacker compromises

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@lei-tang
Copy link
Contributor Author

lei-tang commented Nov 8, 2019

@frankbu The PR has been revised based on the comments. Please take another look. Thank you!

@lei-tang
Copy link
Contributor Author

lei-tang commented Nov 8, 2019

/test lint_istio.io


1. Before configuring a webhook, `istioctl` will verify the webhook server is up
and that the certificate chain used by the webhook server is valid. This reduces the errors
that can occur before a server is ready or has invalid certificates.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
that can occur before a server is ready or has invalid certificates.
that can occur before a server is ready or if a server has invalid certificates.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator

@frankbu frankbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make one more suggested tweak to the wording.

@lei-tang lei-tang force-pushed the blog-webhook-controller branch from 3f04a3d to 1ac1588 Compare November 8, 2019 16:37
@istio-testing istio-testing merged commit c2c00f5 into istio:master Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/environments area/networking area/security cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.