Go
Setup
Clone the server
Start by cloning the server repository from GitHub. You can do this by running the following command:
git clone https://github.com/aserto-demo/todo-go-v2
Set up an .env
file
Copy the .env.example
file to .env
and update the ASERTO_GRPC_CA_CERT_PATH
to correspond to the path in which Topaz generated your certificates
(by default this path will be $HOME/.local/share/topaz/certs/grpc-ca.crt
, or $HOME\AppData\Local\topaz\certs
on Windows).
cp .env.example .env
Your .env
file should look like:
JWKS_URI=https://citadel.demo.aserto.com/dex/keys
ISSUER=https://citadel.demo.aserto.com/dex
AUDIENCE=citadel-app
ASERTO_POLICY_ROOT="todoApp"
ASERTO_AUTHORIZER_SERVICE_URL=localhost:8282
ASERTO_DIRECTORY_SERVICE_URL=localhost:9292
# On Windows, change this to '$HOMEPATH\AppData\Local\topaz\certs\grpc-ca.crt'
ASERTO_GRPC_CA_CERT_PATH='${HOME}/.local/share/topaz/certs/grpc-ca.crt'
Install dependencies
To install the application dependencies, run the following command:
go mod tidy
Start the server
go run .
Next steps
Test your server by using the sample web Todo application.