hpi-schul-cloud / authorization-service

Authorisation Server for the Schulcloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

The authorization-service is a microservice to authorize permissions for the column board and the file-storage. (Other parts will follow).

Internally there is a postgres db which stores, roles, user groups and entities. They are linked the service returns a list of permissions for a given user groups and entity.

Roles are pre defined. User groups and entities are required to be set up or managed via an api.

Installation (Local development)

Install docker compose

$ npm install

Start the Database

## start docker containers
$ docker-compose up -f ./docker-compose.local.yml

This will start a postgres db and a pgadmin instance. If there is no data folder, the db will be initialized with the schema in db/seed and a default user POSTGRES.

You can access the pgadmin at http://localhost:8080.

pgadmin

Add a new server in the UI. Once connected you have access to the database and can run queries.

pgadminsettings

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

About

Authorisation Server for the Schulcloud

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 64.0%Language:PLpgSQL 23.2%Language:JavaScript 12.8%