Effireg architecture

Lars Wirzenius

Version: trial-1-g4f2e1de-dirty

Introduction

Effireg is a web-based membership register for the Effi non-profit association. See https://effi.org/ for more information about Effi.

Effireg is written for Effi, but it is free software, released under the Affero GPL v3 license, and may be used by others. No guarantees of quality.

Architecture overview

Assumptions

The architecture has been designed under the following assumptions:

Components

Architectural components
Architectural components

Effireg consists of four main components:

Authentication

End-users are authenticated using the OpenID Connect protocol, specifically the authorization code flow. In this flow, Qvisqve provides cryptographically signed access tokens, which identify the user and specify a list of things the user may do. The signature guarantees the token comes from Qvisqve.

Non-interactive API clients are authenticated using the OAuth2 protocol, specifically using client credential grants. This also provides an access token, similar to the one from end-user authentication.

Data model

The membership register stores data as “resources” in Muck-POC. Each resource is a JSON object. The following types of objects are supported:

Subject resource

A subject resource has the following fields:

The subject resource does not have any data that isn’t needed for end-user identification. Effiapi manages and Qvisqve uses the subject resource.

Password resource

A password resource has the following fields:

Effiapi manages and Qvisqve uses the password resource.

Member resource (memb)

A membership resource has the following fields:

Effiapi manages and uses the memb resource. Effiweb renders it for the user.

effiapi

This chapter descibes the effiapi API, as a yarn automated scenario test. It is meant to be understandable to Effi sysadmins, as well as be an executable test suite for the API.

The API is a simple RESTful HTTP API using JSON. This means that:

Manage memberships

This section shows the API calls to manage a memberhip: to create the member, to update and retrieve it, and to search memberships.

SCENARIO Manage memberships

GIVEN An effiapi instance
WHEN admin requests POST /memb with body { "fullname": "James Bond" }
THEN the member id is ID

WHEN admin requests GET /memb with header Muck-Id: ${ID}
THEN HTTP status 200
AND HTTP body matches { "fullname": "James Bond" }

TODO:

Appendix: Yarn scenario step implementations