Skip to Content

AAI

TODO: RDM 12 version, update to RDM14

AAI Management console settings

To set up and connect AAI, you’ll need to perform the following steps inside AAI management console :

  • Contact AAI support to create a VO that will host the repository accounts
  • Add a group that will hold repository root
  • Add a group to the repository root that will contain managed communities. Let’s call it ‘communities group’. Then:
    • Create an application form for the VO/group . The application on the VO must be auto approved, otherwise invitations will not work.
    • Create a notification for the pre-approved invitation
  • Inside the VO, create a repository service account
  • Contact AAI support to create a facility that will represent the repository and to create a synchronization service. Do not enable it yet. Also ask them to add permissions on the facility to your repository service account

OIDC settings

In addition, set up a OIDC client in spadmin console . Configuration:

ConfigurationValue
URL of login pagehttps://<server>/oauth/login/e-infra/
Redirect URIshttps://127.0.0.1:5000/oauth/authorized/e-infra/
https://<server>/oauth/authorized/e-infra/
Flow the service will useauthorization code
Token endpoint authentication methodclient_secret_basic
Proof Key for Code Exchange (PKCE) Code Challenge Methodnone
Service will call introspection endpointyes
Scopes the service will useopenid, profile, email, organization, eduperson_entitlement, voperson_external_id, voperson_external_affiliation, isCesnetEligibleLastSeen

Deployment parameters

Make sure you set up the following environment variables (or pass those in secrets’ json config):

VariableValue description
INVENIO_REMOTE_AUTH_ENABLED”true”
INVENIO_SERVER_NAMEThe server name, such as myrepo.org
INVENIO_EINFRA_SERVICE_USERNAMEUsername of the repository service account
INVENIO_EINFRA_SERVICE_PASSWORDPassword of the repository service account
INVENIO_EINFRA_REPOSITORY_VO_IDID of the VO. It is a number that is displayed in the console next to the name of the VO after #
INVENIO_EINFRA_COMMUNITIES_GROUP_IDID of the communities group. It is a number that is displayed in the console next to the name of the group after #
INVENIO_EINFRA_REPOSITORY_FACILITY_IDID of the repository facility. In the console, head to facilities, display the facility and copy the ID displayed next to the facility name
INVENIO_EINFRA_SYNC_SERVICE_NAMEName of the synchronization service, displayed on “services status” under the facility page

For exports from AAI:

VariableDescription
INVENIO_EINFRA_USER_DUMP_S3_ACCESS_KEYAccess key to the S3 bucket where AAI puts dumps
INVENIO_EINFRA_USER_DUMP_S3_SECRET_KEYSecret key to the S3 bucket where AAI puts dumps
INVENIO_EINFRA_USER_DUMP_S3_ENDPOINTS3 endpoint, for example https://s3.cl4.du.cesnet.cz 
INVENIO_EINFRA_USER_DUMP_S3_BUCKETName of the S3 bucket

For OIDC:

VariableDescription
INVENIO_EINFRA_CONSUMER_KEYOIDC key
INVENIO_EINFRA_CONSUMER_SECRETOIDC secret

Note: these parameters need to be set up both for the “web” service and the background celery workers

invenio.cfg

Add the following section to invenio.cfg:

if os.environ.get("INVENIO_REMOTE_AUTH_ENABLED", "no").lower() in ("true", "yes", "1"): from oarepo_oidc_einfra import EINFRA_LOGIN_APP OAUTHCLIENT_REMOTE_APPS = { "e-infra": EINFRA_LOGIN_APP } else: OAUTHCLIENT_REMOTE_APPS = {}

Note: If an empty OAUTHCLIENT_REMOTE_APPS is already present there, replace it with the config above.

Last updated on