mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 03:29:03 +00:00
Add Docs around SSL under OpenMetadataConfig (#16774)
This commit is contained in:
parent
54ca82f64d
commit
c3d68727ea
@ -181,6 +181,31 @@ metadata = OpenMetadata(server_config)
|
||||
|
||||
For local development, we can get a JWT token for the ingestion bot as described [here](/deployment/security/enable-jwt-tokens#generate-token) and use that when we specify the `jwtToken`. For a real-world deployment, we can also use [different authentication methods](/deployment/security) and specify other settings of the connection (such as `sslConfig`).
|
||||
|
||||
Below is an example of how the user can configure `sslConfig` using `Python SDK`.
|
||||
|
||||
```python
|
||||
from metadata.generated.schema.security.ssl.validateSSLClientConfig import ValidateSslClientConfig
|
||||
from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import (
|
||||
AuthProvider,
|
||||
OpenMetadataConnection
|
||||
)
|
||||
from metadata.generated.schema.security.client.openMetadataJWTClientConfig import OpenMetadataJWTClientConfig
|
||||
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
||||
|
||||
|
||||
server_config = OpenMetadataConnection(
|
||||
hostPort="http://localhost:8585/api",
|
||||
authProvider=AuthProvider.openmetadata,
|
||||
securityConfig=OpenMetadataJWTClientConfig(
|
||||
jwtToken="<YOUR-INGESTION-BOT-JWT-TOKEN>",
|
||||
),
|
||||
verifySSL="validate" # ignore, validate or no-ssl,
|
||||
sslConfig=ValidateSslClientConfig(caCertificate="/path/to/rootCert",sslCertificate="/path/to/cert",sslKey="/path/to/key"),
|
||||
)
|
||||
|
||||
metadata = OpenMetadata(server_config)
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
The OpenMetadataConnection is defined as a JSON Schema as well. You can check the definition [here](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/metadata/openMetadataConnection.json)
|
||||
|
||||
@ -181,6 +181,32 @@ metadata = OpenMetadata(server_config)
|
||||
|
||||
For local development, we can get a JWT token for the ingestion bot as described [here](/deployment/security/enable-jwt-tokens#generate-token) and use that when we specify the `jwtToken`. For a real-world deployment, we can also use [different authentication methods](/deployment/security) and specify other settings of the connection (such as `sslConfig`).
|
||||
|
||||
Below is an example of how the user can configure `sslConfig` using `Python SDK`.
|
||||
|
||||
```python
|
||||
from metadata.generated.schema.security.ssl.validateSSLClientConfig import ValidateSslClientConfig
|
||||
from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import (
|
||||
AuthProvider,
|
||||
OpenMetadataConnection
|
||||
)
|
||||
from metadata.generated.schema.security.client.openMetadataJWTClientConfig import OpenMetadataJWTClientConfig
|
||||
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
||||
|
||||
|
||||
server_config = OpenMetadataConnection(
|
||||
hostPort="http://localhost:8585/api",
|
||||
authProvider=AuthProvider.openmetadata,
|
||||
securityConfig=OpenMetadataJWTClientConfig(
|
||||
jwtToken="<YOUR-INGESTION-BOT-JWT-TOKEN>",
|
||||
),
|
||||
verifySSL="validate" # ignore, validate or no-ssl,
|
||||
sslConfig=ValidateSslClientConfig(caCertificate="/path/to/rootCert",sslCertificate="/path/to/cert",sslKey="/path/to/key"),
|
||||
)
|
||||
|
||||
metadata = OpenMetadata(server_config)
|
||||
```
|
||||
|
||||
|
||||
{% note %}
|
||||
|
||||
The OpenMetadataConnection is defined as a JSON Schema as well. You can check the definition [here](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/metadata/openMetadataConnection.json)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user