File tree Expand file tree Collapse file tree
sql/src/plan/statement/ddl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -729,7 +729,18 @@ impl ConnectionOptionExtracted {
729729 credential,
730730 scope : self . scope . clone ( ) ,
731731 } ,
732- ( None , Some ( gcp_connection) ) => IcebergCatalogAuth :: Gcp ( gcp_connection) ,
732+ ( None , Some ( gcp_connection) ) => {
733+ /// All BigLake Iceberg REST Catalogs use the same catalog URI.
734+ const BIGLAKE_CATALOG_URI : & str =
735+ "https://biglake.googleapis.com/iceberg/v1/restcatalog" ;
736+ if uri. to_string ( ) != BIGLAKE_CATALOG_URI {
737+ sql_bail ! (
738+ "GCP connection can only be used with '{}'" ,
739+ BIGLAKE_CATALOG_URI
740+ ) ;
741+ }
742+ IcebergCatalogAuth :: Gcp ( gcp_connection)
743+ }
733744 ( None , None ) => sql_bail ! (
734745 "invalid CONNECTION: ICEBERG rest connections require a CREDENTIAL or GCP CONNECTION"
735746 ) ,
Original file line number Diff line number Diff line change @@ -915,6 +915,7 @@ impl IcebergCatalogConnection<InlinedConnection> {
915915 GCS_CREDENTIALS_JSON . to_owned ( ) ,
916916 base64:: engine:: general_purpose:: STANDARD . encode ( creds_json) ,
917917 ) ;
918+ // We supplied a service account key. Don't look elsewhere for GCP credentials.
918919 props. insert ( GCS_DISABLE_VM_METADATA . to_owned ( ) , "true" . to_owned ( ) ) ;
919920 props. insert ( GCS_DISABLE_CONFIG_LOAD . to_owned ( ) , "true" . to_owned ( ) ) ;
920921 if let Some ( project_id) = service_account. project_id ( ) {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ ALTER SYSTEM SET enable_default_connection_validation = false
2929 GCP CONNECTION = gcpconn,
3030 WAREHOUSE = 'gs://anything'
3131 )
32- contains:must point URL at a * .googleapis.com host
32+ contains:GCP connection can only be used with 'https://biglake .googleapis.com/iceberg/v1/restcatalog'
3333
3434# Positive control: a real BigLake host is accepted, so the allowlist doesn't
3535# break the feature.
You can’t perform that action at this time.
0 commit comments