Commit Graph

104 Commits

Author SHA1 Message Date
Alessandro (Ale) Segala c47907d1a5
Chore: use a single package for all Feature structs (#3278)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2024-01-08 09:07:10 -08:00
Bernd Verst 9095b0e7e7
Switch to Go 1.21, Updates linter, updates workflows, adds sarama 1.42.1 (#3251)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-11-28 18:13:09 -08: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
Taction c957420341
Wasm middleware: add ability to pass config to guest (#2918)
Signed-off-by: zhangchao <zchao9100@gmail.com>
2023-08-07 00:04:38 -07:00
Alessandro (Ale) Segala 46b7535f4a
DecodeMetadata: add support for aliases via "mapstructurealiases" struct tag (#3034)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-08-03 12:40:23 -07:00
Alessandro (Ale) Segala 8b6156f4f7
Bearer middleware: add "infer algorithm from key" (#3033)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-08-03 07:37:22 -07:00
Edoardo Vacchi 13dfbdbac6
wasm: support http(s) fetch of Wasm files (#3005)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2023-07-27 15:09:44 +00:00
Edoardo Vacchi 22a695c745
wasm: update benchmark to use `url` instead of `path` (#3001)
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2023-07-20 15:50:58 +00: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
Crypt Keeper 651834e9de
wasm: implements strictSandbox for output binding and HTTP middleware (#2884)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-07-11 14:37:19 +00:00
Alessandro (Ale) Segala bf1f983305
Change metadata format of router alias middleware (#2903)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-06-19 19:54:23 +00:00
Crypt Keeper d22c4bc7f0
Changes wasm middleware and output binding config to url instead of path (#2817)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2023-05-02 00:48:01 +00:00
ParrySMS 52d7c8ea0f
Fix: OPA Middleware: additional_headers not set on allowed requests (#2795)
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
Signed-off-by: ParrySMS <yh@szu.me>
Signed-off-by: MregXN <mregxn@gmail.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ParrySMS <2015090170@email.szu.edu.cn>
Co-authored-by: Tiago Alves Macambira <tmacam@burocrata.org>
Co-authored-by: MregXN <46479059+MregXN@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
2023-04-19 18:36:14 +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
Bernd Verst a069e682be
Refactor metadata parsing in middlewares and workflows (#2715)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-03-28 09:34:20 -07:00
Alessandro (Ale) Segala a8415d82b8
Certification tests + fixes for Bearer HTTP Middleware (#2673)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-03-16 20:40:24 +00:00
Alessandro (Ale) Segala a359dcaad6
Certification test for middleware.http.ratelimit (#2636)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-07 20:51:35 +00:00
Bernd Verst f2a9e30cdd
[Maintenance task] upgrade lots of libraries (#2630)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-03-04 00:38:17 +00:00
Alessandro (Ale) Segala 236104d7f5
Fix OAuth2 Client Credentials middleware too (#2629)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-03 23:58:57 +00:00
Drew Robbins ee92bd16be
Oauth2 Middleware fix for Bearer token header (#2616)
Signed-off-by: Drew Robbins <drew@drewby.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-03 22:42:36 +00:00
ItalyPaleAle a583271b3f Updated to Go 1.20
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-22 21:19:41 +00:00
ItalyPaleAle 55b6a04805 Merge branch 'master' of https://github.com/dapr/components-contrib into newdeps
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-17 21:20:45 +00:00
ItalyPaleAle d4e4355b03 Removed mod replacement
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-17 01:16:30 +00:00
ItalyPaleAle bc47aa3049 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-17 00:59:25 +00:00
ItalyPaleAle a484d7ebc7 Merge branch 'master' of https://github.com/dapr/components-contrib into newdeps
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-16 23:35:28 +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
ItalyPaleAle a8957062f0 Fixed tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-16 01:42:05 +00:00
ItalyPaleAle 9210f7ded8 Replaced github.com/coreos/go-oidc with github.com/lestrrat-go/jwx/v2 too
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-16 01:11:45 +00:00
ItalyPaleAle 643a2abff2 Removed go.uber.org/atomic and github.com/pkg/errors
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-15 19:56:20 +00:00
Deepanshu Agarwal bb7a2ec60e drop dapr runtime fork replace
Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
2023-01-12 16:38:29 +05:30
Deepanshu Agarwal b2d8e6013b
Add bulkSubscribe request params to SubscribeRequest (#2405)
* Add bulkSubscribe configuration params

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

* Replace dapr/dapr package to run cert tests

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

* Change bulkSubscribe param types

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

* Update latest dapr/dapr fork

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

* Update correct dapr/dapr version

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

* change BulkSubscribeRequest to Config

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

* Update dapr/dapr version for cert

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

* Update with latest dapr fork

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

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
2023-01-10 09:30:25 -08:00
Mukundan Sundararajan bc63181106 drop replace for dapr runtime in cert tests
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-12-21 20:57:44 +05:30
Mukundan Sundararajan fac573de8e fix dependency for dapr/dapr based on PR
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-12-20 23:13:31 +05:30
Mukundan Sundararajan 5a2be14231 fix cert test dependency to dapr/dapr PR dependency
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-12-15 23:05:11 +05:30
Mukundan Sundararajan 0841b3d846 Merge branch 'master' into optimize-bulkpubres-struct 2022-12-15 23:00:34 +05:30
Bernd Verst 8270fff6f1 Merge remote-tracking branch 'upstream/master' into upgradesdks 2022-12-14 10:29:10 -08:00
Alessandro (Ale) Segala 6a7d58436d
Fix ratelimit middleware not working (#2349)
We need to set a value for the X-Forwarded-For header or the upstream library won't rate-limit requests. Additionally, upgraded the tollbooth library to v7.

Fixes #2343

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

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-14 08:43:40 -08:00
Mukundan Sundararajan 412bf8f2a9 fix cert test dependency to dapr/dapr PR dependency
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-12-14 11:42:32 +05:30
Mukundan Sundararajan 71a543aed7 fix cert test dependency to dapr/dapr PR dependency
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-12-14 11:01:51 +05:30
Bernd Verst 0d7a7e73db pin latest dapr
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-12-13 17:10:10 -08:00
1046102779 0b0a7298f6 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-12-08 16:24:53 +08:00
1046102779 2dd7433a59 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-12-08 15:56:51 +08:00
Crypt Keeper f96873428e
Adds http-wasm middleware to replace basic (#2239)
* Adds http-wasm middleware to replace basic

Signed-off-by: Adrian Cole <adrian@tetrate.io>

* pre-release dapr/kit for logging

Signed-off-by: Adrian Cole <adrian@tetrate.io>

* Log.IsEnabled

Signed-off-by: Adrian Cole <adrian@tetrate.io>

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-11-03 20:03:48 -07:00
1046102779 08f665cb83 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-21 21:05:47 +08:00
1046102779 d58e6a3445 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-21 19:08:52 +08:00
Crypt Keeper 535c670252
Handles request URI edge cases (#2168)
Signed-off-by: Adrian Cole <adrian@tetrate.io>

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-10-10 08:35:57 -07:00
yellow chicks 740c1a6495
feature(middleware): add routeralias in middleware (#2041)
* feature(middleware): add routeralias in middleware

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

* feature(middleware): add routeralias in middleware

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

* feature(middleware): add routeralias in middleware

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

* Open
feature(middleware): add routeralias in middleware

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

* feature(middleware): add routeralias in middleware

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

* feature(middleware): add routeralias in middleware

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

* feature(middleware): add routeralias in middleware

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

* feature(middleware): add routeralias in middleware

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

* feature(middleware): add routeralias in middleware

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

* feature(middleware): add routeralias in middleware

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

Signed-off-by: 1046102779 <seachen@tencent.com>
Co-authored-by: Loong Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-10-09 18:31:39 -07:00
Bernd Verst 43ccc1c1d8
Update middleware/http/opa/middleware_test.go
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-10-06 14:27:18 -07:00
ItalyPaleAle 8d08f86659 OPA middleware: changed to not read body by default
New metadata option to read body: `readBody` which is false by default

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-06 20:54:21 +00:00