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

Feature/attribute succession #128

Merged
merged 117 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 88 commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
743354b
chore: bump runtime dependency
J-Gann Dec 5, 2023
f3d39f4
fix: update createAttribute to use new runtime use case
J-Gann Dec 5, 2023
52c1933
feat: wip add endpoints to coreHttp
J-Gann Dec 5, 2023
f71879a
feat: wip yaml defintion
J-Gann Dec 5, 2023
c2590ec
feat: update sdk
J-Gann Dec 5, 2023
097ce42
fix: existing tests
J-Gann Dec 5, 2023
cfdabd1
fix: build workspaces
J-Gann Dec 5, 2023
2d9af1f
chore: comment outdated test
J-Gann Dec 5, 2023
149decf
fix: typo
J-Gann Dec 5, 2023
af22a47
test: identity attribute succession
J-Gann Dec 5, 2023
584eb69
chore: implement succeedIdentityAttribute endpoint and openapi spec
slavistan Dec 7, 2023
f0483b8
chore: implement succeedRelationship... endpoint and openapi spec
slavistan Dec 7, 2023
130c0eb
wip;
slavistan Dec 12, 2023
6028bd8
wip
J-Gann Dec 12, 2023
e9ad0a0
wip
J-Gann Dec 12, 2023
0d3a7ca
wip
J-Gann Dec 12, 2023
13daa8f
chore: move confidentiality into schema
slavistan Dec 18, 2023
88d89b2
chore: add todos
slavistan Dec 18, 2023
a687a37
fix: allow additional properties for attribute values
slavistan Dec 18, 2023
e4f6a69
chore: openapi: finish CreateAndShareRelationshipAttribute
slavistan Dec 18, 2023
3195d1d
chore: add todo
slavistan Dec 18, 2023
ffeb0d1
fix: typo
slavistan Dec 18, 2023
6354520
chore: minor
slavistan Dec 18, 2023
a8e2f26
chore: openapi: finish CreateIdentityAttribute
slavistan Dec 18, 2023
dbf5a19
chore: use dedicated schema for request
slavistan Dec 18, 2023
600770b
chore: openapi: finish shareidentityattribute
slavistan Dec 18, 2023
1aea115
openapi: finish succeedIdentityAttribute
slavistan Dec 18, 2023
6f5a1f0
chore: openapi: finish notifypeer.....
slavistan Dec 18, 2023
fb3599b
chore: openapi: finish succeedattribute
slavistan Dec 18, 2023
ecc5d98
chore: openapi: finish createAttribute
slavistan Dec 18, 2023
821097e
chore: remote any remains of shareAttribute
slavistan Dec 18, 2023
335ce87
chore: refactor valid{From,To} using a schema
slavistan Dec 18, 2023
482975e
chore: add todos
slavistan Dec 18, 2023
813ce89
chore: reorder fields
slavistan Dec 18, 2023
93aabd2
chore: remove comment
slavistan Dec 18, 2023
f875d54
chore: remove comment
slavistan Dec 18, 2023
6d0344a
wip
J-Gann Dec 19, 2023
c449907
wip;
slavistan Dec 19, 2023
ab7a9e9
chore: update lockfile
jkoenig134 Dec 19, 2023
fae1b4d
ci: run on local backbone
jkoenig134 Dec 19, 2023
6fde0bb
chore: bump libs
jkoenig134 Dec 19, 2023
3fb84c3
fix: test compiler errors
jkoenig134 Dec 19, 2023
fb7664d
wip
J-Gann Dec 19, 2023
e86545b
fix: iql
J-Gann Dec 19, 2023
eeb5b34
fix: tests
J-Gann Dec 19, 2023
5a3018e
wip review
J-Gann Dec 19, 2023
975d209
fix: paths
J-Gann Dec 19, 2023
d460bf8
chore: bump sdk to 2.3.0
J-Gann Dec 19, 2023
04f282c
fix: legacy createAttribute @type property
J-Gann Dec 19, 2023
96750d0
add todo
J-Gann Dec 19, 2023
3033770
chore: use more narrow types in sdk requests
slavistan Dec 20, 2023
c9d5810
chore: bump (correct) version
slavistan Dec 20, 2023
9a0158d
chore: changelog
slavistan Dec 20, 2023
32c04fd
chore: changelog
slavistan Dec 20, 2023
34d3d74
fix: deal with possibly undefined request content
slavistan Dec 20, 2023
076e687
chore: bump dependencies
slavistan Dec 20, 2023
48d6ddb
fix: handle possibly undefined requests
slavistan Dec 20, 2023
213dcfb
fix: correct sdk version
slavistan Dec 20, 2023
0c8a407
chore: slight change in wording
slavistan Dec 20, 2023
337552f
Chore/local backbone for tests (#127)
jkoenig134 Jan 10, 2024
57c3698
implement createRepositoryAttribute route
slavistan Jan 23, 2024
815b928
draft attribute succession route
slavistan Jan 23, 2024
cd0e6ed
Merge branch 'feature/attribute-succession' of github.com:nmshd/cns-c…
slavistan Jan 23, 2024
9b574b8
draft notify... route
slavistan Jan 23, 2024
1e057eb
remote obsolete routes and schemas
slavistan Jan 23, 2024
4ceb26f
adjust sdk to new routes
slavistan Jan 23, 2024
b9650b9
fix npm command name
slavistan Jan 23, 2024
7fe20a8
comment out broken tests; WIP
slavistan Jan 23, 2024
76b966f
add prefix for notification
sebbi08 Jan 23, 2024
e49a0d2
delete obsolete request files
slavistan Jan 24, 2024
cf16076
wip
slavistan Jan 24, 2024
bf68641
test: repository attriubte succeeding
sebbi08 Jan 25, 2024
d116761
add test for succeeding and sharing an repository attribute
sebbi08 Jan 25, 2024
670be2f
add notificationReference to shareInfo type
slavistan Jan 25, 2024
e1903fb
refactor: use proper union type for share info
slavistan Jan 25, 2024
dee1871
disable auto run in jest extension
sebbi08 Jan 25, 2024
ddfaca7
chore: remote todo; add to comment
slavistan Jan 25, 2024
1bec00a
Merge branch 'feature/attribute-succession' of github.com:nmshd/cns-c…
slavistan Jan 25, 2024
f5fe9ee
chore: update deps
slavistan Jan 25, 2024
652d8aa
fix: fix openapi payload declaration
slavistan Jan 25, 2024
0f41689
chore: remove answered questions
slavistan Jan 25, 2024
c5c48ea
chore: exclude vulnerabilities
slavistan Jan 25, 2024
829efaf
Merge branch 'main' into feature/attribute-succession
slavistan Jan 25, 2024
43b4c5c
chore: fix formatting
slavistan Jan 25, 2024
ee4ef57
chore: use sqlite for local testing
jkoenig134 Jan 25, 2024
7fb621e
chore: bump actions
jkoenig134 Jan 25, 2024
c96ce8d
chore: ferret -> ferretdb
jkoenig134 Jan 25, 2024
128c51f
chore: remove accidentally committed postgres ferret
jkoenig134 Jan 25, 2024
84aa039
remove dependency to postgress for ferret
sebbi08 Jan 25, 2024
4b1217c
fix: naming in script
jkoenig134 Jan 25, 2024
d7d692f
Merge branch 'feature/attribute-succession' of github.com:nmshd/cns-c…
jkoenig134 Jan 25, 2024
94192cc
docs: list attribute succession routes in changelog
slavistan Jan 25, 2024
1f1a2a8
chore: rename CreateIdentityAttributeRequest to CreateRepositoryAttri…
sebbi08 Jan 30, 2024
8c1b1a2
fix: throw error when owner of attribute != own adress
sebbi08 Jan 30, 2024
f27c86d
test: add test for succeeded attributes
sebbi08 Jan 31, 2024
6c25ce1
chore: rename result to response
sebbi08 Jan 31, 2024
0cb0cf9
Merge branch 'main' into feature/attribute-succession
sebbi08 Jan 31, 2024
43a421f
test: make tests more roubust
sebbi08 Jan 31, 2024
0970274
chore: readd axios
sebbi08 Jan 31, 2024
57fe1cc
chore: improve imports
sebbi08 Jan 31, 2024
277e3ee
Update package.json
sebbi08 Jan 31, 2024
40517fc
docu: improve change log
sebbi08 Jan 31, 2024
b2aab8e
chore: change typos and wording
sebbi08 Feb 1, 2024
3029e9e
doc: fix grammar
slavistan Feb 5, 2024
dd9ff35
Merge branch 'main' into feature/attribute-succession
sebbi08 Feb 5, 2024
5de99b3
chore: bump runtime
jkoenig134 Feb 6, 2024
5eaa890
chore: upgrade nodejs to 20.11.0
jkoenig134 Feb 6, 2024
78a410f
fix: use correct response code for post
sebbi08 Feb 6, 2024
00d03a8
chore: make IQLQuery type optional again
sebbi08 Feb 6, 2024
8fdee81
fix: properly define IQLQuery
jkoenig134 Feb 6, 2024
d184e28
chore: update tests
jkoenig134 Feb 6, 2024
d76f8ff
chore: update changelog
jkoenig134 Feb 6, 2024
9704e26
chore: bump pubsub
jkoenig134 Feb 6, 2024
e82957a
chore: formatting
jkoenig134 Feb 6, 2024
57d1223
fix: undo accidentally committed stuff
jkoenig134 Feb 6, 2024
1b1a841
chore: update runtime
sebbi08 Feb 8, 2024
2ce115d
chore: Merge branch 'main' into feature/attribute-succession
slavistan Feb 12, 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
2 changes: 1 addition & 1 deletion .ci/runChecks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ npm run lint:prettier

# auditing
npx license-check --ignoreRegex @nmshd/connector
npx better-npm-audit audit --exclude 1093639
npx better-npm-audit audit --exclude 1093639,1096291
102 changes: 102 additions & 0 deletions .dev/appsettings.override.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"Infrastructure": {
"EventBus": {
"Vendor": "RabbitMQ",
"ConnectionInfo": "rabbitmq",
"RabbitMQUsername": "guest",
"RabbitMQPassword": "guest",
"ConnectionRetryCount": 5
},
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User Id=adminUi;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
},
"Modules": {
"Challenges": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=challenges;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
}
},
"Quotas": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=quotas;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
}
},
"Devices": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=devices;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
},
"PushNotifications": {
"Provider": "Dummy"
}
}
},
"Files": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=files;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
},
"BlobStorage": {
"CloudProvider": "Azure",
"ConnectionInfo": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;"
}
}
},
"Messages": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=messages;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
}
},
"Relationships": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=relationships;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
}
},
"Synchronization": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=synchronization;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
}
},
"Tokens": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=tokens;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
}
}
},
"Serilog": {
"MinimumLevel": {
"Default": "Debug"
},
"Enrich": ["FromLogContext", "WithProcessId", "WithThreadId"],
"WriteTo": [
{
"Name": "Console",
"Args": {
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff}|{Level} - CorrelationId:{CorrelationId} - RequestId:{RequestId} - RequestPath:{RequestPath}{NewLine} {SourceContext}{NewLine} {Message}{NewLine}{Exception}"
}
}
]
}
}
1 change: 1 addition & 0 deletions .dev/compose.backbone.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONSUMERAPI_TAG=v4.2.6
79 changes: 79 additions & 0 deletions .dev/compose.backbone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
services:
consumer-api:
image: ghcr.io/nmshd/backbone-consumer-api:${CONSUMERAPI_TAG}
container_name: consumer-api
hostname: consumer-api
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "8090:8080"
depends_on:
database:
condition: service_started
rabbitmq:
condition: service_started
seed-database:
condition: service_completed_successfully
azure-storage-emulator:
condition: service_started
configs:
- source: Config
target: app/appsettings.override.json

### infrastructure ###

database:
container_name: bkb-postgres
hostname: postgres
image: postgres
environment:
- POSTGRES_PASSWORD=Passw0rd
- POSTGRES_DB=enmeshed
ports:
- 5432:5432
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5

azure-storage-emulator:
container_name: azure-storage-emulator
hostname: azurite
image: mcr.microsoft.com/azure-storage/azurite
command: azurite -d /data/debug.log -l /data --blobHost "0.0.0.0" --queueHost "0.0.0.0"
ports:
- "10000:10000"

rabbitmq:
container_name: bkb-rabbitmq
hostname: rabbitmq
image: rabbitmq:3.12.10-management-alpine
ports:
- "5672:5672"

### seeds ###

seed-database:
image: postgres
environment:
- PGPASSWORD=Passw0rd
command: /bin/bash -c 'env && apt update -y && apt install -y wget && wget https://raw.githubusercontent.com/nmshd/backbone/capi/${CONSUMERAPI_TAG}/setup-db/setup-postgres.sql -O /setup-postgres.sql && psql -h postgres -U postgres -d enmeshed -f /setup-postgres.sql'
depends_on:
database:
condition: service_healthy

seed-client:
container_name: seed-client
image: ghcr.io/nmshd/backbone-admin-cli:v2.2.1
depends_on:
consumer-api:
condition: service_healthy
command: backbone client create --clientId test --clientSecret test --defaultTier Basic
environment:
Database__Provider: Postgres
Database__ConnectionString: "Server=postgres;Database=enmeshed;User Id=devices;Password=Passw0rd;Port=5432"

configs:
Config:
file: appsettings.override.json
14 changes: 9 additions & 5 deletions .dev/scripts/prepareDevEnvironment.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
if ! type "socat" > /dev/null; then
sudo apt-get install socat
if type "apt-get" > /dev/null; then
sudo apt-get install socat
fi

if type "brew" > /dev/null; then
brew install socat
fi
fi

if ! type "docker" > /dev/null; then
echo "docker not found"
exit 1
fi

if ! type "tsc" > /dev/null; then
npm i -g typescript
fi
npm i -g typescript cpx

code --install-extension actboy168.tasks
code --install-extension actboy168.tasks
3 changes: 0 additions & 3 deletions .dev/scripts/testSetup.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .dev/scripts/testSetupFerret.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .dev/scripts/testTeardown.sh

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/artifact-repo-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
upload-artifact-repo-config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install oras
run: |
curl -L https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_amd64.tar.gz -o oras.tar.gz
tar -xzf oras.tar.gz oras
sudo mv oras /usr/local/bin
rm oras.tar.gz
- name: Docker Login
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: javascript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: javascript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
16 changes: 8 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
run-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: bash .ci/runChecks.sh

publish-npm:
Expand All @@ -17,8 +17,8 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
Expand All @@ -35,17 +35,17 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Docker Login
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- run: bash .ci/buildAndPush.sh
env:
BUILD_NUMBER: ${{ github.run_number }}
Expand All @@ -58,7 +58,7 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading
Loading