Confusion about required changes described in 0.57 upgrade guide #25843
QuestionHello, We use vector in a couple of ways in an ingestion data flow, our configuration files use both env variable interpolation and templates to dynamically send data into a sink. For environment variable interpolation it seems that I would need to set But what would be the alternative? Using secrets? It is not clear from the upgrade guide. Having to set a variable named Regarding the template confinement for sinks, it is correct to assume that it will only affect templates that does not have a fixed For example, on our The field I'm sharing an example of our config as well: Vector Config# vector
# ingestion layer
#
log_schema:
timestamp_key: "vector.ingestion_timestamp"
message_key: "vector.ingestion_message"
sources:
logs:
type: http_server
address: 0.0.0.0:5045
encoding: json
method: POST
auth:
username: "${VECTOR_HTTP_USER}"
password: "${VECTOR_HTTP_PASS}"
path: /logs
path_key: vector_request_path
response_code: 200
strict_path: false
status:
type: http_server
address: 0.0.0.0:5040
encoding: json
method: GET
path: /status
path_key: vector_request_path
response_code: 200
strict_path: true
# transform
transforms:
topic:
inputs: [ "logs" ]
type: remap
drop_on_error: true
source: |
. |= parse_groks!(
.vector_request_path,
patterns: [
"^/logs/%{DATA:log_topic}"
]
)
del(.source_type)
del(.vector_request_path)
event:
inputs: ["*"]
type: filter
condition:
type: "vrl"
source: ".log_topic != null"
# sinks
sinks:
kafka:
type: kafka
inputs: ["event"]
bootstrap_servers: "${VECTOR_KAFKA_BROKERS}"
topic: "logs-{{log_topic}}"
encoding:
codec: json
librdkafka_options:
message.max.bytes: "10000000"
Vector LogsNo response |
Replies: 2 comments 4 replies
|
Just saw that the question related to template confinement is answered by the description of this PR. |
|
Hi @leandrojmp, thank you for taking the time to create a discussion. Don't hesitate to ask more questions if the following response isn't clear. 1. Environment variable interpolationThe flag name is intentionally alarming. Its purpose is to prompt operators to consciously decide whether env var interpolation is safe in their environment, not to imply you must avoid it entirely. For example, in a locked-down deployment opting in is valid but in shared or not fully controlled environments you probably want to disable it. You can also maintain you current configs and add a pre-processing step, e.g. using envsubst. This is not mentioned in the upgrade guide but it is mentioned here: https://vector.dev/docs/reference/environment_variables/#security-restrictions 2. Template confinement
No changes needed. Your template already has a literal prefix ( Does this fully answer your questions? |
Hi @leandrojmp, thank you for taking the time to create a discussion. Don't hesitate to ask more questions if the following response isn't clear.
1. Environment variable interpolation
The flag name is intentionally alarming. Its purpose is to prompt operators to consciously decide whether env var interpolation is safe in their environment, not to imply you must avoid it entirely. For example, in a locked-down deployment opting in is valid but in shared or not fully controlled environments you probably want to disable it.
You can also maintain you current configs and add a pre-processing step, e.g. using envsubst. This is not mentioned in the upgrade guide but it is mentioned here: https:/…