Credential store
Ten moduł obsługuje zapisywanie połączeń do baz danych, które później mogą być używane w innych modułach bez konieczności wpisywanie danych dostępowych od nowa
Wspierane bazy danych
Bazy relacyjne
Oracle
19c
jdbc:oracle:thin:@localhost:1521/XEPDB1
PostgreSQL
11+
jdbc:postgresql://localhost:5432/postgres
db2 for LUW
11.5.8.0
jdbc:db2://localhost:50000/testdb
MySQL
8.4.0 for Linux
jdbc:mysql://localhost:3306/sys
Vitess
-
-
-
Obsługuje JDBC driver for MySQL
SQL Server
16.0.1115.1
jdbc:sqlserver://localhost;databaseName=master;encrypt=true;trustServerCertificate=true;
encrypt, trustServerCertificate - do zaakceptwania certyfikatu szyfrowanego serwera
Bazy noSQL
MongoDB
-
-
The driver can only connect to Atlas and not to a mongod instance. Any special characters in the connection string for the JDBC driver must be URL encoded.
Cassandra
4.1.5
jdbc:cassandra://localhost:7000/store
Wersja dockerowa nie jest skonfigurowana pod obsługę autoryzacji hasłem
Chmura
Snowflake
jdbc:snowflake://myorganization-myaccount.snowflakecomputing.com/?user=peter&warehouse=mywh&db=mydb&schema=public
user, warehouse, db, schema, private key
hdfs
jdbc:hdfs:Host=sandbox-hdp.hortonworks.com;Port=50070;Path=/user/root;User=root;
path, port (jako parametr), Path, User
AWS MySQL
jdbc:mysql:aws://db-identifier.cluster-ro-XYZ.us-east-2.rds.amazonaws.com:3306
clusterInstanceHostPattern (wymagany tylko w niektórych przypadkach)
Endpointy
GET
credential_store_v2/all?credentialType=X
Pobierz wszystkie połączenia. Można filtrować po credentialType
GET
credential_store_v2/basic?credentialType=X
Pobierz wszystkie połączenia - zwraca tylko nazwę, typ i url. Można filtrować po credentialType
GET
credential_store_v2/available_types
Pobierz dostępne credentialType
GET
credential_store_v2/supported_databases
Pobierz wspierane typy baz danych
GET
credential_store_v2/generate/{DB TYPE}
Pobierz properties dla podanej bazy danych
GET
credential_store_v2/details/{credentialNames}
Pobierz informacje o jednym połączeniu
POST
credential_store_v2
Dodaj nowy crendetial
PUT
credential_store_v2
Zaktualizuj credential
DELETE
credential_store_v2/{credentialNames}
Usuń credential
POST
credential_store_v2/{credentialNames}/test
Sprawdź połączenie do bazy dla zapisanego credential
POST
credential_store_v2/test
Sprawdź połączenie do bazy dla nowego credential
Generowanie properties - przykład response dla GET credential_store_v2/generate/POSTGRES
{
"username": {
"name": "username",
"displayName": "username",
"fieldType": "INSERT_FIELD",
"order": 0,
"required": true,
"defaultValue": null,
"placeholder": null,
"width": 6,
"options": null,
"description": null,
"urlProperty": false
},
"password": {
"name": "password",
"displayName": "password",
"fieldType": "PASSWORD_FIELD",
"order": 1,
"required": true,
"defaultValue": null,
"placeholder": null,
"width": 6,
"options": null,
"description": null,
"urlProperty": false
},
"hostname": {
"name": "hostname",
"displayName": "hostname",
"fieldType": "INSERT_FIELD",
"order": 2,
"required": false,
"defaultValue": null,
"placeholder": null,
"width": 8,
"options": null,
"description": null,
"urlProperty": false
},
"port": {
"name": "port",
"displayName": "port",
"fieldType": "NUMBER_FIELD",
"order": 3,
"required": false,
"defaultValue": "5432",
"placeholder": "5432",
"width": 4,
"options": null,
"description": null,
"urlProperty": false
},
"database": {
"name": "database",
"displayName": "database",
"fieldType": "INSERT_FIELD",
"order": 4,
"required": false,
"defaultValue": null,
"placeholder": null,
"width": 12,
"options": null,
"description": null,
"urlProperty": false
},
"url": {
"name": "url",
"displayName": "url",
"fieldType": "INSERT_FIELD",
"order": -1,
"required": false,
"defaultValue": null,
"placeholder": null,
"width": 12,
"options": null,
"description": null,
"urlProperty": false
}
}
Tworzenie credential - przykład body dla POST credential_store_v2
{
"credentialName": "oracle_credential",
"databaseType": "ORACLE",
"credentialType": "REPLICATION",
"properties": {
"password": "password",
"hostname": "localhost"
"database": "PDB"
"port": "1522"
"username": "username",
}
}
Aktualizacja credential - przykład body dla PUT credential_store_v2
{
"credentialName": "oracle_credential",
"databaseType": "ORACLE",
"credentialType": "REPLICATION",
"properties": {
"password": "password",
"hostname": "localhost"
"database": "PDB"
"port": "1522"
"username": "username",
}
}
Testowanie połączenia - przykład response dla POST credential_store_v2/test albo credential_store_v2/{name}/test
{
"status": true,
"message": "Connection established!"
}
{
"status": false,
"message": "Connection not established! Connection to localhost:5433 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."
}
Last updated