diff --git a/CHANGELOG.md b/CHANGELOG.md index d424a37b5d1f674717db847ca82a135c4bf8eb6c..e1b268e612c30bc6e4deaeb4b8b3769b5ca8660f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,20 +8,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### -### Changed ### - +* `BUILD_MODULE_LEGACY_MAP={DISABLED,ENABLED}`, which is enabled by default. + This options prepares the web for the upcomming new map implementation (see + below). * The new map from the [CaosDB WebUI Legacy - Adapter](https://gitlab.com/caosdb/caosdb-webui-legacy-adapter) is now the - default. Change to the old map by setting `BUILD_MODULE_LEGACY_MAP=ENABLED` - (see below). The new map should work as a drop-in for the legacy map with the exact - functionality of the old map. However, the new map also implements a new - behavior for the query button: The query will be executed immediately, see - [caosdb-webui#205](https://gitlab.com/caosdb/caosdb-webui/-/issues/205). + Adapter](https://gitlab.com/caosdb/caosdb-webui-legacy-adapter) has been + added. It is disabled by default because it depends not only on the server's + GRPC API but also on a proxy translating WebGRPC/HTTP1.1 (browser) requests + to GRPC/HTTP2 (server) and vice versa. + The new map should work as a drop-in for the legacy map with the exact + functionality of the old map and the same config files. However, the new map + also implements a new behavior for the query button: The query will be + executed immediately, see + [caosdb-webui#205](https://gitlab.com/caosdb/caosdb-webui/-/issues/205). + You can enable the new map by disabling the old one AND placing a valid + configuration at `conf/ext/json/ext_map.json`. A suitable proxy is envoy and + a suitable envoy.yaml can be found in `misc/envoy.yaml`. Please have a look + at that file for more information. -### Deprecated ### -* `caosdb_map` module. Enable/disable via build property - `BUILD_MODULE_LEGACY_MAP={ENABLED,DISABLED}`. To be removed 2024-06. +### Changed ### + +### Deprecated ### ### Removed ### diff --git a/build.properties.d/00_default.properties b/build.properties.d/00_default.properties index b912e6c5e0aba594c5520b69525bd541d91e9f58..ed6d07d40be3b0b52f37a733b5856ca066a38e81 100644 --- a/build.properties.d/00_default.properties +++ b/build.properties.d/00_default.properties @@ -56,7 +56,7 @@ BUILD_MODULE_EXT_COSMETICS_CUSTOMDATETIME=DISABLED BUILD_MODULE_EXT_QRCODE=ENABLED BUILD_MODULE_SHOW_ID_IN_LABEL=DISABLED BUILD_MODULE_LEGACY_QUERY_FORM=DISABLED -BUILD_MODULE_LEGACY_MAP=DISABLED +BUILD_MODULE_LEGACY_MAP=ENABLED BUILD_MODULE_USER_MANAGEMENT=ENABLED BUILD_MODULE_USER_MANAGEMENT_CHANGE_OWN_PASSWORD_REALM=CaosDB diff --git a/misc/envoy.yaml b/misc/envoy.yaml new file mode 100644 index 0000000000000000000000000000000000000000..13680ee1d87a6ab1e0125d73735c320d790f3ecb --- /dev/null +++ b/misc/envoy.yaml @@ -0,0 +1,96 @@ +# Sample envoy config suitable for the new map implementation which depends on +# WebGRPC. +# +# Start with: +# +# docker run -p 8081:8081 -p 9901:9901 -e ENVOY_UID=$(id -u) -v $(pwd)/envoy.yaml:/etc/envoy/envoy.yaml --network host envoyproxy/envoy:v1.20.0` +# +# Browse to: +# +# http://localhost:8081/ +# +# We assume that the server's REST API is served locally on port 10443 (TLS) +# and the server's GRPC API is served locally on port 8080 (no TLS). +# +# Envoy will expose both the REST API and the (translated) WebGRPC API under +# port 8081 (no TLS). The /api/ path is routed to the GRPC API while all other +# paths are routed to the REST API. +# +# WARNING: This is for testing and development purposes! +static_resources: + listeners: + - name: listener_0 + address: + socket_address: { address: 0.0.0.0, port_value: 8081 } + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + codec_type: auto + stat_prefix: ingress_http + upgrade_configs: + - upgrade_type: websocket + route_config: + name: local_route + virtual_hosts: + - name: local_service + domains: ["*"] + routes: + - match: { prefix: "/api/" } + route: + prefix_rewrite: "/" + cluster: caosdb_grpc_api + max_stream_duration: + grpc_timeout_header_max: 0s + - match: { prefix: "/" } + route: + cluster: caosdb_http + cors: + allow_origin_string_match: + - prefix: "*" + allow_methods: GET, PUT, DELETE, POST, OPTIONS + allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout + max_age: "1728000" + expose_headers: custom-header-1,grpc-status,grpc-message + http_filters: + - name: envoy.filters.http.grpc_web + - name: envoy.filters.http.cors + - name: envoy.filters.http.router + clusters: + + # this is the caosdb server's GRPC endpoint + - name: caosdb_grpc_api + connect_timeout: 0.25s + type: logical_dns + http2_protocol_options: {} + lb_policy: round_robin + load_assignment: + cluster_name: caosdb_grpc_api_cluster_0 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8080 + + # this is the caosdb server's XML/HTTP endpoint + - name: caosdb_http + connect_timeout: 0.25s + type: logical_dns + lb_policy: round_robin + transport_socket: + name: envoy.transport_sockets.tls + typed_config: + "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext + + load_assignment: + cluster_name: caosdb_http_cluster_0 + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 10443