Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
signer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaia-X
Trust Services API
signer
Commits
d98e7dd8
Commit
d98e7dd8
authored
1 year ago
by
Lyuben Penkovski
Browse files
Options
Downloads
Patches
Plain Diff
Fix failing unit tests because of unresolvable external jsonld context
parent
3e50e95f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+7
-6
7 additions, 6 deletions
README.md
internal/service/signer/service_test.go
+9
-4
9 additions, 4 deletions
internal/service/signer/service_test.go
with
16 additions
and
10 deletions
README.md
+
7
−
6
View file @
d98e7dd8
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
# signer
# signer
Signer service exposes HTTP API to create
s proofs for v
erifiable
c
redentials
Signer service exposes HTTP API to create
V
erifiable
C
redentials
, Verifiable
and verifiable presentations
. It exposes additional endpoints
for retrieving
Presentations, or add proofs to given VC or VP
. It exposes additional endpoints
public keys necessary for proofs verification.
for retrieving
public keys necessary for proofs verification.
It is developed using the
[
Goa v3
](
https://goa.design/
)
framework.
It is developed using the
[
Goa v3
](
https://goa.design/
)
framework.
...
@@ -27,8 +27,8 @@ flowchart LR
...
@@ -27,8 +27,8 @@ flowchart LR
```
```
### Signing Key
### Signing Key
The service uses Vault for making digital signatures on proofs. When a client
The service uses
Hashicorp
Vault for making digital signatures on proofs. When a client
requests a proof, it
can
specify the name of the signing key to be used. If no
requests a proof, it
must
specify the name of the signing key to be used. If no
key is specified by the client, the signer service will use a default preconfigured
key is specified by the client, the signer service will use a default preconfigured
key name to make the proof.
key name to make the proof.
...
@@ -50,7 +50,8 @@ VAULT_SUPPORTED_KEYS="ed25519,ecdsa-p256"
...
@@ -50,7 +50,8 @@ VAULT_SUPPORTED_KEYS="ed25519,ecdsa-p256"
> Check out Hashicorp Vault docs for all [supported key types](https://www.vaultproject.io/api-docs/secret/transit#type-1)
> Check out Hashicorp Vault docs for all [supported key types](https://www.vaultproject.io/api-docs/secret/transit#type-1)
> by Vault Transit Engine. Keep in mind, that not all Vault key types may be supported
> by Vault Transit Engine. Keep in mind, that not all Vault key types may be supported
> by the Aries framework signature suites and the signer service.
> by the Aries framework signature suites and the signer service. Most keys we have
> tested with are ECDSA.
### Public Keys
### Public Keys
...
...
This diff is collapsed.
Click to expand it.
internal/service/signer/service_test.go
+
9
−
4
View file @
d98e7dd8
...
@@ -9,6 +9,7 @@ import (
...
@@ -9,6 +9,7 @@ import (
"fmt"
"fmt"
"net/http"
"net/http"
"testing"
"testing"
"time"
"github.com/hyperledger/aries-framework-go/pkg/doc/verifiable"
"github.com/hyperledger/aries-framework-go/pkg/doc/verifiable"
"github.com/piprate/json-gold/ld"
"github.com/piprate/json-gold/ld"
...
@@ -427,7 +428,7 @@ func TestService_CredentialProof(t *testing.T) {
...
@@ -427,7 +428,7 @@ func TestService_CredentialProof(t *testing.T) {
})
})
if
err
!=
nil
{
if
err
!=
nil
{
assert
.
Nil
(
t
,
res
)
assert
.
Nil
(
t
,
res
)
assert
.
NotEmpty
(
t
,
test
.
errtext
)
require
.
NotEmpty
(
t
,
test
.
errtext
,
"error is not expected, but got: %v "
)
assert
.
Contains
(
t
,
err
.
Error
(),
test
.
errtext
)
assert
.
Contains
(
t
,
err
.
Error
(),
test
.
errtext
)
if
e
,
ok
:=
err
.
(
*
errors
.
Error
);
ok
{
if
e
,
ok
:=
err
.
(
*
errors
.
Error
);
ok
{
assert
.
Equal
(
t
,
test
.
errkind
,
e
.
Kind
)
assert
.
Equal
(
t
,
test
.
errkind
,
e
.
Kind
)
...
@@ -449,6 +450,8 @@ func TestService_CredentialProof(t *testing.T) {
...
@@ -449,6 +450,8 @@ func TestService_CredentialProof(t *testing.T) {
assert
.
NotEmpty
(
t
,
vc
.
Proofs
[
0
][
"jws"
])
assert
.
NotEmpty
(
t
,
vc
.
Proofs
[
0
][
"jws"
])
}
}
})
})
time
.
Sleep
(
500
*
time
.
Millisecond
)
}
}
}
}
...
@@ -627,9 +630,9 @@ func TestService_PresentationProof(t *testing.T) {
...
@@ -627,9 +630,9 @@ func TestService_PresentationProof(t *testing.T) {
Key
:
test
.
keyname
,
Key
:
test
.
keyname
,
Presentation
:
pres
,
Presentation
:
pres
,
})
})
if
test
.
errtext
!=
""
{
if
err
!=
nil
{
require
.
Error
(
t
,
err
)
assert
.
Nil
(
t
,
res
)
assert
.
Nil
(
t
,
res
)
require
.
NotEmpty
(
t
,
test
.
errtext
,
"error is not expected, but got: %v"
)
assert
.
Contains
(
t
,
err
.
Error
(),
test
.
errtext
)
assert
.
Contains
(
t
,
err
.
Error
(),
test
.
errtext
)
if
e
,
ok
:=
err
.
(
*
errors
.
Error
);
ok
{
if
e
,
ok
:=
err
.
(
*
errors
.
Error
);
ok
{
assert
.
Equal
(
t
,
test
.
errkind
,
e
.
Kind
)
assert
.
Equal
(
t
,
test
.
errkind
,
e
.
Kind
)
...
@@ -637,7 +640,7 @@ func TestService_PresentationProof(t *testing.T) {
...
@@ -637,7 +640,7 @@ func TestService_PresentationProof(t *testing.T) {
return
return
}
}
assert
.
NotNil
(
t
,
res
)
require
.
NotNil
(
t
,
res
)
vp
,
ok
:=
res
.
(
*
verifiable
.
Presentation
)
vp
,
ok
:=
res
.
(
*
verifiable
.
Presentation
)
assert
.
True
(
t
,
ok
)
assert
.
True
(
t
,
ok
)
...
@@ -648,6 +651,8 @@ func TestService_PresentationProof(t *testing.T) {
...
@@ -648,6 +651,8 @@ func TestService_PresentationProof(t *testing.T) {
assert
.
Equal
(
t
,
test
.
proofVerificationMethod
,
vp
.
Proofs
[
0
][
"verificationMethod"
])
assert
.
Equal
(
t
,
test
.
proofVerificationMethod
,
vp
.
Proofs
[
0
][
"verificationMethod"
])
assert
.
NotEmpty
(
t
,
vp
.
Proofs
[
0
][
"jws"
])
assert
.
NotEmpty
(
t
,
vp
.
Proofs
[
0
][
"jws"
])
})
})
time
.
Sleep
(
500
*
time
.
Millisecond
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment