Introduction

A typical requirement in federated research infrastructures is to provide access to shell-based services using the federated identity (OpenId Connect-based), with SSH being the most prominent such service. Provisioning and deprovisioning of local accounts is necessary.

Goals

Develop a set of server- and client-side tools that that work with standard SSH software to enable SSH access with OIDC.

Server-side requirements:

Client-side requirements:

Architecture and Components

The main components to enable SSH with OIDC are:


The architecture of motley_cue consists of:


Public Test Instance

KIT provides a public test instance for evaluation at https://ssh-oidc-demo.data.kit.edu/.

Client usage

On the client, two basic tools are needed:

For oidc-agent, follow installation instructions at https://indigo-dc.gitbook.io/oidc-agent/installation.


1. Generate an oidc-agent configuration

a) for example with EGI Checkin:

    oidc-gen --pub --iss https://aai.egi.eu/oidc \
  --scope "openid profile email offline_access \
  eduperson_entitlement eduperson_scoped_affiliation eduperson_unique_id" egi

b) or with google:

    oidc-gen --pub --issuer https://accounts.google.com/ --flow=device google


2. Install mccli:

pip install mccli

3. SSH into the public test instance with a simple command:

    mccli ssh ssh-oidc-demo.data.kit.edu --iss https://aai.egi.eu/oidc
mccli ssh ssh-oidc-demo.data.kit.edu --iss https://accounts.google.com

This will create an account for you on the remote machine and log you into the remote host without any additional interaction.

More on configuring the source of the Access Token in mccli --help.


Server configuration

Packages are available at https://repo.data.kit.edu. Follow the instructions there to support the correct repository for apt or yum. Install the packages: motley-cue and pam-ssh-oidc-autoconfig.

You'll need to open a port for Nginx to listen on, and install host certificates.

You must configure who is allowed to use your service in /etc/motley_cue/motley_cue.conf.

You can support multiple OPs and configure authorisation for each OP separately. There are three options to authorise users from the supported OPs:

Local account creation is configured in `/etc/motley_cue/feudal_adapter.conf`. A default configuration is provided with the installed package. Pay close attention to the following options to change the default behaviour:

Resources