Categorygithub.com/trustbloc/ace
module
0.0.0-20220916203922-7b7c10a5d0ef
Repository: https://github.com/trustbloc/ace.git
Documentation: pkg.go.dev

# README

Release License Godocs

Build Status codecov Go Report Card

ACE

ACE contains components to support Anonymous Comparator and Extractor flows.

Gatekeeper

Gatekeeper helps to ensure that there are multiple authorizations for accessing protected data under the given policy. It supports the following operations:

  • create policy configurations for storing and releasing protected data;
  • convert sensitive PII data into DID;
  • create release transactions (tickets) on DID;
  • accept authorizations for a ticket from approvers;
  • accept release request for a ticket that has completed the authorization sequence.

Running Gatekeeper as a Docker container

Build a docker image using make gatekeeper-docker and start server with the following command:

$ docker run -p 9014:9014 ghcr.io/trustbloc/gatekeeper:latest start [flags]

Flags

FlagEnvironment variableDescription
--api-tokenGK_REST_API_TOKENBearer token used for a token protected api calls.
--bloc-domainGK_BLOC_DOMAINBloc domain.
--context-provider-urlGK_CONTEXT_PROVIDER_URLRemote context provider URL to get JSON-LD contexts from.
--csh-urlGK_CSH_URLURL of the Confidential Storage Hub.
--database-prefixDATABASE_PREFIXAn optional prefix to be used when creating and retrieving underlying databases.
--database-timeoutDATABASE_TIMEOUTTotal time in seconds to wait until the datasource is available before giving up.
--database-urlDATABASE_URLDatabase URL with credentials if required.
--did-anchor-originGK_DID_ANCHOR_ORIGINDID anchor origin.
--did-resolver-urlGK_DID_RESOLVER_URLDID Resolver URL.
--host-urlGK_HOST_URLHost URL to run the gatekeeper instance on. Format: HostName:Port.
--tls-cacertsGK_TLS_CACERTSComma-separated list of CA certs path.
--tls-serve-certGK_TLS_SERVE_CERTPath to the server certificate to use when serving HTTPS.
--tls-serve-keyGK_TLS_SERVE_KEYPath to the private key to use when serving HTTPS.
--tls-systemcertpoolGK_TLS_SYSTEMCERTPOOLUse system certificate pool. Possible values [true] [false].
--vault-server-urlGK_VAULT_SERVER_URLURL of the vault server.
--vc-issuer-profileGK_VC_ISSUER_PROFILEProfile of the VC VCIssuer service.
--vc-issuer-urlGK_VC_ISSUER_URLURL of the VC Issuer service.
--request-tokensGK_REQUEST_TOKENSTokens used for HTTP requests to other services.

REST API

Generate OpenAPI specification

The OpenAPI spec for the gatekeeper can be generated by running the following target from the project root directory:

$ make open-api-spec

The generated spec can be found under ./test/bdd/fixtures/spec/openAPI.yml.

Run OpenAPI demo

Start the OpenAPI demo by running

$ make open-api-demo

Once the services are up, click here to launch the OpenAPI interface.

Running tests

Prerequisites

  • Go 1.18
  • Docker
  • Docker-Compose
  • Make

Targets

# run all build targets
$ make all

# run license and linter checks
$ make checks

# run unit tests
$ make unit-test

# run bdd tests
$ make bdd-test

Contributing

Thank you for your interest in contributing. Please see our community contribution guidelines for more information.

License

Apache License, Version 2.0 (Apache-2.0). See the LICENSE file.

# Packages

No description provided by the author
No description provided by the author