Skip to content

Commit 07a2f0d

Browse files
authored
Changing cert thumbprint from Sha1 to Sha256 in Az Kusto driver (#775)
Updating DataProviders docs to remove outdated content
1 parent 1ccfe16 commit 07a2f0d

File tree

3 files changed

+14
-57
lines changed

3 files changed

+14
-57
lines changed

docs/source/DataAcquisition.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Common Data Provider Operations
1010
data_acquisition/DataProviders
1111

1212

13+
.. individual-data-environments
14+
1315
Individual Data Environments
1416
----------------------------
1517

docs/source/data_acquisition/DataProviders.rst

Lines changed: 11 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -62,41 +62,19 @@ as loading any built-in queries available for that environment.
6262

6363
.. code:: ipython3
6464
65-
qry_prov = QueryProvider(
66-
data_environment=DATA_ENVIRONMENT,
67-
)
68-
69-
There are two other optional parameters we can pass when initializing
70-
our Query Providers to further customize it:
71-
72-
1. You can also chose to
73-
initialize our Query Provider with a driver other than the default one
74-
for the chosen environment with:
75-
76-
.. code:: ipython3
77-
78-
qry_prov = QueryProvider(
79-
data_environment=DATA_ENVIRONMENT,
80-
driver=DRIVER_CLASS_NAME,
81-
)
82-
83-
TThe class must be imported before it can be used in this way. You
84-
would only use this parameter if you were building your own
85-
data driver backend, which is not common.
86-
87-
2. You can choose to import additional queries from a custom
88-
query directory (see :doc:`../extending/Queries` for more
89-
details) with:
65+
qry_prov = QueryProvider("MSSentinel")
66+
qry_prov2 = QueryProvider(data_environment="Splunk")
9067
91-
.. code:: ipython3
68+
.. note:: The use of the parameter name `data_environment` is optional
69+
as long as the data environment is the first parameter passed.
9270

93-
qry_prov = QueryProvider(
94-
data_environment=DATA_ENVIRONMENT,
95-
query_paths=QUERY_DIRECTORY_PATH
96-
)
71+
There are other optional parameters we can pass when initializing
72+
our Query Providers to further customize them. If these are relevant to the
73+
provider, they are detailed in the provider-specific documentation.
74+
:ref:`DataAcquisition:Individual Data Environments`.
9775

9876

99-
For more details see :py:class:`QueryProvider API <msticpy.data.data_providers.QueryProvider>`.
77+
For details of this class see :py:class:`QueryProvider API <msticpy.data.data_providers.QueryProvider>`.
10078

10179

10280
Connecting to a Data Environment
@@ -108,32 +86,9 @@ Environment. This is done by calling the connect() function of the Query
10886
Provider we just initialized and passing it a connection string
10987
or authentication parameters to use.
11088

111-
Documentation string
112-
113-
::
114-
115-
connect(self, connection_str: str, **kwargs):
116-
117-
Connect to data source.
118-
119-
Parameters
120-
----------
121-
connection_string : str
122-
Connection string for the data source
123-
124-
125-
Example
126-
127-
.. code:: ipython3
128-
129-
la_connection_string = f'loganalytics://code().tenant("{ten_id}").workspace("{ws_id}")'
130-
qry_prov.connect(connection_str=la_connection_string)
131-
89+
For usage with a specific data provider please see the documentation
90+
for each provider :ref:`DataAcquisition:Individual Data Environments`.
13291

133-
The format of the parameters supplied to the ``connect`` function varies
134-
by the environment/driver you are trying to use. Please check
135-
the details for the environment you are using in the
136-
:ref:`DataAcquisition:Individual Data Environments` section.
13792

13893
List of current built-in queries
13994
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

msticpy/data/drivers/azure_kusto_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ def _create_kql_cert_connection_str(
615615
encryption_algorithm=serialization.NoEncryption(),
616616
)
617617
public_cert = certificate.public_bytes(encoding=serialization.Encoding.PEM)
618-
thumbprint = certificate.fingerprint(hashes.SHA1())
618+
thumbprint = certificate.fingerprint(hashes.SHA256())
619619
return KustoConnectionStringBuilder.with_aad_application_certificate_sni_authentication(
620620
connection_string=self.cluster_uri,
621621
aad_app_id=auth_params.params["client_id"],

0 commit comments

Comments
 (0)