E-infra OIDC Auth backend for OARepo
Project description
E-infra authentication and authorization module for InvenioRDM
This remote backend adds support for Czech e-infra AAI solution - login.e-infra.cz allowing all members of czech academic community can use their home institution credentials to log in.
Installation
Add the module to your repository's pyproject.toml:
dependencies = [
"oarepo-oidc-einfra>=1.0.0",
# ...
]
Configuration
- Register a new application with e-infra OIDC Provider at
https://spadmin.e-infra.cz/. When registering the application
ensure that the Redirect URI points to
https://<my_invenio_site>:5000/oauth/authorized/e-infra/
In OIDC parameters, you need to set at least the following scopes:
- openid
- profile
- eduperson_entitlement
- isCesnetEligibleLastSeen
- organization
- Grab the Client ID and Client Secret after registering the application and add them to your ENVIRONMENT variables:
INVENIO_EINFRA_CONSUMER_KEY=*Client ID*
INVENIO_EINFRA_CONSUMER_SECRET=*Client Secret*
- Add the remote application to the site's
invenio.cfg:
from oarepo_oidc_einfra import EINFRA_LOGIN_APP
OAUTHCLIENT_REMOTE_APPS = {
"e-infra": EINFRA_LOGIN_APP
}
- Add the e-infra public key to your invenio.cfg or environment variables:
EINFRA_RSA_KEY=b'-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmho5h/lz6USUUazQaVT3\nPHloIk/Ljs2vZl/RAaitkXDx6aqpl1kGpS44eYJOaer4oWc6/QNaMtynvlSlnkuW\nrG765adNKT9sgAWSrPb81xkojsQabrSNv4nIOWUQi0Tjh0WxXQmbV+bMxkVaElhd\nHNFzUfHv+XqI8Hkc82mIGtyeMQn+VAuZbYkVXnjyCwwa9RmPOSH+O4N4epDXKk1V\nK9dUxf/rEYbjMNZGDva30do0mrBkU8W3O1mDVJSSgHn4ejKdGNYMm0JKPAgCWyPW\nJDoL092ctPCFlUMBBZ/OP3omvgnw0GaWZXxqSqaSvxFJkqCHqLMwpxmWTTAgEvAb\nnwIDAQAB\n-----END PUBLIC KEY-----\n'
- Add the VO, communities group, api url and others to your invenio.cfg or environment variables:
EINFRA_SERVICE_USERNAME = "username"
"""Username of the service in the E-INFRA Perun."""
EINFRA_SERVICE_PASSWORD = "password"
"""Password of the service in the E-INFRA Perun."""
EINFRA_SERVICE_ID = 0
"""Internal ID of the service (whose username and password are above) in the E-INFRA Perun."""
EINFRA_REPOSITORY_VO_ID = 0
"""Internal ID of the VO in the E-INFRA Perun that represents the repository."""
EINFRA_COMMUNITIES_GROUP_ID = 0
"""Internal ID of the group in the E-INFRA Perun that represents the communities."""
EINFRA_REPOSITORY_FACILITY_ID = 0
"""Internal ID of the facility in the E-INFRA Perun that represents the repository."""
EINFRA_CAPABILITIES_ATTRIBUTE_ID = 0
"""Internal ID of the attribute in the E-INFRA Perun that represents the capabilities."""
EINFRA_SYNC_SERVICE_ID = 0
"""Internal ID of the service in the E-INFRA Perun that is responsible for synchronization
(creating and pushing dumps with resources and users)."""
- Start the server and go to the login page https://127.0.0.1:5000/login/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oarepo_oidc_einfra-3.0.1.tar.gz.
File metadata
- Download URL: oarepo_oidc_einfra-3.0.1.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
416cca13d3d5b5dc0ca496762075bd072b80447d905dda1316936a49ee84187f
|
|
| MD5 |
4f6d0f1d7dd1989efa4c597f86530389
|
|
| BLAKE2b-256 |
9ea028a8d3bf64bd7018d3086d74c1e8982b6ba2c97cb43c2bc7119b2bfc95ed
|
File details
Details for the file oarepo_oidc_einfra-3.0.1-py3-none-any.whl.
File metadata
- Download URL: oarepo_oidc_einfra-3.0.1-py3-none-any.whl
- Upload date:
- Size: 54.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99ccb5f1f642c55d1bad8169ee5f79501d8f5832363b69980d3c5d6ca0e69c2f
|
|
| MD5 |
e95815ef00ad983e961d8702f92f11b3
|
|
| BLAKE2b-256 |
3accc1c921aa84aff334459f18cda366d2a2f57cd213fb2076c5df86a53f27c6
|