Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
feat: integrated GNAP auth flow
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Biriukov <anton.biriukov@avast.com>
  • Loading branch information
birtony committed Jul 12, 2022
1 parent 695c043 commit b9df1dd
Show file tree
Hide file tree
Showing 85 changed files with 3,086 additions and 3,690 deletions.
42 changes: 2 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Prettier:
name: Prettier Check
timeout-minutes: 5
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Run Wallet Web Prettier Check
run: |
echo '//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}' > ~/.npmrc
echo '@hyperledger:registry=https://npm.pkg.github.com' >> ~/.npmrc
echo '@trustbloc-cicd:registry=https://npm.pkg.github.com' >> ~/.npmrc
echo '@trustbloc:registry=https://npm.pkg.github.com' >> ~/.npmrc
make wallet-web-prettier-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

ESLint:
name: ESLint Check
timeout-minutes: 5
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Run Wallet Web ESLint Check
run: |
echo '//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}' > ~/.npmrc
echo '@hyperledger:registry=https://npm.pkg.github.com' >> ~/.npmrc
echo '@trustbloc-cicd:registry=https://npm.pkg.github.com' >> ~/.npmrc
echo '@trustbloc:registry=https://npm.pkg.github.com' >> ~/.npmrc
make wallet-web-eslint-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Checks:
runs-on: ubuntu-20.04
timeout-minutes: 30
Expand Down Expand Up @@ -131,19 +99,13 @@ jobs:
echo '127.0.0.1 testnet.orb.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 wallet.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 wallet-server.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 wallet-2.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 wallet-server-2.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 mediator.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 uni-resolver-web.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 auth.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 auth-hydra.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 demo-hydra.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 edv.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 authz-kms.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 edv-oathkeeper-proxy.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 ops-kms.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 oathkeeper-auth-keyserver.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 oathkeeper-ops-keyserver.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 kms.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 file-server.trustbloc.local' | sudo tee -a /etc/hosts
echo '127.0.0.1 demo-adapter.trustbloc.local' | sudo tee -a /etc/hosts
echo '//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}' > ~/.npmrc
Expand All @@ -162,7 +124,7 @@ jobs:
Publish:
name: Publish image
if: github.event_name == 'push' && (github.repository == 'trustbloc/wallet' && github.ref == 'refs/heads/main')
needs: [Prettier, ESLint, Checks, UnitTest, UIUnitTest, UIAutomation]
needs: [Checks, UnitTest, UIUnitTest, UIAutomation]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand Down
28 changes: 9 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,19 @@ export TERM := xterm-256color
.PHONY: all
all: clean checks unit-test automation-test

.PHONY: generate-test-keys
generate-test-keys:
@mkdir -p -p test/fixtures/keys/tls
@docker run -i --rm \
-v $(abspath .):/opt/workspace/wallet \
--entrypoint "/opt/workspace/wallet/scripts/generate_test_keys.sh" \
frapsoft/openssl

.PHONY: checks
checks: license lint

.PHONY: lint
lint:
lint: generate-test-keys
@scripts/check_lint.sh

.PHONY: license
Expand All @@ -46,16 +54,6 @@ wallet-web-test:
@set -e
@cd cmd/wallet-web && npm install && npm run test

.PHONY: wallet-web-prettier-check
wallet-web-prettier-check:
@set -e
@cd cmd/wallet-web && npm install && npm run prettier-check

.PHONY: wallet-web-eslint-check
wallet-web-eslint-check:
@set -e
@cd cmd/wallet-web && npm install && npm run lint

.PHONY: wallet-web
wallet-web:
@scripts/build_wallet_web.sh
Expand All @@ -78,14 +76,6 @@ wallet-server-docker:
--build-arg ALPINE_VER=$(ALPINE_VER) \
--build-arg GO_TAGS=$(GO_TAGS) .

.PHONY: generate-test-keys
generate-test-keys:
@mkdir -p -p test/fixtures/keys/tls
@docker run -i --rm \
-v $(abspath .):/opt/workspace/wallet \
--entrypoint "/opt/workspace/wallet/scripts/generate_test_keys.sh" \
frapsoft/openssl

.PHONY: generate-openapi-spec
generate-openapi-spec:
@echo "Generating and validating controller API specifications using Open API"
Expand Down
1 change: 1 addition & 0 deletions cmd/wallet-web/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/node_modules/**
dist/
public/agent-js-worker/
**/test/fixtures/keys/**
Loading

0 comments on commit b9df1dd

Please sign in to comment.