mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-26 12:44:10 +00:00
Add query.remote_allowed_hosts and query.allow_server_credentials to frontend, datanode and standalone. - query.remote_allowed_hosts: when set, object stores built from SQL statements send every request, including credential requests, through an HTTP transport that only allows the listed hosts and does not follow redirects. Blocked requests are logged with their host and port. - query.allow_server_credentials = false: an object store without credentials in its connection options cannot use the server's own credentials. Independent of the options, explicit credentials are validated: incomplete S3/OSS key pairs, an S3 session token without keys, an Azure account key without a known account name, and a GCS credential that is not a service account key are rejected. Only the type, private key and client email of a GCS service account key are passed to the signer. Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
45 lines
1.5 KiB
Rust
45 lines
1.5 KiB
Rust
// Copyright 2023 Greptime Team
|
|
//
|
|
// Licensed 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.
|
|
|
|
pub use opendal::raw::{Service, ServiceInfo, Servicer};
|
|
pub use opendal::{
|
|
Buffer, Builder as ObjectStoreBuilder, Entry, EntryMode, Error, ErrorKind, FuturesAsyncReader,
|
|
FuturesAsyncWriter, HttpTransporter, Lister, Metadata, OperationContext,
|
|
Operator as ObjectStore, Reader, Result, Writer, services,
|
|
};
|
|
|
|
pub mod config;
|
|
pub mod error;
|
|
pub mod factory;
|
|
pub mod layers;
|
|
pub mod manager;
|
|
pub mod remote_access;
|
|
pub mod secure_fs;
|
|
#[cfg(feature = "hdfs-object-store")]
|
|
pub mod temp_file;
|
|
#[cfg(feature = "testing")]
|
|
pub mod test_util;
|
|
pub mod util;
|
|
|
|
#[cfg(feature = "hdfs-object-store")]
|
|
pub use config::HdfsConnection;
|
|
pub use config::{AzblobConnection, GcsConnection, OssConnection, S3Connection};
|
|
|
|
/// The default object cache directory name.
|
|
pub const OBJECT_CACHE_DIR: &str = "object_cache";
|
|
|
|
pub const ATOMIC_WRITE_DIR: &str = "tmp/";
|
|
/// For compatibility. Remove this after a major version release.
|
|
pub const OLD_ATOMIC_WRITE_DIR: &str = ".tmp/";
|