diff --git a/oap-server-bom/pom.xml b/oap-server-bom/pom.xml
index 73d3d71377aa..1c1096748909 100644
--- a/oap-server-bom/pom.xml
+++ b/oap-server-bom/pom.xml
@@ -72,7 +72,7 @@
4.4.16
4.1.5
1.21
- 0.9.0-rc3
+ 0.9.0-rc4
3.4.0
2.4.6.RELEASE
1.5.3
diff --git a/oap-server/server-starter/src/main/resources/bydb.yml b/oap-server/server-starter/src/main/resources/bydb.yml
index 75899fee8aca..5ef1eef274c0 100644
--- a/oap-server/server-starter/src/main/resources/bydb.yml
+++ b/oap-server/server-starter/src/main/resources/bydb.yml
@@ -45,6 +45,10 @@ global:
asyncProfilerTaskQueryMaxSize: ${SW_STORAGE_BANYANDB_ASYNC_PROFILER_TASK_QUERY_MAX_SIZE:200}
# If the BanyanDB server is configured with TLS, configure the TLS cert file path and enable TLS connection.
sslTrustCAPath: ${SW_STORAGE_BANYANDB_SSL_TRUST_CA_PATH:""}
+ # If the BanyanDB server is configured with Basic Auth, configure the username.
+ username: ${SW_STORAGE_BANYANDB_USERNAME:""}
+ # If the BanyanDB server is configured with Basic Auth, configure the password.
+ password: ${SW_STORAGE_BANYANDB_PASSWORD:""}
# Cleanup TopN rules in BanyanDB server that are not configured in the bydb-topn.yml config.
cleanupUnusedTopNRules: ${SW_STORAGE_BANYANDB_CLEANUP_UNUSED_TOPN_RULES:true}
diff --git a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java
index 8e355c0972d2..6485a123370c 100644
--- a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java
+++ b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java
@@ -70,6 +70,8 @@ public class BanyanDBStorageClient implements Client, HealthCheckable {
public BanyanDBStorageClient(BanyanDBStorageConfig config) {
Options options = new Options();
options.setSslTrustCAPath(config.getGlobal().getSslTrustCAPath());
+ options.setUsername(config.getGlobal().getUsername());
+ options.setPassword(config.getGlobal().getPassword());
this.client = new BanyanDBClient(config.getTargetArray(), options);
this.flushTimeout = config.getGlobal().getFlushTimeout();
}
diff --git a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageConfig.java b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageConfig.java
index e32891c3e472..9cfcbf8a2879 100644
--- a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageConfig.java
+++ b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageConfig.java
@@ -96,6 +96,14 @@ public static class Global {
* single request.
*/
private int asyncProfilerTaskQueryMaxSize;
+ /**
+ * If the BanyanDB server is configured with Basic Auth, config the username.
+ */
+ private String username;
+ /**
+ * If the BanyanDB server is configured with Basic Auth, config the password.
+ */
+ private String password;
private int resultWindowMaxSize = 10000;
private int metadataQueryMaxSize = 5000;
diff --git a/test/e2e-v2/cases/storage/banyandb/config/auth-config.yaml b/test/e2e-v2/cases/storage/banyandb/config/auth-config.yaml
new file mode 100644
index 000000000000..286d88a2d632
--- /dev/null
+++ b/test/e2e-v2/cases/storage/banyandb/config/auth-config.yaml
@@ -0,0 +1,20 @@
+# 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.
+
+users:
+ - username: admin
+ password: 123456
+ - username: test
+ password: 123456
\ No newline at end of file
diff --git a/test/e2e-v2/cases/storage/banyandb/docker-compose.yml b/test/e2e-v2/cases/storage/banyandb/docker-compose.yml
index 1e1aaa98a7ad..4eb3d4dffed6 100644
--- a/test/e2e-v2/cases/storage/banyandb/docker-compose.yml
+++ b/test/e2e-v2/cases/storage/banyandb/docker-compose.yml
@@ -22,6 +22,7 @@ services:
service: banyandb
networks:
- e2e
+ command: standalone --auth-config-file config/auth-config.yaml --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data --measure-metadata-cache-wait-duration 1m --stream-metadata-cache-wait-duration 1m
oap:
extends:
@@ -31,6 +32,8 @@ services:
- ./config/bydb-topn.yml:/skywalking/config/bydb-topn.yml
environment:
SW_STORAGE: banyandb
+ SW_STORAGE_BANYANDB_USERNAME: admin
+ SW_STORAGE_BANYANDB_PASSWORD: 123456
ports:
- 12800
depends_on:
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/script/env
index ad472776950d..9f0c0ec29182 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/script/env
@@ -23,7 +23,7 @@ SW_AGENT_CLIENT_JS_COMMIT=af0565a67d382b683c1dbd94c379b7080db61449
SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016
SW_KUBERNETES_COMMIT_SHA=6fe5e6f0d3b7686c6be0457733e825ee68cb9b35
SW_ROVER_COMMIT=79292fe07f17f98f486e0c4471213e1961fb2d1d
-SW_BANYANDB_COMMIT=0f3b90d9b4f628d2de02cb39ef678d636358df44
+SW_BANYANDB_COMMIT=7e5b2d0404e8ad6d5835eee6fe589a2544d0decb
SW_AGENT_PHP_COMMIT=d1114e7be5d89881eec76e5b56e69ff844691e35
SW_PREDICTOR_COMMIT=54a0197654a3781a6f73ce35146c712af297c994