snowflakedb / snowflake-kafka-connector

Snowflake Kafka Connector (Sink Connector)
Apache License 2.0
140 stars 98 forks source link

Update ConnectorConfigDefinition.java #1008

Open sudeshwasnik opened 11 hours ago

sudeshwasnik commented 11 hours ago

Overview

Configurations that may contain sensitive information (password, token) should be defined as PASSWORD type, there are two reasons :

  1. Raw value of these configurations must be visible to users on UI/ API responses and should be masked. Values of PASSWORD type configurations are masked in responses.
  2. Connector configurations (and values) are logged at INFO level at various places (raw values for non-secret configurations) in Kafka Connect while it creates tasks/ connector.

This change is backward-compatible, since configuration values are never fetched fromSnowflakeSinkConnectorConfig object in connector (yet). Raw values passed to start() (parsedConfig) are directly used.

Pre-review checklist

sudeshwasnik commented 11 hours ago

@sfc-gh-mbobowski Could you please take a look at this small change / PR? We want to make sure that raw-values of sensitive configurations do not get logged anywhere.