We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a4fbb50 + 2390f7a commit 37b9147Copy full SHA for 37b9147
.github/infrastructure/docker-compose-cassandra.yml
@@ -2,7 +2,7 @@ version: '2'
2
3
services:
4
cassandra:
5
- image: docker.io/bitnami/cassandra:4.1
+ image: docker.io/bitnamilegacy/cassandra:4.1
6
ports:
7
- '7000:7000'
8
- '9042:9042'
common/component/kafka/clients.go
@@ -22,6 +22,10 @@ func (k *Kafka) latestClients() (*clients, error) {
22
23
// case 1: use aws clients with refreshable tokens in the cfg
24
case k.awsConfig != nil:
25
+ if k.clients != nil {
26
+ return k.clients, nil
27
+ }
28
+
29
awsKafkaOpts := KafkaOptions{
30
Config: k.config,
31
ConsumerGroup: k.consumerGroup,
@@ -34,10 +38,12 @@ func (k *Kafka) latestClients() (*clients, error) {
34
38
if err != nil {
35
39
return nil, fmt.Errorf("failed to get AWS IAM Kafka clients: %w", err)
36
40
}
37
- return &clients{
41
42
+ k.clients = &clients{
43
consumerGroup: awsKafkaClients.ConsumerGroup,
44
producer: awsKafkaClients.Producer,
- }, nil
45
46
47
48
// case 2: normal static auth profile clients
49
default:
common/component/kafka/kafka.go
@@ -181,6 +181,12 @@ func (k *Kafka) Init(ctx context.Context, metadata map[string]string) error {
181
182
return err
183
184
+ case oidcPrivateKeyJWTAuthType:
185
+ k.logger.Info("Configuring SASL OAuth2/OIDC authentication with private key JWT")
186
+ err = updateOidcPrivateKeyJWTAuthInfo(config, meta)
187
+ if err != nil {
188
+ return err
189
190
case passwordAuthType:
191
k.logger.Info("Configuring SASL Password authentication")
192
k.saslUsername = meta.SaslUsername
@@ -295,12 +301,16 @@ func (k *Kafka) ValidateAWS(metadata map[string]string) (awsAuth.Options, error)
295
301
296
302
297
303
return awsAuth.Options{
304
+ Logger: k.logger,
298
305
Region: region,
299
306
AccessKey: accessKey,
300
307
SecretKey: secretKey,
308
AssumeRoleArn: role,
309
AssumeRoleSessionName: session,
310
SessionToken: token,
311
+ TrustAnchorArn: metadata["trustAnchorArn"],
312
+ TrustProfileArn: metadata["trustProfileArn"],
313
+ Properties: metadata,
314
}, nil
315
316
common/component/kafka/kafka_test.go
@@ -520,6 +520,14 @@ func TestValidateAWS(t *testing.T) {
520
AssumeRoleArn: "testRoleArn",
521
AssumeRoleSessionName: "testSessionName",
522
SessionToken: "testSessionToken",
523
+ Properties: map[string]string{
524
+ "region": "us-east-1",
525
+ "accessKey": "testAccessKey",
526
+ "secretKey": "testSecretKey",
527
+ "assumeRoleArn": "testRoleArn",
528
+ "sessionName": "testSessionName",
529
+ "sessionToken": "testSessionToken",
530
+ },
531
},
532
err: nil,
533
@@ -540,6 +548,14 @@ func TestValidateAWS(t *testing.T) {
540
548
AssumeRoleArn: "awsRoleArn",
541
549
AssumeRoleSessionName: "awsSessionName",
542
550
SessionToken: "awsSessionToken",
551
552
+ "awsRegion": "us-west-2",
553
+ "awsAccessKey": "awsAccessKey",
554
+ "awsSecretKey": "awsSecretKey",
555
+ "awsIamRoleArn": "awsRoleArn",
556
+ "awsStsSessionName": "awsSessionName",
557
+ "awsSessionToken": "awsSessionToken",
558
543
559
544
560
545
561
common/proto/state/sqlserver/test.pb.go
common/proto/state/sqlserver/test.proto
@@ -0,0 +1,10 @@
1
+syntax = "proto3";
+option go_package = "github.com/dapr/components-contrib/common/proto/state/sqlserver";
+import "google/protobuf/timestamp.proto";
+message TestEvent {
+ int32 eventId = 1;
9
+ google.protobuf.Timestamp timestamp = 2;
10
+}
state/redis/redis_test.go
@@ -561,3 +561,9 @@ func BenchmarkGetKeyVersion(b *testing.B) {
562
563
564
565
+func Test_KeyList(t *testing.T) {
566
+ s := NewRedisStateStore(logger.NewLogger("test"))
567
+ _, ok := s.(state.KeysLiker)
568
+ require.True(t, ok)
569
0 commit comments