# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software will be governed # by the Apache License, Version 2.0. $ set-arg-default default-storage-size=1 $ set-arg-default single-replica-cluster=quickstart # # Test enforcement that connections are made to global non-private IPs $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} ALTER SYSTEM SET enable_connection_validation_syntax = true ALTER SYSTEM SET storage_enforce_external_addresses = true # Setup kafka topic with schema # must be a subset of the keys in the rows $ set keyschema={ "type": "record", "name": "Key", "fields": [ {"name": "id", "type": "long"} ] } $ set schema={ "type" : "record", "name" : "envelope", "fields" : [ { "name": "before", "type": [ { "name": "row", "type": "record", "fields": [ { "name": "id", "type": "long" }, { "name": "creature", "type": "string" }] }, "null" ] }, { "name": "after", "type": ["row", "null"] } ] } $ kafka-create-topic topic=csr_test partitions=1 $ kafka-ingest format=avro topic=csr_test key-format=avro key-schema=${keyschema} schema=${schema} timestamp=1 {"id": 1} {"before": {"row": {"id": 1, "creature": "fish"}}, "after": {"row": {"id": 1, "creature": "mudskipper"}}} {"id": 1} {"before": {"row": {"id": 1, "creature": "mudskipper"}}, "after": {"row": {"id": 1, "creature": "salamander"}}} {"id": 1} {"before": {"row": {"id": 1, "creature": "salamander"}}, "after": {"row": {"id": 1, "creature": "lizard"}}} ! CREATE CONNECTION csr_conn TO CONFLUENT SCHEMA REGISTRY ( URL '${testdrive.schema-registry-url}' ) WITH (VALIDATE = true); contains:Address resolved to a private IP $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr} ALTER SYSTEM SET storage_enforce_external_addresses = false