Using NOMAD for Authentication
I would like to use NOMAD for authentication to let users run our gap_fit program on an HPC cluster via an API.
Is it possible? What is the recommended way to do that?
The main goal is authorization so that only NOMAD users may initiate a run. But there should also be some unique identifier to limit the number of runs per user. Could be the plain username/id but a hash would probably suffice.
So far I used the Python package keycloak-client
:
openid = KeycloakOpenID(
server_url='https://nomad-lab.eu/fairdi/keycloak/auth/',
client_id='nomad_public',
realm_name='fairdi_nomad_prod',
)
userinfo = openid.userinfo(access_token)