mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-23 06:30:05 +00:00
fix: gRPC auth (#6827)
* fix: internal service Signed-off-by: shuiyisong <xixing.sys@gmail.com> * refactor: gRPC auth Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: add permission check for bulk ingest Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: remove unused grpc auth middleware Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: extract header function Signed-off-by: shuiyisong <xixing.sys@gmail.com> * refactor: extract common code and add auth to otel arrow api Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: rename utils to context_auth Signed-off-by: shuiyisong <xixing.sys@gmail.com> * test: otel arrow auth Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: add support for old auth value Signed-off-by: shuiyisong <xixing.sys@gmail.com> --------- Signed-off-by: shuiyisong <xixing.sys@gmail.com>
This commit is contained in:
@@ -44,6 +44,7 @@ use servers::grpc::{FlightCompression, GrpcOptions, GrpcServer, GrpcServerConfig
|
||||
use servers::http::{HttpOptions, HttpServerBuilder, PromValidationMode};
|
||||
use servers::metrics_handler::MetricsHandler;
|
||||
use servers::mysql::server::{MysqlServer, MysqlSpawnConfig, MysqlSpawnRef};
|
||||
use servers::otel_arrow::OtelArrowServiceHandler;
|
||||
use servers::postgres::PostgresServer;
|
||||
use servers::query_handler::grpc::ServerGrpcQueryHandlerAdapter;
|
||||
use servers::query_handler::sql::{ServerSqlQueryHandlerAdapter, SqlQueryHandler};
|
||||
@@ -592,7 +593,8 @@ pub async fn setup_grpc_server_with(
|
||||
let grpc_builder = GrpcServerBuilder::new(grpc_config.clone(), runtime)
|
||||
.database_handler(greptime_request_handler)
|
||||
.flight_handler(flight_handler)
|
||||
.prometheus_handler(fe_instance_ref.clone(), user_provider)
|
||||
.prometheus_handler(fe_instance_ref.clone(), user_provider.clone())
|
||||
.otel_arrow_handler(OtelArrowServiceHandler::new(fe_instance_ref, user_provider))
|
||||
.with_tls_config(grpc_config.tls)
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user