Repository: risingwavelabs/risingwave
File: src/connector/src/sink/iceberg/mod.rs (Rust)

Code before:
            ("database.name", "my_dataset"),
            ("table.name", "my_table"),
        ]
        .into_iter()
        .map(|(k, v)| (k.to_owned(), v.to_owned()))
        .collect();

        let iceberg_config = IcebergConfig::from_btreemap(values).unwrap();

        // Verify catalog type
        assert_eq!(iceberg_config.catalog_type(), "rest");

        // Verify Google-specific options
        assert_eq!(
            iceberg_config.common.catalog_security.as_deref(),
            Some("google")
        );
        assert_eq!(
            iceberg_config.common.gcp_auth_scopes.as_deref(),
            Some(
                "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/bigquery"
            )
        );

        // Verify warehouse path with bq:// prefix
        assert_eq!(
            iceberg_config.common.warehouse_path.as_deref(),
            Some("bq://projects/my-gcp-project")
        );
    }

    /// Test parsing BigLake/Google Cloud REST catalog configuration.
    #[test]
    fn test_parse_biglake_google_auth_config() {
        let values: BTreeMap<String, String> = [
            ("connector", "iceberg"),
            ("type", "append-only"),
            ("force_append_only", "true"),
            ("catalog.name", "biglake-catalog"),
            ("catalog.type", "rest"),
            (
                "catalog.uri",
                "https://biglake.googleapis.com/iceberg/v1/restcatalog",
            ),
            ("warehouse.path", "bq://projects/my-gcp-project"),
            (
                "catalog.header",
                "x-goog-user-project=my-gcp-project",
            ),
            ("catalog.security", "google"),
            ("gcp.credentials.path", "/path/to/service-account.json"),

Review comment (security):
The test case does not verify that the Java catalog configuration is correctly generated. While the test verifies that the configuration properties are parsed correctly, it should also verify that `build_jni_catalog_configs` produces the expected Java catalog properties, specifically that `rest.auth.type` is set to `org.apache.iceberg.gcp.auth.GoogleAuthManager`, `gcp.auth.scopes` is properly passed through, and the warehouse path is correctly handled for BigLake paths. Consider adding assertions to verify the generated Java catalog configuration.

Code after:
        .map(|(k, v)| (k.to_owned(), v.to_owned()))
        .collect();

        let iceberg_config = IcebergConfig::from_btreemap(values).unwrap();

        // Verify catalog type
        assert_eq!(iceberg_config.catalog_type(), "rest");

        // Verify Google-specific options
        assert_eq!(
            iceberg_config.common.catalog_security.as_deref(),
            Some("google")
        );
        assert_eq!(
            iceberg_config.common.gcp_auth_scopes.as_deref(),
            Some(
                "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/bigquery"
            )
        );

        // Verify warehouse path with bq:// prefix
        assert_eq!(
            iceberg_config.common.warehouse_path.as_deref(),
            Some("bq://projects/my-gcp-project")
        );
    }

    /// Test parsing BigLake/Google Cloud REST catalog configuration.
    #[test]
    fn test_parse_biglake_google_auth_config() {
        let values: BTreeMap<String, String> = [
            ("connector", "iceberg"),
            ("type", "append-only"),
            ("force_append_only", "true"),
            ("catalog.name", "biglake-catalog"),
            ("catalog.type", "rest"),
            (
                "catalog.uri",
                "https://biglake.googleapis.com/iceberg/v1/restcatalog",
            ),
            ("warehouse.path", "bq://projects/my-gcp-project"),
            (
                "catalog.header",
                "x-goog-user-project=my-gcp-project",
            ),
            ("catalog.security", "google"),
            ("gcp.auth.scopes", "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/bigquery"),
            ("database.name", "my_dataset"),
            ("table.name", "my_table"),
        ]
        .into_iter()