Commit Graph

33 Commits

Author SHA1 Message Date
Artur Souza 339624b7a3
Update daprd in cert tests. (#1511)
Signed-off-by: Artur Souza <artursouza.ms@outlook.com>
2022-02-18 14:42:19 -08:00
Joni Collinge 3af57ca5b7
Fix not setting status code in nethttpadaptor on response (#1429)
* fix not setting status code in nethttpadaptor on response

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* make test name consistent

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* git mod tidy

Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-01-13 07:31:29 -08:00
Dmitry Shmulevich c7adb917f3
update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
xj524598 3a7137f9a1
update some ratelimit_middleware.go comments (#1330)
Co-authored-by: xujie <xujie1@shein.com>
2021-11-24 16:16:57 +02:00
yellow chicks 0268491990
feature(middleware/routerchecker): avoid sending dirty data to opentelemetry system and logic servers. (#1155)
* feature/pubsub: add delay queue params for pulsar

* feature/pubsub: add delay queue params for pulsar

* feature/pubsub: add delay queue params for pulsar

* feature: add middleware/routerchecker to reduce dirty data report opentelemetry

* feature: add middleware/routerchecker to reduce dirty data report opentelemetry

* Update pulsar.go

* feature: add middleware/routerchecker to reduce dirty data report opentelemetry

* feature: add middleware/routerchecker to reduce dirty data report opentelemetry

Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-11-09 18:49:29 -08:00
zhangchao 3dc1d962d7 add notes 2021-10-26 22:32:24 +08:00
zhangchao b02b06be09 fix tests 2021-10-26 22:17:54 +08:00
Long Dai dd81ef7e42
Merge branch 'master' into fix_opa_middleware 2021-10-26 09:34:14 +08:00
richgo 3df47a52bd
middleware opa add body (#1165)
* included body in opa middleware which is required to do graphql field level authorisation

* fix broken test and middleware

* Update middleware_test.go

* go fmt

* goimports + gofumpt

Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-10-25 15:43:43 -07:00
zhangchao bf5d70f4b9 fix(opa middleware): fix termination judgment condition 2021-10-22 11:27:19 +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
Taction 3a109e2c74
fix http opa middleware status code parse (#1136)
* fix http opa middleware status code parse

* fix for review

* use json unmarshal to handle edge cases.

* fix review

Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-17 10:58:01 -07:00
Phil Kedy a28587ed98
Resolving gofumpt issues (#932) 2021-06-09 15:18:50 -07:00
Long Dai 4ee732e0bd
ci: enable gofumt linter (#887)
Signed-off-by: Long Dai <long0dai@foxmail.com>
2021-05-27 22:21:24 -07:00
Ian Luo 55ee03a5a0
Sentinel middleware support (#829)
* a prototype for sentinel middleware

* adapt sentinel's logger to dapr and optimize configs

* fix lint issue

* fix lint issues

* go mod tidy

* revise accoring to the review comments

* go mod tidy

* enhance unit tests

* fix lint issue

* fix go.sum

Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-05-13 12:11:24 -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
Yaron Schneider 3ef025c604
change headers (#679) 2021-02-09 18:57:55 -08:00
Stepan 5e9140f1db
Adding force https metadata key (#487)
* adding force https metadata and its handler code

* make https a const; change ForceHTTPS to lowercase before compare with true

* replacing strings.ToLower with strings.EqualFold due to lint error in Build linux_amd64 binaries check

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-10-22 14:51:07 -07: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
Richard Simpson 775bbebc6a
feat(middleware): add opa middleware (#456)
* feat(middleware): add opa middleware

* address linting feedback

* unwind logic a little more

* are we gonna need to throw hands lint?

* remove accidental assertion lib include

* address pr feedback

* expand test suite to headers

* fix errors and moar test

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-09-12 12:29:42 -07:00
Florian Wagner e60fa843f2
Adding middleware component for non interactive oauth2 client credentials flow (#431)
* Initial commit with mock not working

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* changed structure for mocking, added first test

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* oauth2clientcredentials input checks and tests

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* rename metadata authHeaderName to HeaderName

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* Run 'go mod tidy'

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* use dapr logger from caller

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* Fix additional lint requirements by build pipeline

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

Co-authored-by: Florian Wagner <flwagner@microsoft.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-08-16 11:05:24 -07:00
Mukundan Sundararajan 5c62707aba
Upgrade go version to 1.14.3 and linter version to 1.26.0 (#352)
* Upgrade to go 1.14.3 and linter version to 1.26.0
2020-05-29 15:26:33 -07:00
Joni Collinge aa4f9e8753
handle uservalues (#333) 2020-05-20 17:02:47 -07:00
Ben Coleman 1ab1a86a60
Small misspelling in error messages (#299) 2020-04-07 11:41:58 -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
Joni Collinge 5b75f4d0fb
Changed how proto header is converted to string (#228)
* changed how proto header is converted to string

* added test for proto headers

* removed obsolete assert in test
2020-02-19 08:49:14 -08:00
Joni Collinge e67ea01fbe
Added check to handle nil request body in nethttpadaptor (#218) 2020-02-10 12:36:52 -08:00
Joni Collinge 6c65fda88d
Add Rate Limiting Middleware (#193)
* add initial ratelimit middleware

* fixed linting issues

* updated rate limiting logic

* removed redundant const

* remove obsolete go.uber.org/ratelimit reference in go mod

* migrated from juju/ratelimit to tollbooth rate limit

* moved adaptor to a separate package and added tests

* added RemoteAddr

* moved handler wrapped outside hot path

* fix linter
2020-02-07 13:25:36 -08:00
Abhishek Gupta 6de230391d
Aerospike state store implementation (#196)
* aerospike state store impl

* fixed linter issues:

* addressed feedback

* Delete bearer_middleware.go

* Delete cassandra_test.go

* Revert "Delete cassandra_test.go"

This reverts commit 462c066814.

* Revert "Delete bearer_middleware.go"

This reverts commit ae114a1df1.

Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-01-28 18:55:14 -08:00
Marcin Kosieradzki 381777dc3b Implemented OIDC Bearer middleware (#188)
* Implemented OIDC Bearer middleware

* Fixed indentation
Added support for case-insensitive scheme
Moved scheme to constant

Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
2020-01-16 13:26:30 -08:00
Abhishek Gupta 9323c44ecf check etag for etcd update and delete ops (#175) 2020-01-09 12:33:23 -08:00
Haishi2016 98999a6044
fix regression switching to session which missed header injection (#157) 2019-12-19 10:22:52 -08:00
Haishi2016 701f12e529
oAuth2 HTTP middleware (#151)
* oAuth2 HTTP middleware

* fix go mod

* refactor to use sessions

* go mod tidy
2019-12-17 09:43:14 -08:00