Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add integration test for aid to join multisig #255

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3fbed62
add test for multisig join
daviddm Feb 23, 2024
b09a6e3
Update documentation
github-actions[bot] Aug 24, 2023
6ca8feb
Multisig test of credential revocation. Several fixes to revocation …
pfeairheller Feb 25, 2024
ef907ac
prettier
pfeairheller Feb 25, 2024
b0ce919
Fix credentials test broken from revoke return.
pfeairheller Feb 26, 2024
c7bbb15
Rev version number
pfeairheller Feb 26, 2024
19b326d
Add method to rename registry (#232)
Arsh-Sandhu Mar 8, 2024
7c21393
chore: upgrade math.js
lenkan Feb 24, 2024
be3630a
simplify prettier setup (#223)
lenkan Mar 1, 2024
35be94f
fix: remove urlsafe-base64 dependency (#218)
lenkan Mar 11, 2024
c3ea695
update to newer role name (#238)
2byrds Mar 28, 2024
eb4030b
fix: cannot set salts for credential creation (suggestion) (#222)
lenkan Mar 28, 2024
a7f4462
URL enconding of AID alias name in rest calls (#233)
rodolfomiranda Apr 3, 2024
7e64a5c
add integration test for multisig vlei (#207)
nkongsuwan Apr 5, 2024
9c1fd06
use named imports from mathjs to reduce bundle size (#235)
lenkan Apr 8, 2024
004348d
Update main.yml (#247)
m00sey Apr 11, 2024
e3a1c70
add integration test matrix for keria version (#245)
lenkan Apr 11, 2024
288dbbe
fix flaky integration test (#244)
lenkan Apr 11, 2024
ca69726
Update randomPasscode to return 21 characters (#243)
lenkan Apr 12, 2024
743bb9c
update keria test matrix to only use latest for now (#249)
lenkan Apr 12, 2024
9b7dd84
feat: method waiting for long running operation (#236)
lenkan Apr 12, 2024
b48ddcc
Fix docs publishing (#250)
lenkan Apr 13, 2024
4959e33
add integration test for aid to join multisig
daviddm Apr 30, 2024
80432e3
add waitoperation
lenkan May 6, 2024
6b514c3
move waitOperation of join to before asserts for multisig join
daviddm May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,34 @@ jobs:
run: npm run build

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test:
name: Run integration test
runs-on: ubuntu-latest
name: Run integration test using keria:${{ matrix.keria-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
keria-version: ['latest']
node-version: ['20']
env:
KERIA_IMAGE_TAG: ${{ matrix.keria-version }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: install deps
run: npm ci
- name: Build
run: npm run build
- name: Print docker compose config
run: docker compose config
- name: Start dependencies
run: docker compose up deps --pull always
- name: Run integration test
Expand Down
55 changes: 32 additions & 23 deletions .github/workflows/update-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,44 @@ on:
branches:
- 'main'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
update:
name: Updater documentation
build:
name: Build docs

runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18.12.1'
cache: 'npm'

- name: build
node-version: "20"
cache: "npm"
- name: Install dependencies
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout docs
npm cache clean --force
npm set registry https://registry.npmjs.org/
npm i
npx typedoc src/index.ts
git add .
git commit -a -m "Update documentation"

- name: Push changes
uses: ad-m/github-push-action@master
npm ci
- name: Build documentation
run: npx typedoc src/index.ts
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
path: ./docs

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 2 additions & 4 deletions .jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"includePattern": ".ts$",
"excludePattern": "(node_modules/|docs|dist|examples|test)"
},
"plugins": [
"plugins/markdown"
],
"plugins": ["plugins/markdown"],
"templates": {
"cleverLinks": false,
"monospaceLinks": true,
Expand All @@ -24,4 +22,4 @@
"recurse": true,
"template": "./node_modules/minami"
}
}
}
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
diagrams/
docs/
package.json
package-lock.json
.github/
12 changes: 6 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 4
}
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 4
}
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Project Name: signify-ts

## Signify - KERI Signing at the Edge

Of the five functions in a KERI agent,
Of the five functions in a KERI agent,

1. Key generation
2. Encrypted key storage
Expand All @@ -19,20 +19,18 @@ Of the five functions in a KERI agent,

Signify-TS splits off two, key generation and event signing into a TypeScript library to provide "signing at the edge".
It accomplishes this by using [libsodium](https://doc.libsodium.org/) to generate ed25519 key pairs for signing and x25519 key pairs for encrypting the
private keys, next public keys and salts used to generate the private keys. The encrypted private key and salts are then stored on a
remote cloud agent that never has access to the decryption keys. New key pair sets (current and next) will be generated
private keys, next public keys and salts used to generate the private keys. The encrypted private key and salts are then stored on a
remote cloud agent that never has access to the decryption keys. New key pair sets (current and next) will be generated
for inception and rotation events with only the public keys and blake3 hash of the next keys made available to the agent.

The communication protocol between a Signify client and [KERI](https://github.com/WebOfTrust/keri) agent will encode all cryptographic primitives as CESR base64
encoded strings for the initial implementation. Support for binary CESR can be added in the future.

encoded strings for the initial implementation. Support for binary CESR can be added in the future.

### Environment Setup

The code is built using Typescript and running code locally requires a Mac or Linux OS.

- Install [Node.js](https://nodejs.org)

- Install [Node.js](https://nodejs.org)

- Install dependencies:
```bash
Expand Down Expand Up @@ -77,6 +75,22 @@ signify-ts-deps-1 | Dependencies running
signify-ts-deps-1 exited with code 0
```

It is possible to change the keria image by using environment variables. For example, to use weboftrust/keria:0.1.3, do:

```bash
export KERIA_IMAGE_TAG=0.1.3
docker compose pull
docker compose up deps
```

To use another repository, you can do:

```bash
export KERIA_IMAGE=gleif/keria
docker compose pull
docker compose up deps
```

**Important!** The integration tests runs on the build output in `dist/` directory. Make sure to run build before running the integration tests.

```bash
Expand All @@ -103,19 +117,10 @@ TEST_ENVIRONMENT=local npx jest examples/integration-scripts/credentials.test.ts

This changes the discovery urls to use `localhost` instead of the hostnames inside the docker network.

### Old integration scripts

To run any of the old integration scripts that has not yet been converted to an integration test. Use `ts-node-esm`

```bash
npx ts-node-esm examples/integration-scripts/challenge.ts
```

# Diagrams

Account Creation Workflow

![Account Creation](/diagrams/account-creation-workflow.png)


![Account Creation Webpage](/diagrams/account-creation-webpage-workflow.png)
18 changes: 9 additions & 9 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
coverage:
status:
project:
default:
target: 55
paths: ["src"]
patch:
default:
target: 75
paths: ["src"]
status:
project:
default:
target: 55
paths: ['src']
patch:
default:
target: 75
paths: ['src']
20 changes: 9 additions & 11 deletions config/keria.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"dt": "2023-12-01T10:05:25.062609+00:00",
"keria": {
"dt": "2023-12-01T10:05:25.062609+00:00",
"curls": [
"http://keria:3902/"
]
"dt": "2023-12-01T10:05:25.062609+00:00",
"curls": ["http://keria:3902/"]
},
"iurls": [
"http://witness-demo:5642/oobi/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha/controller",
"http://witness-demo:5643/oobi/BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM/controller",
"http://witness-demo:5644/oobi/BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX/controller",
"http://witness-demo:5645/oobi/BM35JN8XeJSEfpxopjn5jr7tAHCE5749f0OobhMLCorE/controller",
"http://witness-demo:5646/oobi/BIj15u5V11bkbtAxMA7gcNJZcax-7TgaBMLsQnMHpYHP/controller",
"http://witness-demo:5647/oobi/BF2rZTW79z4IXocYRQnjjsOuvFUQv-ptCf8Yltd7PfsM/controller"
"http://witness-demo:5642/oobi/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha/controller",
"http://witness-demo:5643/oobi/BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM/controller",
"http://witness-demo:5644/oobi/BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX/controller",
"http://witness-demo:5645/oobi/BM35JN8XeJSEfpxopjn5jr7tAHCE5749f0OobhMLCorE/controller",
"http://witness-demo:5646/oobi/BIj15u5V11bkbtAxMA7gcNJZcax-7TgaBMLsQnMHpYHP/controller",
"http://witness-demo:5647/oobi/BF2rZTW79z4IXocYRQnjjsOuvFUQv-ptCf8Yltd7PfsM/controller"
]
}
}
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- 7723:7723

keria:
image: weboftrust/keria:latest
image: ${KERIA_IMAGE:-weboftrust/keria}:${KERIA_IMAGE_TAG:-latest}
environment:
- KERI_AGENT_CORS=1
- KERI_URL=http://keria:3902
Expand Down
1 change: 0 additions & 1 deletion docs/.nojekyll

This file was deleted.

43 changes: 0 additions & 43 deletions docs/assets/highlight.css

This file was deleted.

58 changes: 0 additions & 58 deletions docs/assets/main.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/search.js

This file was deleted.

Loading