Commit Graph

45 Commits

Author SHA1 Message Date
Sam f48b4128d6
feat(kafka): iam roles anywhere + assume role auth profiles (#3606)
Signed-off-by: Samantha Coyle <sam@diagrid.io>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2024-11-27 14:48:18 -08:00
Sam e2b27d3538
fix(aws): update close if aws auth provider is nil (#3607)
Signed-off-by: Samantha Coyle <sam@diagrid.io>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2024-11-20 09:24:49 -08:00
Sam a00a853556
feat(iam auth): allow iam roles anywhere auth profile (#3591)
Signed-off-by: Samantha Coyle <sam@diagrid.io>
Signed-off-by: Sam <sam@diagrid.io>
2024-11-14 12:04:56 -07:00
Josh van Leeuwen 93f19c96d1
state: Adds `io.Closer` to interface (#3537)
Signed-off-by: joshvanl <me@joshvanl.dev>
2024-09-10 08:15:52 -07:00
Eileen Yu a409bc1f96
fix: drop duplicate awsRegion/region field (#3490)
Signed-off-by: Eileen Yu <eileenylj@gmail.com>
2024-07-25 09:40:08 -07:00
Elena Kolevska 353447c992
secret store: AWS connection validation for parameter store and secrets manager (#3301)
Signed-off-by: Elena Kolevska <elena@kolevska.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2024-01-16 08:28:29 -08:00
Elena Kolevska 0c48ced685
state.dynamodb: validate AWS connection (#3285)
Signed-off-by: Elena Kolevska <elena@kolevska.com>
Signed-off-by: Elena Kolevska <elena-kolevska@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2024-01-02 17:35:52 +00:00
Alessandro (Ale) Segala 934e86c4f7
Rename folder "internal" to "common" (#3225)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-11-14 11:36:38 -08:00
Alessandro (Ale) Segala f4e73b0e65
Update dapr/kit (#3205)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <github@bernd.dev>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-11-02 16:20:56 -07:00
Bernd Verst 824ccebe87
Define DynamoDB Transaction limit (#3093)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-08-21 15:52:30 -07:00
Alessandro (Ale) Segala b10ce96b49
State stores: expose TTL as a feature (#2987)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-08-04 09:38:22 -07:00
Roberto Rojas 60322a1f1c
[AWS State DynamoDB] Adds Component Metadata Schema (#2906)
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2023-08-02 13:50:40 -07:00
Alessandro (Ale) Segala ec05809ee6
[Metadata] Update validator and some other fixes (#2984)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-07-17 22:17:22 +00:00
Josh van Leeuwen dfc28528b5
dynamodb: return ttlExpiryTime in GetResponse (#2899)
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-06-08 15:32:59 +00:00
Alessandro (Ale) Segala 1f27fd0e8b
Add conformance tests for etags in Bulk operations (#2843)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2023-05-17 16:28:29 -07:00
Alessandro (Ale) Segala e30d140479
Remove native/transactional BulkSet/BulkDelete from state stores (#2834)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-05-17 14:56:34 -07:00
Roberto Rojas 181f3ad039
[AWS DynamoDB] Transaction Support (#2809)
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
Signed-off-by: roberto <roberto@diagrid.io>
Co-authored-by: roberto <roberto@diagrid.io>
Co-authored-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
2023-04-27 23:13:20 +00:00
Alessandro (Ale) Segala 4f94da95cf
Refactor state store bulk operations (#2747)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-04-07 19:19:47 +00:00
Bernd Verst cfbac4d794
Refactor of Metadata parsing in Bindings (#2720)
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
Signed-off-by: spike <hello@spike.wiki>
Signed-off-by: zhangchao <zchao9100@gmail.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
Signed-off-by: handlerww <handlerww@gmail.com>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Roberto Rojas <robertojrojas@gmail.com>
Co-authored-by: spike <39330606+SpikeWong@users.noreply.github.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Co-authored-by: Taction <zchao9100@gmail.com>
Co-authored-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
Co-authored-by: Yiwen Chen <handlerww@gmail.com>
2023-04-05 22:19:08 +00:00
Josh van Leeuwen d098e38d6a
Propagate context from caller to appropriate places in the code (#2474)
* Propagates contexts to callers where appropriate.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Updates units tests with new func signature

Signed-off-by: joshvanl <me@joshvanl.dev>

* Fix linting errors

Signed-off-by: joshvanl <me@joshvanl.dev>

* Add atomic gate to alicloud rocketmq close channel.

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/aws/kinesis use a separate ctx variable name

Signed-off-by: joshvanl <me@joshvanl.dev>

* binding/kafka: use atomic to prevent closing the channel twice

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/mqtt3: use atomic bool to prevent close channel being closed multiple times

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/mqtt3: use Background context for handle operations:w

Signed-off-by: joshvanl <me@joshvanl.dev>

* state/cocroachdb: add context to Ping()

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/postgres: add comment explaining use of context.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Adds comment header to health/pinger.go

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/aws/snssqs: add waitgroup to wait for all go routines to finish
and block on Close(). Shuts down the subscription if there are no topic
handlers.

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/mqtt3: add atomic bool to prevent multiple channel closes. Add
wait group to block close on all goroutines to finish.

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/rabbitmq: fixes race conditions, uses atomic to prevent multiple
closes, add wait group to block close on all goroutines

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/redis: revert ctx passed when it could be cancelled. Add wait
group wait when closing.

Signed-off-by: joshvanl <me@joshvanl.dev>

* state/postges: pass context in init, and wait group on close.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Update all `Ping()` to `PingContext()` where possible.

Signed-off-by: joshvanl <me@joshvanl.dev>

* state/in-memory: add atomic bool to prevent closing channel multiple
times. Add wait group to block on close()

Signed-off-by: joshvanl <me@joshvanl.dev>

* state/mysql: don't use same ctx variable name

Signed-off-by: joshvanl <me@joshvanl.dev>

* Pass correct loop context to redis go routines

Signed-off-by: joshvanl <me@joshvanl.dev>

* Rename context when creating timeouts in state

Signed-off-by: joshvanl <me@joshvanl.dev>

* Remove state.Features() from requiring a context

Signed-off-by: joshvanl <me@joshvanl.dev>

* Revert wasm request handle Close func to be without context to
implement io.Closer interface. Add 5 second timeout. Add io.Closer
assertion in test.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Remove superfluous go lint vet directive

Signed-off-by: joshvanl <me@joshvanl.dev>

* Change Configuration Init function to take context

Signed-off-by: joshvanl <me@joshvanl.dev>

* Updates input binding interface to include a `Close() error` function. `Close`
blocks until all resources have been released and go routines have returned.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Change `Close() error` in input binding struct to `io.Closer` interface.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Update go.mod files to point to dapr/dapr PR https://github.com/dapr/dapr/pull/5831

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/redis: watch closeCh to shutdown worker instead of init context.

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/aws/snssqs + bindings/kubemq: ensure closeCh is caught so Close
correctly returns

Signed-off-by: joshvanl <me@joshvanl.dev>

* Close kubemq binding client on close. Ensure kafka consumer channel
cannot be closed more than once.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Tweaks

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Fixed cert tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* binding/mqtt3: add inline Background context instead of passing to
handleMessage

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/mqtt3: remove context from createSubscriberClientOptions

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/mqtt3: Remove `ResetConnection` func

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/kafka: Don't resubscribe if Subscribe is cancelled.

Signed-off-by: joshvanl <me@joshvanl.dev>

* binding/mqtt3: don't use context to control establishing connection

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/mqtt3: Fix linting errors

Signed-off-by: joshvanl <me@joshvanl.dev>

---------

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2023-02-16 14:18:35 -08:00
Roberto J Rojas 4f5a9c94ed fixes partition key incorrect implementation
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
2023-01-09 19:26:32 -05:00
Roberto Rojas 32975d04ad adds metadata field partition key
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
2022-12-23 16:07:17 -05:00
1046102779 2dd7433a59 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-12-08 15:56:51 +08:00
Bernd Verst ede060959a
Refactors all state store to standardize metadata parsing (#2257) 2022-11-05 15:36:44 -07:00
1046102779 5a367b401a feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-21 17:25:14 +08:00
Mike Brown 13cef6cba1
dymamodb state: add support for first write concurrency
The existing logic for the dymamodb state store does not respect the
FirstWrite concurrency option for a SetRequest when etags are not used
by the client. This commit fixes the issue by employing a conditional
expression to test for the existence of an item when FirstWrite is
specified and etags are not.

Signed-off-by: Mike Brown <github@torvosoft.com>
2022-08-30 12:11:45 -04:00
Mike Brown c7e7d517c0
dynamodb state: add support for etags
In order to safely support concurrent updates to existing state items
clients should employ etags. (For reference please see
tinyurl.com/5n83tnfp). Existing support for AWS DynamoDB does not
include support for etags. This change introduces etag support for AWS
DynamoDB utilizing conditional expressions (reference
tinyurl.com/5du587m8).

Signed-off-by: Mike Brown <github@torvosoft.com>
2022-08-26 12:08:29 -04:00
Mike Brown 87cd275069
dynamodb state: refactor common Set() & BulkSet() logic
Both Set() and BulkSet() contained duplicate logic to convert a dapr
state.SetRequest into a map[string]*dynamodb.AttributeValue. This
change refactors that logic into a new utility function
getItemFromReq(). This will ensure that subsequent changes to add
missing features (e.g. etag) will only have to be expressed once.

Signed-off-by: Mike Brown <github@torvosoft.com>
2022-08-26 12:08:29 -04:00
Alessandro (Ale) Segala bcea284c7b
Components' init functions should return interfaces (#1997)
* Components' init functions should return interfaces

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* pin latest berndverst contrib fork

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Fixed component registration in tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated all cert tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-25 18:27:45 -07:00
Bernd Verst e87cd5e4cb
Go 1.19 support and linter fixes (#1975)
* Go 1.19 support and linter fixes

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update workflows for Go1.19 and new linter version

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Remove unnecessary space in nolint directive

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* disable additional linters which aren't used because of Go generics

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* enable gosec linter again

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update bindings/zeebe/command/publish_message_test.go

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update bindings/output_binding.go

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Use prepared statement for mysql table creation

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Ping is not ping

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* c'mon linter

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Fix MySQL gosec issue

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* revert mysql to be fixed later

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-18 00:45:23 -07:00
Alessandro (Ale) Segala a2f3a84b96
Moved authentication to be an internal pkg (#1855)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-07-06 11:05:34 -07:00
deepanshuagarwal a0ef46265b
Adding Pinger interface and Removing mandatory nature of Ping fuction (#1784)
* add `Pinger` interface.

Signed-off-by: chanyong.moon <dev.chanyongmoon@gmail.com>

* Convert Ping fuction to optional

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

* Removing unrequired Ping implementations

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

* Addressing comments

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

Co-authored-by: chanyong.moon <dev.chanyongmoon@gmail.com>
2022-06-14 08:27:54 -07:00
Wim baada23d0d
Added TTL to state store binding for DynamoDB (#1512)
* Added TTL to state store binding for DynamoDB

Signed-off-by: wimvc <wim.vdc@hotmail.com>

* gofumpt dynmodb statestore files

Signed-off-by: wimvc <wim.vdc@hotmail.com>

* Fixed some godot issues

Signed-off-by: wimvc <wim.vdc@hotmail.com>

* Fixed typos and refactored IF in Get

Signed-off-by: wimvc <wim.vdc@hotmail.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Taction <zchao9100@gmail.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-03-04 08:18:33 -08:00
Dmitry Shmulevich c7adb917f3
update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
Long Dai 988fed05ab
ci: standard linter config (#1102)
* ci: standard linter config

Signed-off-by: Long <long.dai@intel.com>

* Update utils.go

* fix pulsar issue

Signed-off-by: Long <long.dai@intel.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-21 15:21:59 -07:00
문찬용 b387fcdff3
add Ping operation to`store` interface. (#757)
* add `Ping` operation.

* add `Ping` implementation of GA components

* add context to an argument for Ping

* add `Ping` implementation of blobstorage

* fix error string for passing lint

* Update blobstorage.go

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-05-25 23:48:46 -07:00
Artur Souza 931048aa60
Add Feature list for state store. (#744)
* Add Feature list for state store.

* List Transactional as a feature for state store.

* Fixing comments about etag.
2021-03-05 14:55:23 -08:00
Trond Hindenes 83975462bf
State:Dynamodb - Dont require access key/secret (#652)
* Dont require access key/secret

* Validate table name

* Fixed test issues

* Fix failing tests....?

* gofmt-ed files

* Remove unneeded fmt statement
2021-02-03 11:19:32 -08:00
Sky/敖小剑 5dc3587f7d
Add bulk get in state store - Plan B (#532)
* add BulkGet method on state store

* add a bool value in bulk get method to tell dapr if this store supports bulk get or not

* add  BulkGetResponse for bulk get; rollback GetResponse to remove new added filed key

* update to use BulkGetResponse for bulk get

* fix lint issues

* fix lint issues

* fix lnit issues
2020-11-26 23:07:27 -08:00
Trond Hindenes 8d6978372f
Various AWS improvements (#525)
* Support sessiontoken

* Fixed tests and other components

* Fixed tests and things

* fmt

* Fix lint errors

* gofmt

* Fixed lint bugs

* Remove unneeded parameter

* gofmt

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-11-23 13:21:29 -08:00
halspang f647d9eedb
Upgrade golang lint to 1.31 (#490)
Upgrade golang lint to 1.31.0

https://github.com/dapr/components-contrib/issues/439
2020-10-12 12:54:15 -07:00
Sashi Kumar 42a7af4c0c
[DynamoDB] Update BulkSet and BulkDelete with BatchWriteItem (#331)
* [DynamoDB] Update BulkSet and BulkDelete with BatchWriteItem

* Validate type of value

* Marshal value before setting for Set and BulkSet

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-05-27 15:12:34 -07:00
Trond Hindenes d3e9a7b3a7
Use shared aws auth package (#347)
* Use shared sqs auth package

* Goimports-ed files

* Added support for endpoint param in aws credentials abstraction, since the sqs-sns pubsub module required it

* Added endpoint support for all aws things

* Updated tests
2020-05-26 16:27:16 -07:00
Young Bu Park 60490d584d
Fix linting errors (#257) 2020-03-09 08:33:09 -07:00
Yaron Schneider 703f9bf04e
Initial implementation (#116)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2020-03-04 14:42:02 -08:00