Skip to content

Commit

Permalink
add sensitive flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pnadolny13 committed Feb 20, 2024
1 parent 570273d commit 8c8561a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions hub_utils/meltano_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ def _parse_sdk_about_settings(sdk_about_dict, enforce_desc=False):
if settings.get("default") is not None:
if kind != "date_iso8601":
setting_details["value"] = settings.get("default")
if kind == "password":
setting_details["sensitive"] = "true"
reformatted_settings.append(setting_details)
if settings.get("required"):
settings_group_validation.append(settings.get("name"))
Expand Down
20 changes: 14 additions & 6 deletions tests/test_meltano_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ def test_sdk_about_parsing_1():
"name": "client_id",
"label": "Client ID",
"description": "",
"kind": "password"
"kind": "password",
"sensitive": "true",
},
{
"name": "client_secret",
"label": "Client Secret",
"description": "",
"kind": "password"
"kind": "password",
"sensitive": "true",
},
{
"name": "start_date",
Expand Down Expand Up @@ -63,7 +65,8 @@ def test_sdk_about_parsing_2():
"name": "federation.auth.password",
"label": "Federation Auth Password",
"description": "The HTTP basic auth password to authenticate against the meshObject API for federation",
"kind": "password"
"kind": "password",
"sensitive": "true",
},
{
"name": "federation.api_url",
Expand Down Expand Up @@ -191,32 +194,37 @@ def test_sdk_about_parsing_airbyte():
"name": "connector_config.provider.bucket",
"label": "Connector Config Provider Bucket",
"description": "Name of the S3 bucket where the file(s) exist.",
"kind": "password"
"kind": "password",
"sensitive": "true",
},
{
"name": "connector_config.provider.aws_access_key_id",
"label": "Connector Config Provider AWS Access Key ID",
"description": "In order to access private Buckets stored on AWS S3, this connector requires credentials with the proper permissions. If accessing publicly available data, this field is not necessary.",
"kind": "password"
"kind": "password",
"sensitive": "true",
},
{
"name": "connector_config.provider.aws_secret_access_key",
"label": "Connector Config Provider AWS Secret Access Key",
"description": "In order to access private Buckets stored on AWS S3, this connector requires credentials with the proper permissions. If accessing publicly available data, this field is not necessary.",
"kind": "password"
"kind": "password",
"sensitive": "true",
},
{
"name": "connector_config.provider.path_prefix",
"label": "Connector Config Provider Path Prefix",
"description": "By providing a path-like prefix (e.g. myFolder/thisTable/) under which all the relevant files sit, we can optimize finding these in S3. This is optional but recommended if your bucket contains many folders/files which you don't need to replicate.",
"kind": "password",
"sensitive": "true",
"value": ""
},
{
"name": "connector_config.provider.endpoint",
"label": "Connector Config Provider Endpoint",
"description": "Endpoint to an S3 compatible service. Leave empty to use AWS.",
"kind": "password",
"sensitive": "true",
"value": ""
},
{
Expand Down

0 comments on commit 8c8561a

Please sign in to comment.