Commit Graph

23 Commits

Author SHA1 Message Date
Roberto Rojas f00bfdaeff
[SecretStore][GCP]Fixes Secrets Secret Manager Auth Profile (#3059)
Signed-off-by: robertojrojas <robertojrojas@gmail.com>
2023-08-07 14:55:38 -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
Roberto Rojas d08852c173
[GCP SecretStores SecretManager] Adds Component Metadata Schema (#2937)
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-06-28 16:20:08 -07: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
ItalyPaleAle 8c7ae10f4c 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-17 00:02:23 +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
Bernd Verst f63301b7a0 standardize secretstore metadata parsing
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-30 16:17:42 -08:00
Bernd Verst cbaa08a2e6 Update gcp secretmanager import
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-01 16:00:27 -07:00
Pravin Pushkar ed745763a0
Fix bulk get from gcp secret store (#2175)
* Fix bulk get from gcp secret store

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Including version in bulk secret name & client close func

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Adding unit test

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix lint

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* trigger pr checks

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-10-21 16:24:27 -07:00
Bernd Verst 83a562d71a update lots of dependencies
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-10-11 14:01:38 -07:00
yellow chicks 57b5acc1cb
feature(secretstore): add context to api and tencent/ssm (#1973)
* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* Add Features list to Tencent SSM

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

* pin custom dapr in cert tests for bindings context change

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

* feature(secretstore): add context to api and tencent/ssm

Signed-off-by: 1046102779 <seachen@tencent.com>

* optimize(middleware): Middleware to middleware.Middleware API

Signed-off-by: 1046102779 <seachen@tencent.com>

* fix pinning of custom dapr in cert tests

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

* Update cassandra cert test with new secretstore context

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

* modtidy again

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

Signed-off-by: 1046102779 <seachen@tencent.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-09-14 15:18:12 -07:00
Tiago Alves Macambira 8eec2a8c06
SecretStores advertise supported Features(). (#2069)
This PR is aimed at addressing issue #2047.

In the [Secret API Documentation](https://docs.dapr.io/reference/api/secrets_api/#response-body) it is stated:

> If a secret store has support for multiple keys in a secret, a JSON payload is returned with the key names as fields and their respective values.
>
> In case of a secret store that only has name/value semantics, a JSON payload is returned with the name of the secret as the field and the value of the secret as the value.

There are two classes of secret stores but there isn't a way to tell them apart at run-time. This limits the ability of conformance tests to verify the behavior of secret stores supporting multiple keys.

We address this by augmenting SecretStores with the ability to advetise `Features`. This is similar
to what PubSub and StateStores do. Feature `MULTIPLE_KEY_VALUES_PER_SECRET` was added and is
advertised by Hashicorp Vault (default behaviour) and by Local File SecretStore (depending on its configuration).

Updated tests to account to new method and ensure expected behavior.

Fixes #2047

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-09-13 15:55:39 -07: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
Marcos Candeia 8964d8bf41
Define common metadata across components (#1994)
* Add base metadata for all components

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Fix lint issues on consul and mysql tests

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Pin candeia/dapr runtime version

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Add replace directive to use mcandeia/dapr on all go submodules

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Fixed runtime config instantiation

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
2022-08-25 10:10:53 -07:00
Yordan Pavlov b8063f2bdb
Fix #1250 by upgrading cloud.google.com/go/pubsub to v1.12.2 (#1285)
* upgrade cloud.google.com/go/pubsub to v1.12.2

Signed-off-by: Yordan Pavlov <yordan.pavlov@dunnhumby.com>

* update GCP secret manager test

Signed-off-by: Yordan Pavlov <yordan.pavlov@dunnhumby.com>

* make modtidy-all

Signed-off-by: Yordan Pavlov <yordan.pavlov@dunnhumby.com>

Co-authored-by: Yordan Pavlov <yordan.pavlov@dunnhumby.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-01-13 09:26:42 -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
Phil Kedy 688df9bda4
Removed dependency on dapr/dapr in favor of dapr/kit. Fixed go mod dependencies afterwards. Go 1.16 in go.mod. Removed accidental log dependency. (#807) 2021-04-19 12:06:10 -07:00
Carlos Mendible 5018196c58
Updated GCP SecretManager BulkGetSecret #590 (#613) 2021-01-20 08:28:31 -08:00
Carlos Mendible 20278e7f3a
Implementing BulkGetSecret (#310) 2020-11-09 16:09:08 -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
Young Bu Park ee97c3c56a
Use dapr logger (#238)
* Use dapr logger

* skip linter false alarm
2020-02-28 15:49:49 -08:00
REDDY PRASAD 5f3f850852
Add GCP Secret Manager (#199)
*  Add GCP Secret Manager

* Update tests

* Fix lint errors

* Update as per review

* Run go mod tidy

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-01-30 21:51:52 -08:00