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

Commit

Permalink
feat: implement GNAP support
Browse files Browse the repository at this point in the history
Closes #287

Signed-off-by: Andrii Holovko <[email protected]>
  • Loading branch information
aholovko committed Jun 7, 2022
1 parent d46e46e commit ce7235b
Show file tree
Hide file tree
Showing 26 changed files with 1,118 additions and 186 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $ ./build/bin/kms-server start --host localhost:8076 --database-type mongodb --d
| --secret-lock-aws-key-uri | KMS_SECRET_LOCK_AWS_KEY_URI | The URI of AWS key to be used by server secret lock if the secret lock type is "aws". |
| --secret-lock-aws-access-key | KMS_SECRET_LOCK_AWS_ACCESS_KEY | The AWS access key ID to be used by server secret lock if the secret lock type is "aws". |
| --secret-lock-aws-secret-key | KMS_SECRET_LOCK_AWS_SECRET_KEY | The AWS secret access key to be used by server secret lock if the secret lock type is "aws". |
| --auth-server-url | KMS_AUTH_SERVER_URL | The URL of Auth server to use for fetching secret share for Shamir secret lock. |
| --auth-server-url | KMS_AUTH_SERVER_URL | The URL of Auth server. |
| --auth-server-token | KMS_AUTH_SERVER_TOKEN | A static token used to protect the GET /secrets API in Auth server. |
| --secret-lock-aws-endpoint | KMS_SECRET_LOCK_AWS_ENDPOINT | The endpoint of AWS KMS service. Should be set only in a test environment. |
| --tls-cacerts | KMS_TLS_CACERTS | Comma-separated list of CA certs path. |
Expand All @@ -67,7 +67,7 @@ $ ./build/bin/kms-server start --host localhost:8076 --database-type mongodb --d
| --shamir-secret-cache-ttl | KMS_SHAMIR_SECRET_CACHE_TTL | An optional value for Shamir secrets cache TTL. Defaults to 10m if caching is enabled. If set to 0, keys are never cached. |
| --kms-cache-ttl | KMS_KMS_CACHE_TTL | An optional value for cache TTL for keys stored in server kms. Defaults to 10m if caching is enabled. If set to 0, keys are never cached. |
| --enable-cors | KMS_CORS_ENABLE | Enables CORS. Possible values: [true] [false]. Defaults to false. |
| --enable-zcap | KMS_ZCAP_ENABLE | Enables ZCAPs authorization. Possible values: [true] [false]. Defaults to false. |
| --disable-auth | KMS_AUTH_DISABLE | Disables authorization. Possible values: [true] [false]. Defaults to false. |
| --log-level | KMS_LOG_LEVEL | Logging level. Supported options: critical, error, warning, info, debug. Defaults to info. |

## Running tests
Expand Down
37 changes: 30 additions & 7 deletions cmd/kms-server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ require (
github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220330151152-6bbd64bde42e
github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc.1
github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220516154446-0ba34929e05b
github.com/hyperledger/aries-framework-go/spi v0.0.0-20220516154446-0ba34929e05b
github.com/hyperledger/aries-framework-go/spi v0.0.0-20220531182402-04bfea80427b
github.com/lafriks/go-shamir v1.1.0
github.com/ory/dockertest/v3 v3.8.1
github.com/piprate/json-gold v0.4.1
github.com/prometheus/client_golang v1.11.0
github.com/rs/cors v1.8.2
github.com/spf13/cobra v1.3.0
github.com/stretchr/testify v1.7.0
github.com/square/go-jose/v3 v3.0.0-20200630053402-0a67ce9b0693
github.com/stretchr/testify v1.7.1
github.com/trustbloc/auth v0.1.9-0.20220603134109-0b87579ddcf1
github.com/trustbloc/auth/spi/gnap v0.0.0-20220524155711-5c72fe155c13
github.com/trustbloc/edge-core v0.1.8
github.com/trustbloc/kms v0.1.8
)
Expand All @@ -33,14 +36,18 @@ require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/VictoriaMetrics/fastcache v1.5.7 // indirect
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bluele/gcache v0.0.2 // indirect
github.com/btcsuite/btcd v0.22.0-beta // indirect
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe // indirect
github.com/coreos/go-oidc/v3 v3.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v20.10.11+incompatible // indirect
github.com/docker/docker v20.10.7+incompatible // indirect
Expand All @@ -51,6 +58,16 @@ require (
github.com/fxamacker/cbor/v2 v2.3.0 // indirect
github.com/go-kivik/couchdb/v3 v3.2.6 // indirect
github.com/go-kivik/kivik/v3 v3.2.3 // indirect
github.com/go-openapi/analysis v0.20.0 // indirect
github.com/go-openapi/errors v0.20.1 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/loads v0.20.2 // indirect
github.com/go-openapi/runtime v0.19.31 // indirect
github.com/go-openapi/spec v0.20.3 // indirect
github.com/go-openapi/strfmt v0.20.2 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-openapi/validate v0.20.2 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
Expand All @@ -68,8 +85,10 @@ require (
github.com/ipfs/go-cid v0.0.7 // indirect
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kilic/bls12-381 v0.1.1-0.20210503002446-7b7597926c69 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
github.com/minio/sha256-simd v0.1.1 // indirect
Expand All @@ -81,10 +100,12 @@ require (
github.com/multiformats/go-multibase v0.0.3 // indirect
github.com/multiformats/go-multihash v0.0.14 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.0.2 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/ory/hydra-client-go v1.10.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/cachecontrol v0.1.0 // indirect
Expand All @@ -95,7 +116,6 @@ require (
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/square/go-jose/v3 v3.0.0-20200630053402-0a67ce9b0693 // indirect
github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8 // indirect
github.com/trustbloc/orb v1.0.0-rc.1 // indirect
github.com/trustbloc/sidetree-core-go v1.0.0-rc.1 // indirect
Expand All @@ -109,15 +129,18 @@ require (
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
go.mongodb.org/mongo-driver v1.8.0 // indirect
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf // indirect
google.golang.org/grpc v1.44.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Expand Down
Loading

0 comments on commit ce7235b

Please sign in to comment.