Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

59 Commits

Folders and files

Repository files navigation

JointIdentityProvider (JIP) proof of concept

JIP connects OpenConext EngineBlock's SBS interface to an external OpenID Connect identity provider, DEZI, and releases verified attributes. This repository contains a mock DEZI provider, a SAML test service provider (SP), and a local development environment built on OpenConext-devconf. The JIP application itself is a separate repository, jip, pinned here as the jip/ Git submodule.

This is a local proof of concept. DEZI messages and fixtures contain provisional mock choices; integration with DEZI acceptance has not been verified. See the handover for scope and acceptance requirements.

Repository layout

Path Purpose
jip/ JIP application, configuration and checks (Git submodule pinned to a specific commit)
mock-dezi/ Mock DEZI identity provider (IdP), synthetic people and failure scenarios
test-sp/ SAML SP that demonstrates application access decisions
devenv/ OpenConext development stack, tooling and integration fixtures
docs/jip-poc-handover.md Demonstrations, resets, verification and open acceptance questions
Design Architecture and requirements

The local login follows this route:

Test SP → EngineBlock → Mujina organisation IdP → EngineBlock
        → JIP → mock DEZI → JIP → EngineBlock → Test SP

OpenConext-devconf supplies the shared infrastructure, including Manage and Mujina. The local Compose overlay adds JIP, mock DEZI and the test SP. Upstream repositories and versions are pinned in devenv/env.dist.

Prerequisites

The commands below assume a Linux host with Bash. Install:

  • Git and OpenSSL 3, and read access to the jip repository configured in .gitmodules.
  • Docker Engine with Docker Compose 2.24 or newer, accessible to your user.
  • PHP 8.5 and Composer 2. Enable openssl, gmp, ctype, iconv, dom, session and pdo_mysql; Composer checks the complete extension requirements for each project.
  • The acl package, providing setfacl and getfacl for container access to bind mounts.
  • Python 3 with venv support for the scripted login tools.

Keep host ports 80 and 443 available for the local proxy. MariaDB uses host port 13306 by default; adjust DEVCONF_MARIADB_HOST_PORT in devenv/.env if necessary. JIP's MariaDB 10.6 (jip-mariadb) uses host port 13307 (JIP_MARIADB_HOST_PORT). Docker also needs a free address pool for the development network. See environment prerequisites for details.

Set up the development environment

Clone this repository with its pinned JIP submodule:

git clone --recurse-submodules <jip-dev repository URL>
cd jip-dev

For an existing clone, initialize the submodule from the repository root:

git submodule update --init --recursive

The submodule URL ../jip.git resolves beside this repository's origin. If your fork or mirror uses another JIP repository, configure a local override before initializing it:

git config submodule.jip.url '<JIP repository URL>'
git submodule update --init --recursive -- jip

Avoid running git submodule sync afterward unless you want to restore the URL from .gitmodules.

Run commands from the repository root unless a different directory is shown.

1. Prepare JIP, upstream code, keys and configuration

devenv/bin/setup.sh

The script initializes the pinned JIP submodule if needed, fetches the pinned OpenConext-devconf and EngineBlock checkouts under devenv/upstream/, installs EngineBlock's PHP dependencies, creates devenv/.env with an SBS API token, prepares the development CA and proxy configuration, installs EngineBlock's SBS settings, and generates mock keys with container access permissions: JIP's client decryption key (the mock client uses authentication: none with PKCE, so no connector signing key is needed) and the mock DEZI provider's own message-signing keys.

Check that devenv/.env contains COMPOSE_PROFILES=jip so the mock provider and test SP start with the stack. This is the default in devenv/env.dist.

2. Install application and login-tool dependencies

composer --working-dir=jip install
composer --working-dir=mock-dezi install
composer --working-dir=test-sp install

python3 -m venv devenv/.venv
source devenv/.venv/bin/activate
python3 -m pip install requests beautifulsoup4

Activate this virtual environment in each shell where you run the Python tools.

3. Configure local hostnames and certificate trust

Add these entries to /etc/hosts on the machine running your browser, avoiding duplicates if they already exist:

127.0.0.1 engine.dev.openconext.local engine-api.dev.openconext.local manage.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local jip.dev.openconext.local mock-dezi.dev.openconext.local jip-test-sp.dev.openconext.local
::1 engine.dev.openconext.local engine-api.dev.openconext.local manage.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local jip.dev.openconext.local mock-dezi.dev.openconext.local jip-test-sp.dev.openconext.local

Trust devenv/certs/openconext-dev-ca.crt in your browser. On Ubuntu, add it to the system certificate store with:

sudo install -m 644 devenv/certs/openconext-dev-ca.crt /usr/local/share/ca-certificates/dezi-openconext-dev-ca.crt
sudo update-ca-certificates

Restart the browser. Browsers with a separate certificate store also need the CA imported there. The proxy binds to loopback; for a remote browser, follow the connectivity instructions.

4. Start and initialize the stack

In terminal 1:

devenv/bin/compose.sh pull
devenv/bin/compose.sh up

Leave it running. In terminal 2, from the repository root:

(cd devenv/upstream/OpenConext-devconf/core && ./scripts/init.sh)
devenv/bin/compose.sh exec engine bash -c 'cd theme && yarn install --frozen-lockfile && yarn build'
php devenv/bin/manage.php apply
source devenv/.venv/bin/activate
python3 devenv/bin/login-flow.py accounts
devenv/bin/check.sh
php devenv/bin/manage.php audit

Initialization prepares the databases and Manage entities. The subsequent commands build EngineBlock's theme, register the test SP and its policy in Manage, push it to EngineBlock, and load the synthetic organisation accounts into Mujina.

EngineBlock needs database initialization before it becomes healthy. Use the attached up command for this first start; use up -d --wait for later starts. Read every diagnostic: check.sh can exit successfully while reporting MISSING prerequisites. Resolve any FAIL from the configuration audit before the login.

Try the first login

Open the test SP and choose Log in. At the Mujina organisation IdP, use username jip-anna and password secret. At mock DEZI, choose person anna. The test SP should grant DEZI access.

Log out clears the test SP session. Each test SP login requests fresh authentication (ForceAuthn) so you can switch organisation accounts without reusing the previous SSO login. This does not sign you out of other services.

The scripted equivalent is:

source devenv/.venv/bin/activate
python3 devenv/bin/login-flow.py login jip-anna --person anna --expect dezi --show-attributes

To demonstrate a login without a DEZI binding, use Mujina account jip-nonumber with password secret. It should skip DEZI and receive organisation-level access:

python3 devenv/bin/login-flow.py login jip-nonumber --expect organisation

Organisation accounts are defined in devenv/mujina/accounts.json. DEZI people and profiles are defined in mock-dezi/fixtures/profiles.yaml. See the account catalogue and mock provider guide for other cases and selectable failures.

Daily development and verification

The parent repository records the JIP commit to use. After pulling changes to jip-dev, run git submodule update --init --recursive to check out that commit.

Setup leaves an already initialized JIP checkout untouched so local work is preserved. For development, switch to an existing branch inside jip/ as needed; submodule initialization normally checks out a detached HEAD. Commit and push JIP changes in its own repository before recording the updated jip pointer in jip-dev.

# Start or resume the configured stack.
devenv/bin/compose.sh up -d --wait

# Inspect services and logs.
devenv/bin/compose.sh ps
devenv/bin/compose.sh logs --tail=100 jip mock-dezi jip-test-sp

# Check environment configuration and the test SP's integration policy.
devenv/bin/check.sh
php devenv/bin/manage.php audit

# Stop services while keeping database volumes.
devenv/bin/compose.sh --profile jip stop

After a restart, reload Mujina accounts with python3 devenv/bin/login-flow.py accounts if they are missing. Restarting mock DEZI resets its state.

Run the existing application checks with:

composer --working-dir=jip check
composer --working-dir=mock-dezi check
composer --working-dir=test-sp check

For complete flow verification against the running stack, use devenv/bin/verify-poc.sh. It resets mock DEZI state and clears JIP's provider cache; see verification details before running it. For fixture resets, key regeneration and further demonstrations, use the handover.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages