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

Allows additional Subject Alternate Names #2063

Merged
merged 1 commit into from
Nov 7, 2017

Conversation

pdh
Copy link
Contributor

@pdh pdh commented Mar 7, 2017

Adds support for specifying additional SANs for issue #1922


This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Hi @pdh. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 7, 2017
@yissachar
Copy link
Contributor

@k8s-bot ok to test

Copy link
Contributor

@chrislovecnm chrislovecnm left a comment

Choose a reason for hiding this comment

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

Questions for you

@@ -167,6 +168,8 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command {
cmd.Flags().StringSliceVar(&options.NodeSecurityGroups, "node-security-groups", options.NodeSecurityGroups, "Add precreated additional security groups to nodes.")
cmd.Flags().StringSliceVar(&options.MasterSecurityGroups, "master-security-groups", options.MasterSecurityGroups, "Add precreated additional security groups to masters.")

cmd.Flags().StringSliceVar(&options.AdditionalSANs, "additional-sans", options.AdditionalSANs, "Add additional Subject Alternate Names to the kops generated apiserver cert")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have this cli option? We try not to have all api level option via the cli.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I agree that this may not be desired to add as a CLI option. Happy to remove.

@@ -21,6 +21,8 @@ spec:
kubernetesVersion: v1.4.6
masterInternalName: api.internal.minimal.example.com
masterPublicName: api.minimal.example.com
additionalSans:
- proxy.api.minimal.example.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this in the dockerbuilder test? Or do we need another test??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove this.

@@ -68,6 +68,9 @@ type ClusterSpec struct {
// MasterInternalName is the internal DNS name for the master nodes
MasterInternalName string `json:"masterInternalName,omitempty"`

// AdditionalSANs adds additional Subject Alternate Names to apiserver cert that kops generates
AdditionalSANs []string `json:"additionalSans,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

@justinsb et al ... AdditionalSANs ... is SANs a common reference. SSL and TLS are probably one of my weakest areas ... lol

@@ -67,6 +67,9 @@ type ClusterSpec struct {
// MasterInternalName is the internal DNS name for the master nodes
MasterInternalName string `json:"masterInternalName,omitempty"`

// AdditionalSANs adds additional Subject Alternate Names to apiserver cert that kops generates
AdditionalSANs []string `json:"additionalSans,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

So this adds the API value. Where is the biz logic to add the SAN to the cert? I am probably missing it.

@snoby
Copy link
Contributor

snoby commented Apr 28, 2017

👍
Definitely need this.

@justinsb
Copy link
Member

This looks good.. I'll just have to ponder whether additionalSANs being under spec is the right place. It feels like we should associate it with the API server, but we don't really have a block for that. We do have the api block, but .... I'm not sure. I'll think for a bit and then likely merge.

Do you mind if I move it if I decide it should go somewhere else @pdh? The top candidate in my mind is under the api block - any thoughts?

Also, additionalSANs is a little redundant, but it does seem to be what everyone else does, so :-)

@pdh
Copy link
Contributor Author

pdh commented Apr 28, 2017

Thanks for taking a look.

@justinsb definitely feel free to move it. api does seem like it might be a better place, but I defer to you all for what makes the most sense. Let me know if you'd like me to make any changes here.

@chrislovecnm
Copy link
Contributor

@justinsb I would like the docker unit test removed, and had a couple of other questions. May be off base ;)

@snoby
Copy link
Contributor

snoby commented May 1, 2017

Love for this to be accepted, as I'm having to run with the flag --insecure-skip-tls-verify in my clusters that are being accessed through an NGINX proxy. :-(

@snoby
Copy link
Contributor

snoby commented May 8, 2017

bump

@prat0318
Copy link

prat0318 commented Jun 8, 2017

bump.. this will be super helpful to access apiserver from outside the network. Current stuck on this.

@chrislovecnm
Copy link
Contributor

Once the reviews are resolved we can get this in. If the author wants someone else can branch and push the needed changes.

@pdh
Copy link
Contributor Author

pdh commented Jun 12, 2017

I think all should be addressed now. Let me know if anything else is needed.

@chrislovecnm
Copy link
Contributor

Assigning to @justinsb as he had the last comments

@bernielomax
Copy link

Any chance this can be reviewed?

@@ -65,6 +65,9 @@ type ClusterSpec struct {
// MasterInternalName is the internal DNS name for the master nodes
MasterInternalName string `json:"masterInternalName,omitempty"`

// AdditionalSANs adds additional Subject Alternate Names to apiserver cert that kops generates
AdditionalSANs []string `json:"additionalSans,omitempty"`

Choose a reason for hiding this comment

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

why not additionalSAN? The capitalization is bit odd given there's networkCIDR.

@blakebarnett
Copy link

Maybe there should be a PKI section in the spec? I can imagine a few other sections like Node CSR approval and certificate expiration/revocation that could go under there also.

@k8s-github-robot
Copy link

@pdh PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 4, 2017
@blakebarnett
Copy link

I think this should go into the next release.

@chrislovecnm
Copy link
Contributor

Needs a rebase :(

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 28, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 28, 2017
@llpdh
Copy link

llpdh commented Sep 28, 2017

@chrislovecnm rebased 👍

@chrislovecnm
Copy link
Contributor

chrislovecnm commented Sep 28, 2017

@blakebarnett can you take a look at this? Let me know if you cannot

@blakebarnett
Copy link

My only issues are with the naming and capitalization of the JSON parameters (additionalSans vs additionalSANs). UX wise I think we should probably start moving some more of these top-level keys into logical groups.

If everyone else is happy with it as is, fine with merging, would really like to use this.

@chris-h-phillips
Copy link
Contributor

We'd love to use this as well 👍

@pdh pdh force-pushed the additional-sans branch 3 times, most recently from 07b2529 to 14f22d0 Compare November 1, 2017 23:24
@llpdh
Copy link

llpdh commented Nov 6, 2017

@chrislovecnm @justinsb Hi folks, just giving this a nudge.

@justinsb
Copy link
Member

justinsb commented Nov 7, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 7, 2017
@justinsb justinsb merged commit 7066368 into kubernetes:master Nov 7, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 7, 2017
@dermyrddin
Copy link

Does this also works for creating cluster through terraform?
I've just tried and it seems that certificate does not include ELB domain name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet