-
Bug
-
Resolution: Done
-
Blocker
-
Logging 5.7.0
-
Log Collection - Sprint 234, Log Collection - Sprint 235
Description of problem:
When using LokiStack as the default log store, Vector collector should use the tlsSecurityProfile config set globally in apiserver/cluster configuration for Loki sink. The TLS profile config when using the default LokiStack as the log store shouldn't require enabling the feature gate since we are setting the profile on the log store server side without any feature gate.
Version-Release number of selected component (if applicable):
cluster-logging.v5.7.0
loki-operator.v5.7.0
How reproducible:
Always
Steps to Reproduce:
*Set any TLS profile in the global apiserver/cluster configuration. By default if no profile is set, intermediate profile must be used by Cluster Logging.
*Create a LokiStack instance.
*Create a ClusterLogging instance with Vector as collector and using the LokiStack instance as the default log store.
apiVersion: "logging.openshift.io/v1" kind: "ClusterLogging" metadata: name: "instance" namespace: openshift-logging spec: managementState: "Managed" logStore: type: "lokistack" lokistack: name: lokistack-instance collection: type: "vector"
*Extract and check the vector config, the cipher and min TLS version is set according to the TLS profile for the prometheus sink only.
[sinks.default_loki_infra] type = "loki" inputs = ["default_loki_infra_dedot"] endpoint = "https://lokistack-instance-gateway-http.openshift-logging.svc:8080/api/logs/v1/infrastructure" out_of_order_action = "accept" healthcheck.enabled = false [sinks.default_loki_infra.encoding] codec = "json" [sinks.default_loki_infra.labels] kubernetes_container_name = "{{kubernetes.container_name}}" kubernetes_host = "${VECTOR_SELF_NODE_NAME}" kubernetes_namespace_name = "{{kubernetes.namespace_name}}" kubernetes_pod_name = "{{kubernetes.pod_name}}" log_type = "{{log_type}}" [sinks.default_loki_infra.tls] enabled = true ca_file = "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt" # Bearer Auth Config [sinks.default_loki_infra.auth] strategy = "bearer" token = "eyJhbGciOiJSUzI1NiIsImtpZCI6ImRoVUplXzg2ZHktc1dYUzQ4Qk1neGtrZEZBN294T0tTeUp2Nl9tbG55blkifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3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-PaoatkY3OK-Uh23ynOLl4jbc" [transforms.add_nodename_to_metric] type = "remap" inputs = ["internal_metrics"] source = ''' .tags.hostname = get_env_var!("VECTOR_SELF_NODE_NAME") ''' [sinks.prometheus_output] type = "prometheus_exporter" inputs = ["add_nodename_to_metric"] address = "[::]:24231" default_namespace = "collector" [sinks.prometheus_output.tls] enabled = true key_file = "/etc/collector/metrics/tls.key" crt_file = "/etc/collector/metrics/tls.crt" min_tls_version = "VersionTLS12" ciphersuites = "TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-CHACHA20-POLY1305,ECDHE-RSA-CHACHA20-POLY1305,DHE-RSA-AES128-GCM-SHA256,DHE-RSA-AES256-GCM-SHA384
Additional info:
When using LokiStack as the log storage, we are complying with the global TLS profile which dosn't require any feature gate. https://issues.redhat.com/browse/LOG-895
- is cloned by
-
LOG-4012 [fluentd] [LokiStack] Collector should comply with the tlsSecurityProfile config set globally when using LokiStack as the default log store.
- Closed
- links to
- mentioned on