Skip to content

Add sds_name into gateway config.#772

Merged
wenchenglu merged 3 commits intoistio:release-1.1from
JimmyCYJ:release-1.1
Jan 24, 2019
Merged

Add sds_name into gateway config.#772
wenchenglu merged 3 commits intoistio:release-1.1from
JimmyCYJ:release-1.1

Conversation

@JimmyCYJ
Copy link
Copy Markdown
Member

Add sds_name into gateway config. In order to obtain credentials, gateway sends SDS requests with this sds_name to gateway agent.

@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 Jan 24, 2019
@JimmyCYJ
Copy link
Copy Markdown
Member Author

cc @myidpt @costinm

// Otherwise default to the default cipher list supported by Envoy.
repeated string cipher_suites = 9;

// Optional: Name of credential to be queried by gateway via secret discovery
Copy link
Copy Markdown

@myidpt myidpt Jan 24, 2019

Choose a reason for hiding this comment

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

Optional: If specified, the gateway controllers (with SDS enabled) use the specified name as the SDS secret config name to call the SDS server, to retrieve the key and certificates. Otherwise, the gateway controllers (with SDS enabled) uses the first value in the hosts as the SDS secret config name to call the SDS server.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done. Thanks!

// Optional: If specified, the gateway controllers (with SDS enabled)
// use the specified name as the SDS secret config name to call the SDS
// server, to retrieve the key and certificates. Otherwise, the gateway
// controllers (with SDS enabled) uses the first value in the hosts as
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry, nit: uses --> use

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done. Thanks!

@myidpt
Copy link
Copy Markdown

myidpt commented Jan 24, 2019

/lgtm
/approve

@istio-testing
Copy link
Copy Markdown
Collaborator

@myidpt: changing LGTM is restricted to assignees, and only istio/api repo collaborators may be assigned issues.

Details

In response to this:

/lgtm
/approve

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.

Copy link
Copy Markdown
Contributor

@costinm costinm left a comment

Choose a reason for hiding this comment

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

/lgtm

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: costinm, JimmyCYJ, myidpt

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

The pull request process is described here

Details 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

@wenchenglu wenchenglu merged commit b2beb75 into istio:release-1.1 Jan 24, 2019
@JimmyCYJ JimmyCYJ deleted the release-1.1 branch January 24, 2019 18:29
JimmyCYJ added a commit to JimmyCYJ/api that referenced this pull request Jan 24, 2019
* Add sds_name into gateway config

* Update comment

* Update comment
// use the specified name as the SDS secret config name to call the SDS
// server, to retrieve the key and certificates. Otherwise, the gateway
// controllers (with SDS enabled) use the first value in the hosts as
// the SDS secret config name to call the SDS server.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I dont think you should use the first value in hosts. Thats very arbitrary and could end up fetching someone else's secret. There is no mandate for the hosts in a gateway to be unique.

Second, this API is very adhoc. How does this work with the certificates that the end user specifies? Do they work together or is there some other magic behind the scenes ? The agreement earlier was to make this a oneOf such that the user either specifies the certs or the secret name. Not both. And certainly not this gratuitous default of picking the first host.

Please fix this before implementing it.

@costinm
Copy link
Copy Markdown
Contributor

costinm commented Jan 25, 2019

For most users the cert management will be automated, so user doesn't have to manually handle secrets.

The 'sdsSecret' is used if user has existing certs in place.

Having both 'file' and 'sdsSecret' is actually intended behavior if user runs Ingresses on both k8s and non-k8s environments. In non-k8s the file will be used. We should make it clear that sdsSecret will take precedence if SDS is available, falling back to file and default.

Naming certs with the first hostname happens to be the convention that few popular ACME tools use.
( and we need to make sure we match). Kubelego for example.

@ozevren ozevren added the review/workgroup needed Workgroup level review needed label Jan 28, 2019
rshriram added a commit that referenced this pull request Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. review/workgroup needed Workgroup level review needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants