Skip to content

Commit 236790f

Browse files
committed
login-username
1 parent bf04afd commit 236790f

File tree

6 files changed

+23
-1
lines changed

6 files changed

+23
-1
lines changed

oap-server-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<httpcore.version>4.4.16</httpcore.version>
7373
<httpasyncclient.version>4.1.5</httpasyncclient.version>
7474
<commons-compress.version>1.21</commons-compress.version>
75-
<banyandb-java-client.version>0.9.0-rc3</banyandb-java-client.version>
75+
<banyandb-java-client.version>0.9.0-rc4</banyandb-java-client.version>
7676
<kafka-clients.version>3.4.0</kafka-clients.version>
7777
<spring-kafka-test.version>2.4.6.RELEASE</spring-kafka-test.version>
7878
<consul.client.version>1.5.3</consul.client.version>

oap-server/server-starter/src/main/resources/bydb.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ global:
4545
asyncProfilerTaskQueryMaxSize: ${SW_STORAGE_BANYANDB_ASYNC_PROFILER_TASK_QUERY_MAX_SIZE:200}
4646
# If the BanyanDB server is configured with TLS, configure the TLS cert file path and enable TLS connection.
4747
sslTrustCAPath: ${SW_STORAGE_BANYANDB_SSL_TRUST_CA_PATH:""}
48+
# If the BanyanDB server is configured with Basic Auth, configure the username.
49+
username: ${SW_STORAGE_BANYANDB_USERNAME:""}
50+
# If the BanyanDB server is configured with Basic Auth, configure the password.
51+
password: ${SW_STORAGE_BANYANDB_PASSWORD:""}
4852
# Cleanup TopN rules in BanyanDB server that are not configured in the bydb-topn.yml config.
4953
cleanupUnusedTopNRules: ${SW_STORAGE_BANYANDB_CLEANUP_UNUSED_TOPN_RULES:true}
5054

oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ public class BanyanDBStorageClient implements Client, HealthCheckable {
7070
public BanyanDBStorageClient(BanyanDBStorageConfig config) {
7171
Options options = new Options();
7272
options.setSslTrustCAPath(config.getGlobal().getSslTrustCAPath());
73+
options.setUsername(config.getGlobal().getUsername());
74+
options.setPassword(config.getGlobal().getPassword());
7375
this.client = new BanyanDBClient(config.getTargetArray(), options);
7476
this.flushTimeout = config.getGlobal().getFlushTimeout();
7577
}

oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageConfig.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ public static class Global {
9696
* single request.
9797
*/
9898
private int asyncProfilerTaskQueryMaxSize;
99+
/**
100+
* If the BanyanDB server is configured with Basic Auth, config the username.
101+
*/
102+
private String username;
103+
/**
104+
* If the BanyanDB server is configured with Basic Auth, config the password.
105+
*/
106+
private String password;
99107

100108
private int resultWindowMaxSize = 10000;
101109
private int metadataQueryMaxSize = 5000;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
users:
2+
- username: admin
3+
password: 123456
4+
- username: test
5+
password: 123456

test/e2e-v2/cases/storage/banyandb/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ services:
2222
service: banyandb
2323
networks:
2424
- e2e
25+
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
2526

2627
oap:
2728
extends:
@@ -31,6 +32,8 @@ services:
3132
- ./config/bydb-topn.yml:/skywalking/config/bydb-topn.yml
3233
environment:
3334
SW_STORAGE: banyandb
35+
SW_STORAGE_BANYANDB_USERNAME: admin
36+
SW_STORAGE_BANYANDB_PASSWORD: 123456
3437
ports:
3538
- 12800
3639
depends_on:

0 commit comments

Comments
 (0)