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

New Citadel API proto #8152

Merged
merged 2 commits into from
Aug 23, 2018
Merged

New Citadel API proto #8152

merged 2 commits into from
Aug 23, 2018

Conversation

myidpt
Copy link

@myidpt myidpt commented Aug 22, 2018

Introduce the new Citadel API, related issue: #8151.
Also updated other .proto_descriptor files in the same dir by rerunning mixer_codegen.sh.

@myidpt myidpt requested review from quanjielin and removed request for diemtvu August 22, 2018 23:32
@myidpt myidpt changed the title New Citadel API New Citadel API proto Aug 22, 2018
repeated string cert_chain = 1;
}

// Service for managing certificates issued by the Istio CA.
Copy link

Choose a reason for hiding this comment

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

"Istio CA" is no longer a valid term here. Should rephrase to avoid mentioning.

Copy link
Author

Choose a reason for hiding this comment

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

Good call. This should be general CA.


package istio.v1.auth;

import "gogoproto/gogo.proto";
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

They are not required as far as I see for now. I removed them.

@codecov
Copy link

codecov bot commented Aug 23, 2018

Codecov Report

Merging #8152 into master will increase coverage by 1%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #8152    +/-   ##
=======================================
+ Coverage      71%     71%    +1%     
=======================================
  Files         374     374            
  Lines       32673   32956   +283     
=======================================
+ Hits        22906   23235   +329     
+ Misses       8760    8712    -48     
- Partials     1007    1009     +2
Impacted Files Coverage Δ
pilot/pkg/config/memory/monitor.go 82% <0%> (-9%) ⬇️
mixer/adapter/servicecontrol/reportbuilder.go 88% <0%> (ø) ⬇️
pkg/mcp/creds/watcher.go 88% <0%> (ø) ⬇️
mixer/adapter/memquota/rollingWindow.go 100% <0%> (ø) ⬆️
mixer/pkg/config/store/listener.go 100% <0%> (ø) ⬆️
pilot/pkg/model/gateway.go 0% <0%> (ø) ⬆️
mixer/adapter/memquota/memquota.go 100% <0%> (ø) ⬆️
mixer/adapter/list/regexList.go 100% <0%> (ø) ⬆️
mixer/adapter/dogstatsd/dogstatsd.go 100% <0%> (ø) ⬆️
mixer/adapter/prometheus/prometheus.go 100% <0%> (ø) ⬆️
... and 18 more

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 5a7ce28...d797b39. Read the comment docs.

Copy link
Contributor

@quanjielin quanjielin left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

..

// Using provided CSR, returns a signed certificate.
rpc CreateCertificate(IstioCertificateRequest)
returns (IstioCertificateResponse) {
}
Copy link
Member

Choose a reason for hiding this comment

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

Just so I understand the model, node agents ie daemon sets will request csrs from citadel and then the node agent will sign pod certificates and serve pod certificates to sidecar Envoy over SDS?

Won’t this put the CA in the critical path for all pod creation events

Copy link
Author

Choose a reason for hiding this comment

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

Actually in OSS (k8s), the Envoy requests cert from node agent via SDS. Node agent creates the key pair and sends the CSR to Citadel with pod JWT. Citadel signs the cert and returns it to node agent, and node agent sends the cert to Envoy through SDS.

Copy link
Member

Choose a reason for hiding this comment

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

So, if the CA is unavailable, the pod won't start or won't be reachable until the CA is available right? Also, if we are rotating the certs, the CA has to be available for the cert rotation to work online.

Copy link

Choose a reason for hiding this comment

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

Compared with current situation where Citadel watch service account and generate secrets, in an async way along the pod creation. For mTLS enabled workloads, Citadel is still on the critical path to get pods functioning and refresh the key cert (otherwise after new connection can't be established after certs expired).

If we implement Pilot such that SDS config is only distributed for mTLS enabled service/workloads, then that does not make much difference?

Copy link
Member

Choose a reason for hiding this comment

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

Probably. If come with pilot, mixer requires mTLS, then with or without mTLS for service all pods will end up doing SDs

Copy link
Member

Choose a reason for hiding this comment

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

Also please have a go implementation of the SDs client to talk to citadel. All istio components can use that library if they want to.

Copy link

Choose a reason for hiding this comment

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

Sure.

We're aware of the plan to remove envoy sidecar for control plane components. And their mTLS/security requirement definitely will be covered before we turn this on.

Copy link

@incfly incfly Aug 23, 2018

Choose a reason for hiding this comment

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

@rshriram We talked with @qiwzhang who is working on SDS support for Envoy. Actually if a SDS server can't response with the valid certificates, only that particular listener will be affected. Envoy itself will not crash and other listener not using the SDS can also work.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the reply @incfly

@myidpt
Copy link
Author

myidpt commented Aug 23, 2018

/test all

@istio-testing
Copy link
Collaborator

istio-testing commented Aug 23, 2018

@myidpt: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-unit-tests.sh d797b39 link /test istio-unit-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@incfly
Copy link

incfly commented Aug 23, 2018

/lgtm
/approve

@istio-testing
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: incfly, quanjielin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@istio-testing istio-testing merged commit 78d2f0e into istio:master Aug 23, 2018
@myidpt myidpt deleted the mergeapi branch August 24, 2018 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants