This is the User Verification Service for the Canonical Identity Platform.
Code dealing with the environment variables resides in here where each attribute has an annotation which is the lowercase of the environment variable name.
At the moment the application is sourcing the following from the environment:
OTEL_GRPC_ENDPOINT
- needed if we want to use the OTel gRPC exporter for tracesOTEL_HTTP_ENDPOINT
- needed if we want to use the OTel HTTP exporter for traces (if gRPC is specified this gets unused)TRACING_ENABLED
- switch for tracing, defaults to enabled (true
)LOG_LEVEL
- log level, defaults toerror
PORT
- HTTP server port, defaults to8080
BASE_URL
- the base url that the application will be running onDIRECTORY_API_URL
- the url of the Directory API
To build the UI OCI image, you need rockcraft. To install rockcraft run:
sudo snap install rockcraft --channel=latest/edge --classic
To build the image:
rockcraft pack
In order to run the produced image with docker:
# Import the image to Docker
sudo /snap/rockcraft/current/bin/skopeo --insecure-policy \
copy oci-archive:./user-verification-service_1.22.1_amd64.rock \
docker-daemon:localhost:32000/user-verification-service:registry
# Run the image
docker run -d \
-it \
--rm \
-p 8080:8080 \
--name user-verification-service \
-e DIRECTORY_API_URL="http://localhost" \
localhost:32000/user-verification-service:registry start user-verification-service
To try the identity-platform user verification service, you can use the make dev
command.
Please install docker
and docker-compose
.
You need to have a registered GitHub OAuth application to use for logging in. To register a GitHub OAuth application:
- Go to https://github.com/settings/applications/new. The application
name and homepage URL do not matter, but the Authorization callback URL must
be
http://localhost:4433/self-service/methods/oidc/callback/github
. - Generate a client secret
- Create a file called
.env
on the root of the repository and paste your client credentials:
CLIENT_ID=<client_id>
CLIENT_SECRET=<client_secret>
From the root folder of the repository, run:
make dev
To test it, you can use a dummy app deployed on port 4446. Open your browser and go to: http://127.0.0.1:4446/