Gabriel39 commented on code in PR #71205: URL: https://github.com/apache/doris/pull/71205#discussion_r4779103364
########## fe/fe-filesystem/fe-filesystem-api/src/main/java/org/apache/doris/filesystem/properties/StorageEndpointProperties.java: ########## @@ -0,0 +1,129 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.doris.filesystem.properties; + +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.function.Predicate; + +/** Network endpoint aliases consumed by filesystem providers and their authentication clients. */ +public final class StorageEndpointProperties { + private static final List<String> PAIMON_STORAGE_PREFIXES = List.of( + "paimon.s3.", "paimon.s3a.", "paimon.fs.s3.", "paimon.fs.oss."); + + private StorageEndpointProperties() { + } + + /** + * Shared aliases can reach different SDKs; require an explicit scheme or port instead of guessing it. + * @throws IllegalArgumentException if a proxy route cannot be established from independent endpoint values + */ + public static Map<String, Integer> endpoints(Map<String, String> properties, Predicate<String> opaqueCredential) { + Map<String, Integer> endpoints = new LinkedHashMap<>(); + // OSS-HDFS prefers its specific alias over oss.endpoint before emitting fs.oss.endpoint. + for (String key : new String[] {"s3.endpoint", "AWS_ENDPOINT", "endpoint", "ENDPOINT", "aws.endpoint", Review Comment: Fixed in 03940257960. Shared storage admission now projects the S3 service destination from the first nonblank supported region alias when normalization has no explicit endpoint or rewrites a Glue endpoint. It follows binding order and trimming; an explicit non-Glue endpoint keeps that default inert, and the hostname component must remain literal. Fluss applies the same derivation to the merged sibling context, preserving inherited endpoints and nested overrides. Projection initializes no filesystem, credential provider or SDK client. The exact committed candidate passed all 2224 selected tests, 93-module FE Checkstyle and fresh FE packaging. Real SQL checks all ten region aliases plus Fluss and Glue rewriting with exact host/port policy controls. It rejects region changes and activation of the stored fallback, admits a canonical-region update, then requires a later policy-only rejection for that unique derived service peer. The original warehouse and masked credentials remain intact. The legacy AWS_REGION key is omitted by default display, so its value is never read or compared; fallback activation is proved by the actual policy refusal. Across the main suite, 187 CREATE and 143 ALTER refusals, 17 positive CREATE admissions and 18 successful ALTERs were verified. This is admission/persistence evidence, not a live S3 request or runtime-hook bypass claim. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
