Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into error-message-schema-operations
  • Loading branch information
varadeth committed Jun 30, 2023
2 parents aa67ff9 + 90aae04 commit 87e32d2
Show file tree
Hide file tree
Showing 238 changed files with 11,588 additions and 2,730 deletions.
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RELEASE_VERSION = v0.0.13
IMAGES := dockerhub/sunbird-rc-core dockerhub/sunbird-rc-nginx dockerhub/sunbird-rc-context-proxy-service \
dockerhub/sunbird-rc-public-key-service dockerhub/sunbird-rc-keycloak dockerhub/sunbird-rc-certificate-api \
dockerhub/sunbird-rc-certificate-signer dockerhub/sunbird-rc-notification-service dockerhub/sunbird-rc-claim-ms \
dockerhub/sunbird-rc-digilocker-certificate-api dockerhub/sunbird-rc-bulk-issuance
dockerhub/sunbird-rc-digilocker-certificate-api dockerhub/sunbird-rc-bulk-issuance dockerhub/sunbird-rc-metrics
build: java/registry/target/registry.jar
echo ${SOURCES}
rm -rf java/claim/target/*.jar
Expand All @@ -17,9 +17,9 @@ build: java/registry/target/registry.jar
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
make -C services/digilocker-certificate-api docker
docker build -t dockerhub/sunbird-rc-nginx .

java/registry/target/registry.jar: $(SOURCES)
Expand Down Expand Up @@ -66,6 +66,22 @@ test: build
@cd java/apitest && MODE=async ../mvnw -Pe2e test || echo 'Tests failed'
@docker-compose down
@rm -rf db-data-4 || echo "no permission to delete"
@RELEASE_VERSION=latest KEYCLOAK_IMPORT_DIR=java/apitest/src/test/resources EVENT_ENABLED=true KEYCLOAK_SECRET=a52c5f4a-89fd-40b9-aea2-3f711f14c889 DB_DIR=db-data-5 SEARCH_PROVIDER_NAME=dev.sunbirdrc.registry.service.NativeSearchService docker-compose up -d db keycloak kafka zookeeper keycloak clickhouse registry certificate-signer certificate-api metrics 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
@curl -v http://localhost:8081/health
@cd java/apitest && MODE=events ../mvnw -Pe2e test || echo 'Tests failed'
@docker-compose down
@rm -rf db-data-5 || echo "no permission to delete"
@NOTIFICATION_URL=http://notification-ms:8765/notification-service/v1/notification TRACK_NOTIFICATIONS=true KAFKA_BOOTSTRAP_SERVERS=kafka:9092 NOTIFICATION_ENABLED=true NOTIFICATION_ASYNC_ENABLED=false RELEASE_VERSION=latest KEYCLOAK_IMPORT_DIR=java/apitest/src/test/resources KEYCLOAK_SECRET=a52c5f4a-89fd-40b9-aea2-3f711f14c889 DB_DIR=db-data-6 docker-compose up -d db es keycloak registry certificate-signer certificate-api notification-ms kafka
@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
@curl -v http://localhost:8081/health
@cd java/apitest && MODE=notification ../mvnw -Pe2e test || echo 'Tests failed'
@docker-compose down
@rm -rf db-data-6 || 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
Expand Down
89 changes: 52 additions & 37 deletions api-documentation/issue-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tags:
- name: Verifying
description: The following APIs are defined for verifying a Verifiable Credential
paths:
/credentials/claim:
/credentials/issue:
post:
tags:
- Issuing
Expand All @@ -46,40 +46,6 @@ paths:
description: error
content: {}
x-codegen-request-body-name: body
/credentials/sign:
post:
tags:
- Issuing
summary: Credential sign API
operationId: credentialSign
requestBody:
description: Credential payload
content:
'appliation/json':
schema:
allOf:
- type: object
properties:
credentialId:
type: string
example: credentialDID
description: Optional field, required if a claim is already made
- $ref: '#/components/schemas/credentialRequest'
required: true
responses:
201:
description: Credential successfully issued!
content:
'application/json':
schema:
$ref: '#/components/schemas/credentialResponse'
400:
description: Invalid Input
content: {}
500:
description: error
content: {}
x-codegen-request-body-name: body
/credentials/{id}:
get:
tags:
Expand Down Expand Up @@ -115,7 +81,7 @@ paths:
content:
'appliation/json':
schema:
$ref: '#/components/schemas/verifiableCredentialType'
$ref: '#/components/schemas/verifiableCredential'
401:
description: Not Authorized
content: {}
Expand Down Expand Up @@ -187,7 +153,7 @@ paths:
schema:
type: array
items:
$ref: '#/components/schemas/verifiableCredentialType'
$ref: '#/components/schemas/verifiableCredential'
401:
description: Not Authorized
content: {}
Expand Down Expand Up @@ -376,6 +342,55 @@ components:
credentialSubject:
type: object
properties: {}

verifiableCredential:
type: object
properties:
context:
type: array
items:
type: string
id:
type: string
type:
type: string
issuer:
type: object
properties: {}
issuanceDate:
type: string
format: date-time
expirationDate:
type: string
format: date-time
credentialSubject:
type: object
properties: {}
proof:
type: object
properties:
type:
type: string
created:
type: string
format: 'date-time'
challenge:
type: string
domain:
type: string
nonce:
type: string
verificationMethod:
type: string
proofPurpose:
type: string
jws:
type: string
proofValue:
type: string




securitySchemes:
Authorization:
Expand Down
40 changes: 37 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2.4"

services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.1
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
Expand Down Expand Up @@ -39,7 +39,11 @@ services:
- connectionInfo_uri=jdbc:postgresql://db:5432/registry
- connectionInfo_username=postgres
- connectionInfo_password=postgres
- event_enabled=${EVENT_ENABLED-false}
- event_topic=events
- event_providerName=dev.sunbirdrc.registry.service.impl.KafkaEventService
- elastic_search_connection_url=es:9200
- elastic_search_scheme=${ELASTIC_SEARCH_SCHEME-http}
- elastic_search_auth_enabled=${ELASTIC_SECURITY_ENABLED-false}
- elastic_search_username=${ELASTIC_SEARCH_USERNAME-elastic}
- elastic_search_password=${ELASTIC_SEARCH_PASSWORD}
Expand Down Expand Up @@ -74,6 +78,9 @@ services:
- redis_host=redis
- redis_port=6379
- manager_type=${MANAGER_TYPE-DefinitionsManager}
- notification_async_enabled=${NOTIFICATION_ASYNC_ENABLED-false}
- notification_enabled=${NOTIFICATION_ENABLED-false}
- notification_url=${NOTIFICATION_URL-http://notification-ms:8765/notification-service/v1/notification}
ports:
- "8081:8081"
depends_on:
Expand Down Expand Up @@ -185,6 +192,12 @@ services:
interval: 30s
timeout: 10s
retries: 10
environment:
- TRACK_NOTIFICATIONS=${TRACK_NOTIFICATIONS-false}
- KAFKA_BOOTSTRAP_SERVERS=${KAFKA_BOOTSTRAP_SERVERS-kafka:9092}
depends_on:
kafka:
condition: service_started
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
Expand All @@ -208,7 +221,7 @@ services:
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
healthcheck:
test:
[ "CMD", "kafka-topics", "--list", "--zookeeper", "zookeeper:2181" ]
[ "CMD", "kafka-topics", "--list", "--bootstrap-server", "localhost:9092" ]
interval: 30s
timeout: 10s
retries: 10
Expand Down Expand Up @@ -256,6 +269,21 @@ services:
interval: 30s
timeout: 10s
retries: 10
metrics:
image: dockerhub/sunbird-rc-metrics
environment:
CLICK_HOUSE_URL: clickhouse:9000
CLICKHOUSE_DATABASE: default
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
KAFKA_METRICS_TOPIC: events
REDIS_URL: redis:6379
ports:
- "8070:8070"
depends_on:
kafka:
condition: service_started
registry:
condition: service_healthy
redis:
image: redis:latest
ports:
Expand All @@ -278,4 +306,10 @@ services:
- "5665:5665"
environment:
REGISTRY_BASE_URL: http://registry:8081/
DATABASE_HOST: db
DATABASE_HOST: db
clickhouse:
image: clickhouse/clickhouse-server:23.4.2.11-alpine
ports:
- "9002:9000"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1
Loading

0 comments on commit 87e32d2

Please sign in to comment.