-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add TLS support for multiple service endpoints #384
Add TLS support for multiple service endpoints #384
Conversation
aae9cda
to
c01c0e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Deydra71 @olliewalsh wondering if this would be a more generic definition of the certs we need, also with the possibility to customize the mount paths. this might be useful for the edpm side where default cert location for libvirt/qemu is /etc/pki/libvirt/
, /etc/pki/libvirt/private/
, but could also use the config params cert_file
key_file
for this. https://wiki.libvirt.org/TLSCreateServerCerts.html#overriding-the-default-locations
// Service contains server-specific TLS secret
type Service struct {
// +kubebuilder:validation:Optional
// SecretName - holding the cert, key for the service
SecretName string `json:"secretName,omitempty"`
// +kubebuilder:validation:Optional
// CertMount - dst location to mount the service tls.crt cert. Can be used to override the default location which is /etc/tls/<service key>/tls.crt
CertMount *string `json:"certMount,omitempty"`
// +kubebuilder:validation:Optional
// KeyMount - dst location to mount the service tls.key key. Can be used to override the default location which is /etc/tls/<service key>/tls.key
KeyMount *string `json:"keyMount,omitempty"`
// +kubebuilder:validation:Optional
// CaMount - dst location to mount this cert CA ca.crt cert to. Can be used if the service CA cert should be mounted specifically, e.g. to be set in a service config for validation, instead of the env wide bundle.
CaMount *string `json:"caMount,omitempty"`
// +kubebuilder:validation:Optional
// DisableNonTLSListeners - disable non TLS listeners of the service (if supported)
DisableNonTLSListeners bool `json:"disableNonTLSListeners,omitempty"`
}
// Ca contains CA-specific settings, which could be used both by services (to define their own CA certificates)
// and by clients (to verify the server's certificate)
type Ca struct {
// +kubebuilder:validation:Optional
// CaBundleSecretName - dst location to mount the CA cert bundle
CaBundleSecretName string `json:"caBundleSecretName,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:default="/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"
// CaBundleMount - dst location to mount the CA cert bundle
CaBundleMount *string `json:"caBundleMount,omitempty"`
}
// TLS - a generic type, which encapsulates both the service and CA configurations
type TLS struct {
// certificate configuration for API service certs
APIService map[service.Endpoint]Service `json:"APIService"`
// certificate configuration for additional arbitrary certs
Service map[string]Service `json:"service"`
// CA bundle configuration
Ca *Ca `json:"ca"`
}
ef327b5
to
b1bf498
Compare
I've implemented the changes to the structs and their fields as suggested by @stuggi ^^ Following these updates the functions and tests were revised within the tls package, so it should now be in place for operator testing. |
4946d90
to
cad50be
Compare
1bfaa38
to
2e43709
Compare
17d5dad
to
3719cbd
Compare
Adds watches for name secret and configmap resources from the OpenStackClient CRD. This allows to watch the specific resources when they change. Also adds EnvTest for OpenstackClient being created by the OpenstackControlPlane controller. Depends-On: openstack-k8s-operators/lib-common#384
9acfa6d
to
e973d73
Compare
Adds watches for name secret and configmap resources from the OpenStackClient CRD. This allows to watch the specific resources when they change. Also adds EnvTest for OpenstackClient being created by the OpenstackControlPlane controller. Depends-On: openstack-k8s-operators/lib-common#384
Adds watches for name secret and configmap resources from the OpenStackClient CRD. This allows to watch the specific resources when they change. Also adds EnvTest for OpenstackClient being created by the OpenstackControlPlane controller. Depends-On: openstack-k8s-operators/lib-common#384
5a5f5d3
to
bb6aad2
Compare
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for any changes and reconcile if needed. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2183
bb6aad2
to
62070e5
Compare
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-1233
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2183
Adds watches for name secret and configmap resources from the OpenStackClient CRD. This allows to watch the specific resources when they change. Also adds EnvTest for OpenstackClient being created by the OpenstackControlPlane controller. Depends-On: openstack-k8s-operators/lib-common#384
- creates internal CA when internal TLS enabled - creates TLS certs via cert-manager and passes the cert secret information to the services, right now keystone, glance, cinder and neutron For services which at this point don't support TLS, cert validation could be disabled using customService config like e.g.: ~~~ customServiceConfig: | [keystone_authtoken] insecure = true ~~~ For a service like nova which talks to multiple service internal endpoints, this has to be set for each of them for, like: ~~~ customServiceConfig: | [keystone_authtoken] insecure = true [placement] insecure = true [neutron] insecure = true [glance] insecure = true [cinder] insecure = true ~~~ Depends-On: openstack-k8s-operators/lib-common#384 Depends-On: openstack-k8s-operators/keystone-operator#348 Depends-On: openstack-k8s-operators/neutron-operator#263 Depends-On: openstack-k8s-operators/glance-operator#386 Depends-On: openstack-k8s-operators/cinder-operator#306 Jira: OSPRH-2183 Jira: OSPRH-1233 Jira: OSPRH-1592 Jira: OSPRH-2197
Creates TLS certs via cert-manager for placement. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2368
Creates TLS certs via cert-manager for NovaAPI, NovaMetadata and NovaNoVNCProxy. Depends-On: openstack-k8s-operators/lib-common#384 Jira: TODO
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. Depends-On: openstack-k8s-operators/lib-common#384 Signed-off-by: Veronika Fisarova <[email protected]>
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. Depends-On: openstack-k8s-operators/lib-common#384 Signed-off-by: Veronika Fisarova <[email protected]>
With changes TLS support is moved here ---> #428 |
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The CA cert get direct mounted as the environment bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . The service certificates like config files and copied via kolla to /etc/pki/tls/certs/%s.crt|/etc/pki/tls/private/%s.key . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2183 [wip] use kolla to get service certs in place
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for any changes and reconcile if needed. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2197
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in /etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron and NovaConductor, NovaScheduler and NovaCompute get the CA bundle added if configured. Also indexes the named input resources for CA bundle, and tls secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: TODO
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for any changes and reconcile if needed. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2197
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron, CinderScheduler and CinderVolume get the CA bundle added. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-1592
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-1233
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in /etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron and NovaConductor, NovaScheduler and NovaCompute get the CA bundle added if configured. Also indexes the named input resources for CA bundle, and tls secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: TODO
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The CA cert get direct mounted as the environment bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . The service certificates like config files and copied via kolla to /etc/pki/tls/certs/%s.crt|/etc/pki/tls/private/%s.key . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2183
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for any changes and reconcile if needed. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2197
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for any changes and reconcile if needed. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2197
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for any changes and reconcile if needed. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2197
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for any changes and reconcile if needed. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2197
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The CA cert get direct mounted as the environment bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . The service certificates like config files and copied via kolla to /etc/pki/tls/certs/%s.crt|/etc/pki/tls/private/%s.key . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-1592
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for password, CA bundle, and endpoint secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-1233
Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The CA cert get direct mounted as the environment bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . The service certificates like config files and copied via kolla to /etc/pki/tls/certs/%s.crt|/etc/pki/tls/private/%s.key . Job deployments for bootstrap/cron get the CA bundle added if configured. Also indexes the named input resources for CA bundle, and tls secrets to be able to watch them for a change and reconcile. Depends-On: openstack-k8s-operators/lib-common#384 Jira: TODO
Adds watches for name secret and configmap resources from the OpenStackClient CRD. This allows to watch the specific resources when they change. Also adds EnvTest for OpenstackClient being created by the OpenstackControlPlane controller. Depends-On: openstack-k8s-operators/lib-common#384
- creates internal CA when internal TLS enabled - creates TLS certs via cert-manager and passes the cert secret information to the services, right now keystone, glance, cinder and neutron For services which at this point don't support TLS, cert validation could be disabled using customService config like e.g.: ~~~ customServiceConfig: | [keystone_authtoken] insecure = true ~~~ For a service like nova which talks to multiple service internal endpoints, this has to be set for each of them for, like: ~~~ customServiceConfig: | [keystone_authtoken] insecure = true [placement] insecure = true [neutron] insecure = true [glance] insecure = true [cinder] insecure = true ~~~ Depends-On: openstack-k8s-operators/lib-common#384 Depends-On: openstack-k8s-operators/keystone-operator#348 Depends-On: openstack-k8s-operators/neutron-operator#263 Depends-On: openstack-k8s-operators/glance-operator#386 Depends-On: openstack-k8s-operators/cinder-operator#306 Jira: OSPRH-2183 Jira: OSPRH-1233 Jira: OSPRH-1592 Jira: OSPRH-2197
Creates TLS certs via cert-manager for placement. Depends-On: openstack-k8s-operators/lib-common#384 Jira: OSPRH-2368
Creates TLS certs via cert-manager for NovaAPI, NovaMetadata and NovaNoVNCProxy. Depends-On: openstack-k8s-operators/lib-common#384 Jira: TODO
Some services create multiple endpoints, therefore each endpoint needs to support TLS.