This backend service allows to perform user account related tasks on Keycloak. It uses the Keycloak Admin API. Some endpoints require a valid JWT as Bearer token to be sent with the request.
For more Aam Digital setup related documentation have a look at the ndb-setup repository.
A independent deployment can be done via docker
docker run aamdigital/account-ms:latest
or directly through npm
npm install && npm start
In both cases the following environment variables should be defined.
These can also be written to the .env
file.
CORS
domain from which requests are accepted, e.g.https://*.aam-digital.com
. Default*
(all domains)KEYCLOAK_URL
URL to the keycloak instanceKEYCLOAK_ADMIN
name of an admin account for themaster
realm. Defaultadmin
KEYCLOAK_PASSWORD
password for the admin accountSENTRY_DSN
(optional) the Sentry DSN. If defined, error messages are sent to the sentry.io application monitoring & logging service.
After starting the application the API documentation can be found under /api
.
All available endpoints are described there.
This system is a Node.js application built with the NestJS framework.
To run and test this project locally:
npm install
to download and set up all dependenciesnpm start
to run the application locally (see above for required environment variables)npm test
to execute unit tests