You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Overview

The RP (Relying Party) component is representative of an external consumer of the Inacademia service. It is an OIDC client that communicates with the OP component.


Directory structure

├── build_oidc-rp.sh
├── config
│   └── certs
│       ├── rp.inacademia.local.crt
│       │   
│       └── rp.inacademia.local.key
│   └── rp.conf        
├── Dockerfile
└── run_oidc-rp.sh


The Dockerfile is the basis for the docker to be build. The build_rp.sh and run_rp.sh scripts will build and run the docker image respectively. The run_rp.sh script will test if the image exists, and if not, try to build it before running it.

In the config directory contains the certs and the rp configuration (rp.conf)

  • config has only one subdirectory, cert, which gets copied into the /etc/apache2/ssl/ directly of the docker. It also contains rp.conf which gets copied into etc/apache2/sites-enabled/. rp.conf contains the VirtualHost configuration parameters for OIDC communication between the RP and the OP.

Docker file

The docker file is completely self contained, so it will build the RP based on the config and by pulling relevant repositories if needed

FROM ubuntu:16.04

EXPOSE 443

RUN apt -y update && apt -y full-upgrade && apt -y autoremove && apt install -y --no-install-recommends sudo dnsutils git software-properties-common apache2 wget
RUN apt-get -y clean

RUN wget https://github.com/zmartzone/mod_auth_openidc/releases/download/v2.3.7/libapache2-mod-auth-openidc_2.3.7-1.xenial.1_amd64.deb
RUN wget https://github.com/zmartzone/mod_auth_openidc/releases/download/v2.3.0/libcjose0_0.5.1-1.xenial.1_amd64.deb

RUN apt -y install ./libcjose0_0.5.1-1.xenial.1_amd64.deb
RUN apt -y install ./libapache2-mod-auth-openidc_2.3.7-1.xenial.1_amd64.deb

RUN a2enmod ssl
RUN a2enmod auth_openidc
RUN mkdir /etc/apache2/ssl

COPY config/certs/ /etc/apache2/ssl/
COPY config/rp.conf /etc/apache2/sites-enabled/

ENTRYPOINT service apache2 start && /bin/bash

Now run the run script to build and run our docker based RP

Using the RP

Assuming your deploy went without errors, you can now run the RP. It should now have available trough: https://rp.inacademia.local/

To start the RP, launch your browser and go to https://rp.inacademia.local/




  • No labels