CCI-MOC / xdmod-cntr

A project to prototype the use of XDMOD with OpenStack and OpenShift on the MOC
1 stars 5 forks source link

Get the hierarchy data from keycloak into XDMoD #155

Closed rob-baron closed 1 year ago

rob-baron commented 1 year ago

Regapp stores meta data about users in keycloak. With keycloak we will need to pull information about PIs (eventually users) concerning their institution and field of science.

@knikolla is providing example scripts to pull the data from keycloak

And we will need an account in keycloak that has the appropriate privileges to access the information.

joachimweyl commented 1 year ago

@culbert would you please create a keycloak client account for XDMoD to pull hierarchy data?

knikolla commented 1 year ago

@rob-baron I have some code here that is used to power the user search feature in ColdFront. https://github.com/nerc-project/coldfront-plugin-keycloak/blob/main/src/coldfront_plugin_keycloak_usersearch/keycloak.py

joachimweyl commented 1 year ago

for clarification, the field of science is associated with the PI, not the Project.

knikolla commented 1 year ago

A client account would be the best solution. My code example authenticates as a user. Authenticating as a client is described here https://github.com/nerc-project/regapp/blob/e28d469e898688093e7ac88e228eb5a28c368afd/apps/regapp/regapp_utils.py#L17

joachimweyl commented 1 year ago

@culbert can you provide the regapp client creds to @rob-baron to move forward in the interim?

joachimweyl commented 1 year ago

@rob-baron now that infra is working and that you have the manually created client to access keycloak/coldfront what are the next steps on this issue?

rob-baron commented 1 year ago

So far:

  1. integrated kristi's example into the code base
  2. Gotten the credentials from vault - this took longer than expected as it required multiple login attempts due to the page not loading.
  3. Added those credentials to my local config file

That leaves:

  1. will confirm the data is as I am expecting
  2. processing the data
  3. checking the changes in a single commit as it is fairly self contained.
joachimweyl commented 1 year ago

@rob-baron how are the last 3 steps you mentioned coming along?

rob-baron commented 1 year ago

1) The data was as I was expecting 2) We generated files using the data 3) things were checked in last night

I am currently working on deploying the hierarchy job to xdmid-staging on the nerc-ocp-infra cluster.

rob-baron commented 1 year ago

This is no longer blocked as we are getting the data though to the infra cluster.

joachimweyl commented 1 year ago

@rob-baron & @knikolla it looks like the work for this is done. The processing of the Keycloak data will be done in this issue. Is that correct?

rob-baron commented 1 year ago

addressed in (https://github.com/CCI-MOC/xdmod-cntr/pull/157)