Skip to content

Commit

Permalink
Merge branch 'main' into attestation-entity-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreejit-K committed Apr 17, 2024
2 parents b3fc52c + 3ad4c3e commit 02fbc79
Show file tree
Hide file tree
Showing 1,542 changed files with 42,336 additions and 244,855 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/node_modules
**/build
**/build
**/dist
32 changes: 31 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
RELEASE_VERSION=v0.0.14
RELEASE_VERSION=v2.0.0-rc1
KEYCLOAK_SECRET=**********

# vault service
VAULT_ADDR=http://0.0.0.0:8200
VAULT_API_ADDR=http://0.0.0.0:8200
VAULT_ADDRESS=http://0.0.0.0:8200

# identity service
VAULT_ADDR=http://vault:8200
VAULT_TOKEN=
VAULT_BASE_URL=http://vault:8200/v1
VAULT_ROOT_PATH=http://vault:8200/v1/kv
VAULT_TIMEOUT=5000
VAULT_PROXY=false
SIGNING_ALGORITHM=Ed25519Signature2020
JWKS_URI=
ENABLE_AUTH=false
WEB_DID_BASE_URL=https://example.com/identifier

# credential schema service
IDENTITY_BASE_URL=http://identity:3332
JWKS_URI=
ENABLE_AUTH=false

# credential service
IDENTITY_BASE_URL=http://identity:3332
SCHEMA_BASE_URL=http://credential-schema:3333
CREDENTIAL_SERVICE_BASE_URL=https://example.com/credentials
JWKS_URI=
ENABLE_AUTH=false
31 changes: 21 additions & 10 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,34 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
cache: 'maven'
- name: Set up properties
run: sh configure-dependencies.sh
# # debug step
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie Sreejith-K
# limit-access-to-actor: true
# - name: Build and test
# run: make test
- name: Check space before free up the space
run: df -h
- name: Free up space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/.ghcup/ghc/9.6.4
- name: Check space before tests
run: df -h
# debug step
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie holashchand
# limit-access-to-actor: true
- name: Build and test
run: make test
- name: Check space after tests
run: df -h
# test:
# runs-on: ubuntu-latest
# steps:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,7 @@ coverage
out

.ipynb_checkpoints
db-data
db-data*
vault-data
es-data*
keycloak-mobile*.jar
12 changes: 0 additions & 12 deletions Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ node {


stage('Push image') {
docker.withRegistry('', 'dockerhub') {
docker.withRegistry('ghcr.io', 'sunbird-rc') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
}
docker.withRegistry('', 'dockerhub') {
docker.withRegistry('ghrc.io', 'sunbird-rc') {
claimApp.push("${env.BUILD_NUMBER}")
claimApp.push("latest")
}
Expand Down
56 changes: 29 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,61 +1,60 @@
#SOURCES = $(wildcard java/**/*.java)
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
SOURCES := $(call rwildcard,java/,*.java)
RELEASE_VERSION = v0.0.14
IMAGES := ghcr.io/sunbird-rc/sunbird-rc-core ghcr.io/sunbird-rc/sunbird-rc-nginx ghcr.io/sunbird-rc/sunbird-rc-context-proxy-service \
ghcr.io/sunbird-rc/sunbird-rc-public-key-service ghcr.io/sunbird-rc/sunbird-rc-keycloak ghcr.io/sunbird-rc/sunbird-rc-certificate-api \
ghcr.io/sunbird-rc/sunbird-rc-certificate-signer ghcr.io/sunbird-rc/sunbird-rc-notification-service ghcr.io/sunbird-rc/sunbird-rc-claim-ms \
ghcr.io/sunbird-rc/sunbird-rc-digilocker-certificate-api ghcr.io/sunbird-rc/sunbird-rc-bulk-issuance ghcr.io/sunbird-rc/sunbird-rc-metrics
RELEASE_VERSION = v2.0.0-rc1
IMAGES := ghcr.io/sunbird-rc/sunbird-rc-core ghcr.io/sunbird-rc/sunbird-rc-claim-ms \
ghcr.io/sunbird-rc/sunbird-rc-notification-service ghcr.io/sunbird-rc/sunbird-rc-metrics \
ghcr.io/sunbird-rc/id-gen-service ghcr.io/sunbird-rc/encryption-service \
ghcr.io/sunbird-rc/sunbird-rc-identity-service ghcr.io/sunbird-rc/sunbird-rc-credential-schema \
ghcr.io/sunbird-rc/sunbird-rc-credentials-service
build: java/registry/target/registry.jar
echo ${SOURCES}
rm -rf java/claim/target/*.jar
cd target && rm -rf * && jar xvf ../java/registry/target/registry.jar && cp ../java/Dockerfile ./ && docker build -t ghcr.io/sunbird-rc/sunbird-rc-core .
make -C java/claim
make -C services/certificate-api docker
make -C services/certificate-signer docker
make -C services/notification-service docker
make -C deps/keycloak build
make -C services/public-key-service docker
make -C services/context-proxy-service docker
make -C services/metrics docker
make -C services/digilocker-certificate-api docker
make -C services/bulk_issuance docker
docker build -t ghcr.io/sunbird-rc/sunbird-rc-nginx .
make -C services/id-gen-service docker
make -C services/encryption-service docker
make -C services/identity-service/ docker
make -C services/credential-schema docker
make -C services/credentials-service/ docker


java/registry/target/registry.jar: $(SOURCES)
echo $(SOURCES)
sh configure-dependencies.sh
cd java && ./mvnw clean install

test: build
@docker-compose down
@rm -rf db-data* || echo "no permission to delete"
@docker-compose -f docker-compose-v1.yml down
@sudo rm -rf db-data* es-data* || echo "no permission to delete"
# test with distributed definition manager and native search
@docker-compose --env-file test_environments/test_with_distributedDefManager_nativeSearch.env up -d db keycloak registry certificate-signer certificate-api redis
@docker-compose -f docker-compose-v1.yml --env-file test_environments/test_with_distributedDefManager_nativeSearch.env up -d db keycloak registry certificate-signer certificate-api redis
@echo "Starting the test" && sh build/wait_for_port.sh 8080
@echo "Starting the test" && sh build/wait_for_port.sh 8081
@docker-compose ps
@docker-compose -f docker-compose-v1.yml ps
@curl -v http://localhost:8081/health
@cd java/apitest && ../mvnw -Pe2e test
@docker-compose down
@rm -rf db-data-1 || echo "no permission to delete"
@docker-compose -f docker-compose-v1.yml down
@sudo rm -rf db-data-1 || echo "no permission to delete"
# test with kafka(async), events, notifications,
@docker-compose --env-file test_environments/test_with_asyncCreate_events_notifications.env up -d db clickhouse redis keycloak registry certificate-signer certificate-api kafka zookeeper notification-ms metrics
@docker-compose -f docker-compose-v1.yml --env-file test_environments/test_with_asyncCreate_events_notifications.env up -d db es clickhouse redis keycloak registry certificate-signer certificate-api kafka zookeeper notification-ms metrics
@echo "Starting the test" && sh build/wait_for_port.sh 8080
@echo "Starting the test" && sh build/wait_for_port.sh 8081
@docker-compose ps
@docker-compose -f docker-compose-v1.yml ps
@curl -v http://localhost:8081/health
@cd java/apitest && MODE=async ../mvnw -Pe2e test
@docker-compose down
@rm -rf db-data-2 || echo "no permission to delete"
make -C services/certificate-signer test
make -C services/public-key-service test
make -C services/context-proxy-service test
make -C services/bulk_issuance test
@docker-compose -f docker-compose-v1.yml down
@sudo rm -rf db-data-2 es-data-2 || echo "no permission to delete"
# make -C services/identity-service test
# make -C services/credential-schema test
# make -C services/credentials-service test

clean:
@rm -rf target || true
@rm java/registry/target/registry.jar || true

release: test
for image in $(IMAGES); \
do \
Expand All @@ -65,3 +64,6 @@ release: test
docker push $$image:$(RELEASE_VERSION);\
done
@cd tools/cli/ && npm publish

compose-init:
bash setup_vault.sh docker-compose.yml vault
31 changes: 28 additions & 3 deletions api-documentation/issue-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,30 @@ paths:
'appliation/json':
schema:
$ref: '#/components/schemas/verifyResponse'
/revocation-list:
/credentials/revocation-list:
get:
tags:
- Revocation
summary: Complete list of revoked credentials (Need to be discussed).
summary: Complete list of revoked credentials (Need to be discussed)
parameters:
- name: issuerId
in: query
description: The ID of the issuer
required: true
schema:
type: string
- name: page
in: query
description: The page number
required: true
schema:
type: string
- name: limit
in: query
description: The limit of items per page
required: true
schema:
type: string
responses:
200:
description: OK
Expand All @@ -197,7 +216,13 @@ paths:
schema:
type: array
items:
type: object
type: object
404:
description: Not Found
content: {}
500:
description: Error
content: {}
components:
schemas:
revokedResponse:
Expand Down
1 change: 1 addition & 0 deletions deps/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Keycloak moved to https://github.com/Sunbird-RC/sunbird-rc-keycloak

This file was deleted.

Binary file not shown.

This file was deleted.

7 changes: 0 additions & 7 deletions deps/keycloak-mobile-number-login-spi/Makefile

This file was deleted.

Loading

0 comments on commit 02fbc79

Please sign in to comment.