nikosev / rciam-federation-registry

RCIAM Federation Registry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

The federation registry provides a secure web interface through which service operators can register and manage their OpenID Connect and Saml based service. A federation registry instance can serve multiple tenants and supports different AAI proxy technologies(SimpleSAMLphp, MITREid Connect, SATOSA, Keycloak). Services can be managed through the portal and are deployed by sending configuration messages to deployment agents that run in parallel with this project. Messages are exchanged using Argo Messenging Service.

Federation registry is consisted of three node.js projects

  • federation-registry-frontend: A front-end portal created with Reactjs
  • federation-registry-backend-api: An API created with Expressjs
  • federation-registry-backend-ams-agent: An agent that uses the api and communicates with ams

Running the project


Dependencies

Federation registry requires Nodejs and a PostgreSQL database to run. Versions used in project development: node v13.14.0 PostgreSQL 12.4

Database

A PostgreSQL database should be created using the schema deescribed in db_schema.sql

Configuration

If we need to set the project to communicate with deployment agents we will need the following from the ams setup:

  • the base url of the ams installation
  • the project name
  • a user token with access to the publish topics
  • a verification hash for the push endpoint
  • an authorization key for the push endpoint

*Note: Default values are configured for a local installation

1) Backend Api

Configure Environment File federation-registry-backend-api/JavaScript/.env

REACT_BASE=base_frontend_url
EXPRESS_BASE=base_api_url
AMS_AGENT_KEY=authentication_key_for_ams_agent
REDIRECT_URI=redirection_uri_after_login
AMS_AUTH_KEY=authorization_key_for_push_subscription
AMS_VER_HASH=verification_hash_used_to_activate_push_subscription

Configure Database File federation-registry-backend-api/db-config/db-config.json

{
  "host": "localhost",
  "port": 5432,
  "database": "federation_registry_db",
  "user": "postgres",
  "password":"postgres"
}
2) Front End

For the frontend we just need to configure where the backend api is located federation-registry-frontend/src/config.json

{
  "host": "api_base_url"
}
3) Ams agent

To configure the ams we must set the enviromental variables

AMS_PROJECT=ams-project
AMS_BASE_URL=ams-url
AMS_USER_TOKEN=user-token
EXPRESS_URL=base-url-api
EXPRESS_KEY=authentication_key_for_ams_agent
ENV=installation_environment

Installing Node Modules

Install node modules for all three node projects

$ cd federation-registry-backend-api
$ npm install
$ cd ../federation-registry-frontend
$ npm install
$ cd ../federation-registry-backend-ams-agent
$ npm install

Run the project

To run the federation-registry-backend-api

$ cd federation-registry-backend-api/JavaScript
$ node index.js

To run the federation-registry-frontend

$ cd federation-registry-frontend
$ npm start

To run the federation-registry-backend-ams-agent

$ cd federation-registry-backend-ams-agent
$ node app.js

About

RCIAM Federation Registry

License:Apache License 2.0


Languages

Language:JavaScript 91.4%Language:CSS 5.4%Language:Handlebars 1.7%Language:Shell 0.9%Language:HTML 0.7%