-
Notifications
You must be signed in to change notification settings - Fork 106
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
Feat: Credential Service #217
Feat: Credential Service #217
Conversation
Signed-off-by: Yash Mittal <mittal.yash12@hotmail.com> Feat: Add credentials-service Signed-off-by: Yash Mittal <mittal.yash12@hotmail.com>
Signed-off-by: Yash Mittal <mittal.yash12@hotmail.com>
Signed-off-by: Yash Mittal <mittal.yash12@hotmail.com>
CREATE TYPE "VCStatus" AS ENUM ('PENDING', 'ISSUED', 'REVOKED'); | ||
|
||
-- CreateTable | ||
CREATE TABLE "VC" ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this for storing credential schema?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This table has been deprecated and will be removed. Initially it was meant to store the issued credentials in the postgres db associated with the credentials service.
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "VCV2" ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this table used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the APIs are not connected with the registry right now, so we have a postgres instance associated wih the credential service to save the issued credentials in the postgres instance. This table stores those credentials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to fix the table name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will rename this to "VerifiableCredentials".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these fixed? @techsavvyash
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Counter" ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use SERIAL
pseudo-type
Hey @tejash-jl, cc: @ChakshuGautam |
remove commented codes |
integrate e2e test to the top level Makefile |
@techsavvyash you would need to document about this service here,
|
Create e2e tests for all v2 APIs |
feat: Add targets for credentials service
Makefile
Outdated
@@ -41,16 +43,16 @@ test: build | |||
@echo "Starting the test" && sh build/wait_for_port.sh 8081 | |||
@docker-compose ps | |||
@curl -v http://localhost:8081/health | |||
@cd java/apitest && ../mvnw -Pe2e test || echo 'Tests failed' | |||
@cd java/apitest && ../mvnw -Pe2e test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the tests failure message as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the services will throw an error and fail the test
target if any test fails with the test report. Adding an '||condition will not fail the Makefile's
test` target, probably.
@@ -223,7 +223,7 @@ Feature: Registry api tests | |||
When method post | |||
Then status 200 | |||
And response.result.Teacher.transactionId.length > 0 | |||
* sleep(3000) | |||
* sleep(7000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happened due to one of the rebase probably, undid all these changes.
@@ -468,10 +468,10 @@ Feature: Registry api tests | |||
And response.params.errmsg == "Schema 'Teacher1' not found" | |||
# patch unavailable schema with sign | |||
Given url registryUrl | |||
And path '/api/v1/Teacher/sign' | |||
And path '/api/v1/Teacher1/sign' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved to original
And header Authorization = admin_token | ||
And request read('TeacherRequest.json') | ||
When method patch | ||
When method get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted to original
} | ||
}); | ||
|
||
// it('should show a stremable file', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks
import { Extensible } from "did-resolver"; | ||
|
||
|
||
// class Credential implements W3CCredential { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented Code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks
@@ -50,7 +48,7 @@ services: | |||
VAULT_ADDR: "http://vault:8200" | |||
# This will be replaced automatically on initialisation | |||
# make compose-init will call setup_vault.sh | |||
VAULT_TOKEN: hvs.ZBCv64FQYZibBmfa6cgcc8ls | |||
VAULT_TOKEN: hvs.ANn8uBxHYvRCv5Q3FXuqzoIG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move these to .env file.
Moving to vault token to |
Description
This PR contains the actual code for the Credential service unlike the previous PR which was submodules based.