Skip to content

Commit

Permalink
Refactor Key Management in @web5/crypto and add `@web5/crypto-aws-k…
Browse files Browse the repository at this point in the history
…ms` (#360)

* Initial refactor to JOSE types and structure
* Add tests for public JSON canonicalize method
* Initial commit of Crypto API types
* Rename crypto-primitives to primitives
* Remove barrel files and move CryptoApi to types
* Refactor crypto API types
* Use TypeDoc @example
* Consistent usage of method parameters
* Update naming and documentation structure
* Bump @types/eslint to resolve duplicate error issue in @web5/crypto
* Add convertDerToCompactSignature method to Secp256k1
* Rename hash type and modify CryptoApi
* Bump deprecated sinon version
* Remove types from dependency that is no longer used
* Bump @noble dependencies
* Implement SHA-256 primitive
* Minor comment improvement
* Local KMS initial implementation
* AWS KMS initial implementation
* Bump default tsconfig from ES6 to ES2022
* Improve documentation and remove old implementation
* Bump @web5/crypto version
* Remove @web5/crypto-aws-kms from browser tests
* Remove unnecessary polyfill
* Fix missing crypto global
* Improve LevelStore and add tests for use with LocalKmsCrypto
* Initial README updates for crypto and crypto-aws-kms packages
* Remove node:crypto import from PBKDF2 now that web5-wallet polyfills webcrypto
* Improve cipher alg generateKey() and add RNG docs
* Mark Ed25519 and Secp256k1 key validation methods public

---------

Signed-off-by: Frank Hinek <[email protected]>
  • Loading branch information
frankhinek authored Jan 4, 2024
1 parent 3567f0e commit dbe2708
Show file tree
Hide file tree
Showing 134 changed files with 13,219 additions and 6,798 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/alpha-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

env:
# Packages not listed here will be excluded from publishing
PACKAGES: "agent api common credentials crypto dids identity-agent proxy-agent user-agent"
PACKAGES: "agent api common credentials crypto crypto-aws-kms dids identity-agent proxy-agent user-agent"

steps:
- name: Checkout source
Expand All @@ -32,7 +32,7 @@ jobs:
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'npm'
cache: "npm"

# Note - this is not required but it gives a clean failure prior to attempting a release if
# the GH workflow runner is not authenticated with NPMjs.com
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
"common",
"credentials",
"crypto",
"crypto-aws-kms",
"dids",
"identity-agent",
"proxy-agent",
Expand All @@ -44,7 +45,7 @@ jobs:
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'npm'
cache: "npm"

- name: Install semver utility
run: npm install -g [email protected]
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
private-key: ${{ secrets.CICD_ROBOT_GITHUB_APP_PRIVATE_KEY }}
owner: TBD54566975
repositories: sdk-development

- name: Trigger sdk-development report build
if: github.ref == 'refs/heads/main'
run: |
Expand All @@ -96,7 +96,6 @@ jobs:
env:
APP_TOKEN: ${{ steps.generate_token.outputs.token }}


test-with-browsers:
name: test-with-browsers (group ${{ matrix.group }})
# Run browser tests using macOS so that WebKit tests don't fail under a Linux environment
Expand All @@ -106,7 +105,7 @@ jobs:
matrix:
include:
- group: "A"
packages: "--workspace packages/agent --workspace packages/dids "
packages: "--workspace packages/agent --workspace packages/dids"
- group: "B"
packages: "--workspace packages/common --workspace packages/crypto --workspace packages/credentials --workspace packages/user-agent --workspace packages/proxy-agent --workspace packages/api --workspace packages/identity-agent"
steps:
Expand Down
12 changes: 8 additions & 4 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ component_management:
target: 90 # every PR opened should strive for at least 90% coverage

individual_components:
- component_id: package-agent
name: agent
paths: ["packages/agent/**"]

- component_id: package-api
name: api
paths: ["packages/api/**"]
Expand All @@ -31,14 +35,14 @@ component_management:
name: dids
paths: ["packages/dids/**"]

- component_id: package-agent
name: agent
paths: ["packages/agent/**"]

- component_id: package-identity-agent
name: identity-agent
paths: ["packages/identity-agent/**"]

- component_id: package-crypto-aws-kms
name: crypto-aws-kms
paths: ["packages/crypto-aws-kms/**"]

- component_id: package-proxy-agent
name: proxy-agent
paths: ["packages/proxy-agent/**"]
Expand Down
Loading

0 comments on commit dbe2708

Please sign in to comment.