Fix #14973: Qliksense - Add option to disable hostname validation (#15954)

This commit is contained in:
Mayur Singal 2024-04-22 18:49:59 +05:30 committed by GitHub
parent 27e9012a56
commit c04ec3e922
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 27 additions and 2 deletions

View File

@ -73,6 +73,7 @@ class QlikSenseClient:
"ca_certs": self.config.certificates.rootCertificate,
"certfile": self.config.certificates.clientCertificate,
"keyfile": self.config.certificates.clientKeyCertificate,
"check_hostname": self.config.validateHostName,
}
return context

View File

@ -124,11 +124,12 @@ class SSLManager:
return connection
@setup_ssl.register(QlikSenseConnection)
def _(self, _):
def _(self, connection):
return {
"ca_certs": self.ca_file_path,
"certfile": self.cert_file_path,
"keyfile": self.key_file_path,
"check_hostname": connection.validateHostName,
}
@setup_ssl.register(KafkaConnection)

View File

@ -82,6 +82,8 @@ You will have to replace new lines with `\n` and the final private key that you
**User ID**: This field specifies the user id of the user.
**Validate Host Name**: Enable/Disable this field to validate the host name against the provided certificates.
{% /extraContent %}
{% partial file="/v1.4/connectors/test-connection.md" /%}

View File

@ -130,6 +130,12 @@ You will have to replace new lines with `\n` and the final private key that you
{% /codeInfo %}
{% codeInfo srNumber=7 %}
**validateHostName**: Enable/Disable this field to validate the host name against the provided certificates.
{% /codeInfo %}
{% partial file="/v1.4/connectors/yaml/dashboard/source-config-def.md" /%}
{% partial file="/v1.4/connectors/yaml/ingestion-sink-def.md" /%}
@ -174,7 +180,9 @@ source:
```yaml {% srNumber=6 %}
userDirectory: user_dir
```
```yaml {% srNumber=6 %}
validateHostName: false
```
{% partial file="/v1.4/connectors/yaml/dashboard/source-config.md" /%}
{% partial file="/v1.4/connectors/yaml/ingestion-sink.md" /%}

View File

@ -86,6 +86,12 @@
}
]
},
"validateHostName": {
"title": "Validate Host Name",
"description": "Validate Host Name",
"type": "boolean",
"default": false
},
"userDirectory": {
"title": "User Directory",
"description": "User Directory.",

View File

@ -153,4 +153,11 @@ $$section
### User ID $(id="userId")
This field specifies the user id of the user.
$$
$$section
### Validate Host Name $(id="validateHostName")
Enable/Disable this field to validate the host name against the provided certificates.
$$