mirror of
https://github.com/apache/superset.git
synced 2026-05-09 09:55:19 +00:00
fix(Trino): create PrestoBaseEngineSpec base class to share common code between Trino and Presto (#21066)
* chore: create `PrestoBaseEngineSpec` class that share common functions between Presto and Trino Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * feat(Trino): support CertificateAuthentication * chore(Presto): move `get_function_names` to `PrestoBaseEngineSpec` Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * chores(Presto): remove `is_readonly_query` * feat(Trino): implement `extra_table_metadata` * feat(Trino): specify `User-Agent` Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * fix: pylint Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * chores(Presto): move `PrestoBaseEngineSpec` to `presto.py` Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * fix(Presto): typing annotations Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
This commit is contained in:
@@ -56,7 +56,21 @@ In `Secure Extra` field, config as following example:
|
||||
|
||||
All fields in `auth_params` are passed directly to the [`KerberosAuthentication`](https://github.com/trinodb/trino-python-client/blob/0.306.0/trino/auth.py#L40) class.
|
||||
|
||||
#### 3. JWT Authentication
|
||||
#### 3. Certificate Authentication
|
||||
In `Secure Extra` field, config as following example:
|
||||
```json
|
||||
{
|
||||
"auth_method": "certificate",
|
||||
"auth_params": {
|
||||
"cert": "/path/to/cert.pem",
|
||||
"key": "/path/to/key.pem"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
All fields in `auth_params` are passed directly to the [`CertificateAuthentication`](https://github.com/trinodb/trino-python-client/blob/0.315.0/trino/auth.py#L416) class.
|
||||
|
||||
#### 4. JWT Authentication
|
||||
Config `auth_method` and provide token in `Secure Extra` field
|
||||
```json
|
||||
{
|
||||
@@ -67,7 +81,7 @@ Config `auth_method` and provide token in `Secure Extra` field
|
||||
}
|
||||
```
|
||||
|
||||
#### 4. Custom Authentication
|
||||
#### 5. Custom Authentication
|
||||
To use custom authentication, first you need to add it into
|
||||
`ALLOWED_EXTRA_AUTHENTICATIONS` allow list in Superset config file:
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user