withnale opened a new issue, #31438: URL: https://github.com/apache/superset/issues/31438
### Bug description At present it is possible to create a bigquery datasource which uses an explicit key by creating an `import_datasources.yaml` file that contains something similar to the block below: ``` databases: - database_name: mydatabase sqlalchemy_uri: bigquery://gcp-project-id/ cache_timeout: 0 expose_in_sqllab: true allow_run_async: false allow_ctas: false allow_cvas: false allow_dml: false allow_file_upload: false encrypted_extra: | {"credentials_info": { "type": "service_account", "project_id": "gcp-project-id", "private_key_id": "aca359ef9828567aa1f031f367ba547fe26bf54c", "private_key": "-----BEGIN PRIVATE KEY-----VERY_BIG_PRIVATE_KEY_STRING\n-----END PRIVATE KEY-----\n", "client_email": "service-acco...@gcp-project-id.iam.gserviceaccount.com", "client_id": "1149993100000000000", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/service-account%40gcp-project-id.iam.gserviceaccount.com", "universe_domain": "googleapis.com"} } extra: | { "allows_virtual_table_explore": true } uuid: 00000000-0000-0000-0000-123456789001 ``` This can be imported using `superset import_datasources -p filename.yaml` from a running instance. However, if I wish to import the same data structure using the REST API `/api/v1/database/import` it will fail. It seems that the REST version applies additional schema checks on the bundled zipfile and fails because `encrypted_extra` is not part of `ImportV1DatabaseSchema` ### Screenshots/recordings _No response_ ### Superset version master / latest-dev ### Python version 3.11 ### Node version 16 ### Browser Chrome ### Additional context _No response_ ### Checklist - [X] I have searched Superset docs and Slack and didn't find a solution to my problem. - [X] I have searched the GitHub issue tracker and didn't find a similar bug report. - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org