Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@zoxpx
Copy link
Contributor

@zoxpx zoxpx commented Dec 1, 2022

  • expand to "full" service names when using Kuberenetes DNS for service discovery
  • adding Kuberenetes CA for gRPC dial-opts when SSL enabled

Signed-off-by: Zoran Rajic [email protected]

What this PR does / why we need it:

These changes are a part of the "auromatic SSL/TLS setup" effort

  • change to "full" service names when using Kuberenetes DNS for discovery
    • required since the SSL certs are registered to FULL K8s dns-name portworx-service.kube-system.svc.cluster.local
    • using short portworx-service.kube-system dns-alias will result in SSL-validation errors
  • adding Kuberenetes CA for gRPC dial-opts when SSL enabled
    • required since PX certs will be signed by K8s CA

Which issue(s) this PR fixes (optional)
Closes # PWX-26915 (part 1)

Special notes for your reviewer:

* change to "full" service names when using Kuberenetes DNS for discovery
* adding Kuberenetes CA for gRPC dial-opts when SSL enabled

Signed-off-by: Zoran Rajic <[email protected]>
@zoxpx zoxpx requested a review from a team December 1, 2022 05:00
@zoxpx zoxpx self-assigned this Dec 1, 2022
}
}

tlsDialOptions, err := grpcserver.GetTlsDialOptions(rootCA)
Copy link
Contributor

Choose a reason for hiding this comment

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

If the above condition fails... is there a logging message we want to add?

Copy link
Contributor

@jrivera-px jrivera-px left a comment

Choose a reason for hiding this comment

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

LGTM .. I was thinking that if the CA is required at this point for k8s do we want to log something if its not avail?

@zoxpx
Copy link
Contributor Author

zoxpx commented Dec 5, 2022

LGTM .. I was thinking that if the CA is required at this point for k8s do we want to log something if its not avail?

I think we should be OK "as is" --

  • the libopenstorage should work also in non-K8s environments, so there is no guarantee the K8s-CA file will be present.
  • additionally, if the CA is not set up properly, the SSL-connect should throw the appropriate error to indicate that host-cert has not been signed by a known/registered CA (note, it's a very common error, so they had to make the baseline error-response very clear).

Signed-off-by: Zoran Rajic <[email protected]>
@zoxpx zoxpx force-pushed the PWX-26915-pt1_auto-tls_support branch from 7e28305 to 6a479ac Compare December 5, 2022 20:02
@zoxpx
Copy link
Contributor Author

zoxpx commented Dec 5, 2022

note.. re-pushed [6a479ac](https://github.com/libopenstorage/openstorage/pull/2159/commits/6a479ac0e4681a899930758983f62e23af936277) diff with DCO in the comment (travis-build was failing)

Signed-off-by: Zoran Rajic <[email protected]>
@github-actions github-actions bot added size/m and removed size/s labels Dec 6, 2022
@zoxpx
Copy link
Contributor Author

zoxpx commented Dec 6, 2022

Thanks for the review Jose -- merging the PR

@zoxpx zoxpx merged commit d7db847 into master Dec 6, 2022
@zoxpx zoxpx deleted the PWX-26915-pt1_auto-tls_support branch December 6, 2022 02:19
zoxpx added a commit that referenced this pull request Dec 8, 2022
* moved K8s CA addition into `appendK8sCaCertBytes()`
* calling it from both `BuildTlsConfig()` and `BuildDialOps()`
zoxpx added a commit that referenced this pull request Dec 8, 2022
* moved K8s CA addition into `appendK8sCaCertBytes()`
* calling it from both `BuildTlsConfig()` and `BuildDialOps()`

Signed-off-by: Zoran Rajic <[email protected]>
zoxpx added a commit that referenced this pull request Dec 10, 2022
* moved K8s CA addition into `appendK8sCaCertBytes()`
* calling it from both `BuildTlsConfig()` and `BuildDialOps()`

Signed-off-by: Zoran Rajic <[email protected]>
zoxpx added a commit that referenced this pull request Dec 10, 2022
* moved K8s CA addition into `appendK8sCaCertBytes()`
* calling it from both `BuildTlsConfig()` and `BuildDialOps()`

Signed-off-by: Zoran Rajic <[email protected]>
zoxpx added a commit that referenced this pull request Dec 13, 2022
* moved K8s CA addition into `appendK8sCaCertBytes()`
* calling it from both `BuildTlsConfig()` and `BuildDialOps()`

Signed-off-by: Zoran Rajic <[email protected]>
zoxpx added a commit that referenced this pull request Dec 16, 2022
* moved K8s CA addition into `appendK8sCaCertBytes()`
* calling it from both `BuildTlsConfig()` and `BuildDialOps()`

Signed-off-by: Zoran Rajic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants