Commit Graph

46 Commits

Author SHA1 Message Date
ItalyPaleAle 76ae036b00 Renamed lock
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-08-03 17:58:30 +00:00
ItalyPaleAle 8452c3b19d Changed per review feedback
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-08-03 14:32:06 +00:00
ItalyPaleAle 90b1d0d906 Added eventqueue package
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-08-02 20:02:47 +00:00
Alessandro (Ale) Segala 804821bb8f
Update jwx and other deps (#53)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-06-15 15:52:44 -07:00
Alessandro (Ale) Segala fdebb00fc2
Update JWX library which lazily-inits the httprc fetcher (#52)
This makes it so there are no 3 additional goroutines (even if idle) created when the library is imported.

See: lestrrat-go/jwx#929

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-06-06 10:58:59 -07:00
Alessandro (Ale) Segala f49c7e5230
ParseKey: ignore trailing newlines when parsing base64-encoded keys (#51)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-06-05 11:22:46 -07:00
Alessandro (Ale) Segala 9514168def
Update deps (#49) 2023-05-25 09:11:38 -07:00
joshvanl 56f99b79fb Adds `context` package with `Pool`
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-05-24 14:02:18 -07:00
Alessandro (Ale) Segala 15a7040dec
Dapr crypto scheme v1 (high level methods) (#42)
* Implement Dapr crypto scheme v1

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

* Added spec document

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

* Apply suggestions from code review

Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>

* Specify that 256-bit keys are required for AES-KW

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

* Add AES-CBC for key wrapping

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

* Add option DecryptionKeyName + some tweaks

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

* Uppercase ciphers

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

* Export BufPool

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

* Update crypto/schemes/enc/v1/README.md

Co-authored-by: Tiago Alves Macambira <tmacam@burocrata.org>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>

* Make carryover not a pointer

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

* Moved package to root folder

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

* Removed dependency on jwk library in schemes

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

* Updated per review feedback

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

* Addressed review feedback

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

---------

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Tiago Alves Macambira <tmacam@burocrata.org>
2023-04-18 12:36:28 -07:00
Alessandro (Ale) Segala c93a9df941
JWKS Cache: add WaitForCacheReady method (#47)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-04-18 10:01:51 -07:00
Alessandro (Ale) Segala b60341fe3e
Add jwkscache package (#46)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-04-17 22:50:30 -07:00
Alessandro (Ale) Segala 24e430f399
crypto: ParseKey should not panic if key is empty (#45)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-04-10 19:25:16 -07:00
Alessandro (Ale) Segala e1fba87ca2
Use ASN.1 serialization for ECDSA signatures (#44)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-04-05 23:00:32 +05:30
Alessandro (Ale) Segala 30d122f67b
Crypto: Add methods returning the list of supported algorithms (#43)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-04-01 14:52:30 +05:30
Alessandro (Ale) Segala eadb01f64f
Updates crypto libraries, incl. security fixes (#41)
Updates github.com/lestrrat-go/jwx/v2 and golang.org/x/crypto, which also includes security fixes

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-26 16:01:36 +05:30
Alessandro (Ale) Segala efcc1af907
Add AES-CBC-HMAC AEAD cipher to Dapr crypto (#40)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-20 17:36:08 -07:00
Alessandro (Ale) Segala b5bafe889a
Refactored ParseISO8601Duration for 18x perf improvement (#39)
* WIP: Refactored ParseISO8601Duration

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

* Completed work

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

* 💄

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

---------

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-07 11:25:05 -08:00
Alessandro (Ale) Segala 39814af4c7
Add Dapr crypto library to dapr/kit (#38)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-07 11:22:05 -08:00
Bernd Verst fcb09958bf
Update CODEOWNERS (#37)
Update CODEOWNERS in line with https://github.com/dapr/community/issues/248

Signed-off-by: Bernd Verst <github@bernd.dev>

Signed-off-by: Bernd Verst <github@bernd.dev>
2023-01-05 12:25:59 -08:00
Alessandro (Ale) Segala 73be7928f6
Updates: (#36)
1. Removed `github.com/pkg/errors` and replaced with the standard library (linter now rejects the old package)
2. Cron test: fixed race conditions and linting
3. Renamed `logger/default.go` to `logger/nop_logger.go` to match the name of the struct inside

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

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-05 12:12:21 -08:00
yellow chicks bcf6ee0931
feature: add context log (#21)
* feature: add context log

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

* feature: add context log

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

* feature: add context log

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

* feature: add context log

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

* feature: add context log

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

Signed-off-by: 1046102779 <seachen@tencent.com>
2022-12-11 09:36:11 -08:00
Alessandro (Ale) Segala b2486486ce
Port time utils from dapr/dapr (#35)
* Port time utils from dapr/dapr

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

* Bring linter version up-to-date with rest of Dapr

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

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-07 11:10:14 -08:00
Sarthak Sharma e74d7f7301
Fix failing test for cron on Windows (#33)
* fix cron tests for windows

Signed-off-by: Sarthak Sharma <sartsharma@microsoft.com>

* fix linting

Signed-off-by: Sarthak Sharma <sartsharma@microsoft.com>

* add license

Signed-off-by: Sarthak Sharma <sartsharma@microsoft.com>

* 💄

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

Signed-off-by: Sarthak Sharma <sartsharma@microsoft.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-07 11:09:50 -08:00
Sarthak Sharma cba48a6fe2
add cron fork (#31) 2022-12-01 12:22:46 -08:00
Alessandro (Ale) Segala a76999e29d
Added debug methods to retry (#28) 2022-11-21 15:06:39 -08:00
Alessandro (Ale) Segala 76dbc2afea
Upgraded backoff dependency to remove replace (#30)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-19 13:27:53 -08:00
Alessandro (Ale) Segala c4648551c9
Add NotifyRecoverWithData that returns data too (#29)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-18 14:42:24 -08:00
Crypt Keeper c213121f0b
Adds IsOutputLevelEnabled to allow wasm to opt-out of generating strings (#24)
* Adds IsOutputLevelEnabled to allow wasm to opt-out of generating strings

Allocation of log messages is expensive in WebAssembly. This exposes the
underlying IsLevelEnabled as IsOutputLevelEnabled. This will allow
request-scoped caching of this and help wasm filters avoid overhead
created for no reason.

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

* lint

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

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-11-01 21:50:11 -07:00
Alessandro (Ale) Segala 5a284d0d92
Bring in fswatcher from runtime (#26)
* Bring in fswatcher from dapr/dapr

Also improved batching and error handling, and added unit tests

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

* Fixed resetting batchCh and added test

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

* Added missing copyright header

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

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-31 11:04:07 -07:00
Alessandro (Ale) Segala ca65758d45
Added SetOutput method to logger (#25)
This is particularly useful when building tests

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

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-24 14:26:43 -07:00
yellow chicks ca4d40d89e
optimize(lint): repair lint error (#23)
Signed-off-by: 1046102779 <seachen@tencent.com>

Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-09 00:02:03 -07:00
Alessandro (Ale) Segala 272e358ba6
Added `WithFields` to Dapr logger (#22)
Allows adding structured fields to logs, for example:

```go
log.WithFields(map[string]any{"hello": "world"}).Info("my log")
```

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

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-09-30 11:26:01 -07:00
Alessandro (Ale) Segala 247f04d375
Added to package to convert to pointers (#18)
* Added to package to convert to pointers
Also updated deps and removed agrea/ptr

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-07-26 14:30:19 -04:00
Shubham Sharma 15a34b12af
Update fossa workflow's action version and trigger branches (#15)
* Pin fossa-action version

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update branch naming for workflow

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix lint step in GHA.

Signed-off-by: Artur Souza <artursouza.ms@outlook.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2022-04-20 16:57:22 -07:00
Shubham Sharma 3b069ad2b1
Add FOSSA workflow and badge (#14)
* Add FOSSA workflow and badge

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add condition

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2022-03-12 08:25:19 -05:00
Will 29c3d7dee5
Add DCO requirements and updated code of conduct (#13)
Issue reference: dapr/docs#2039

Signed-off-by: Will <william.wl.tsai@gmail.com>
2021-12-30 10:09:28 -05:00
Dmitry Shmulevich 867d7d9f3e
replace license headers (#12)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-12-09 12:03:02 -08:00
greenie-msft db8c68dfec
Update LICENSE to Apache 2.0 (#11) 2021-11-24 13:40:17 -05:00
Long Dai f4aa69116e
correct CODEOWNERS (#10)
Signed-off-by: Loong <loong.dai@intel.com>

Co-authored-by: Loong <loong.dai@intel.com>
2021-11-08 08:37:50 -08:00
Long Dai decb91c8af
ci: add lint config (#7)
Signed-off-by: Long Dai <long0dai@foxmail.com>
2021-08-09 10:39:38 -04:00
Phil Kedy b9074b64d2
Fix flaky retry test (#6)
* Fix flaky retry test

* Improving test coverage
2021-06-14 10:56:26 -07:00
Artur Souza 22e25fdb0f
Nit: add punctuation. (#5) 2021-06-02 19:17:35 -04:00
Long Dai ebde09e3ce
ci: add codecov (#4)
Signed-off-by: Long Dai <long0dai@foxmail.com>
2021-06-02 14:56:32 -04:00
Phil Kedy 1dda80ff3c
Moving the retry and config packages from components-contrib to kit. (#3) 2021-06-02 14:41:42 -04:00
Phil Kedy 6f1fbfeb04
Moved logger from dapr/dapr (#1)
* Moved logger from dapr/dapr

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
Co-authored-by: Sky/敖小剑 <aoxiaojian@gmail.com>
Co-authored-by: Joni Collinge
Co-authored-by: Jigar <jigarr.gandhi@gmail.com>
Co-authored-by: Ben Wells
Co-authored-by: yellow chicks <cdh_cjx@163.com>
2021-04-10 14:50:34 -04:00
Aaron Crawfis 93d6b9eb21
Initial commit 2021-04-09 14:37:44 -07:00