Git Product home page Git Product logo

coldfront-plugin-api's People

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

knikolla quanmphm

coldfront-plugin-api's Issues

Implement filtering by email in SCIM API

Currently there is no way to search a username based on the user's email address through the SCIM User API.

This functionality is necessary since some users have changed their username and we need to be able to find their corresponding account through the email address.

Also update the registration script to make use of the new filtering functionality once it is in place.

Allow self-management of user assignments by PI/manager to own project

The ColdFront API already supports authentication via OAuth (NERC Keycloak), so it can work with a user's own account.

In the current state of our API, only administrators can manage user/group memberships (staff flag in ColdFront,) and the user registration script supports authentication only using client credentials.

We should allow PIs and managers to issue API requests with their OAuth token to manage a project are PI or have the manager role on.

(Optionally, Investigate) Another advantage for implementing assignment of users to a project through the SCIM v2 API is to also to allow the possibility of universities to integrate their own tooling into the SCIM API. There is a myriad of tools already providing support for provisioning of users and group memberships into a SCIM API as listed here http://simplecloud.info and I would bet that a lot of the university and partner organizations are already making use of SCIM already for provisioning Google Workspace, Office 365, etc.

Allow management of Managers of Projects from Group API

Currently it is not possible to add someone with a manager role through the API, so we've had to do this manually for TAs of a class.

There are two design issues to work out

  • Groups currently represent users of a Resource Allocation, whereas the Manager role is on the Project rather than Resource Allocations.
  • We're not exposing Projects through the API.

One possible solutions is to expose both memberships through the API as different groups:

Ex.
/Groups/allocation-123 would return the users of Resource Allocation 123 (currently /Groups/123).
/Groups/project-1234-users would return the users with a User role on Project 123.
/Groups/project-1234-managers would return the users with a Manager role on Project 123.

Implement filtering in allocations API by attributes

Currently the invoicing tools make an API request to /api/allocations?all=true. This responds with ALL the allocations, which doesn't scale.

We need to allow filtering by a specific attribute so that we can search for the allocation that we need.

Allow OAuth 2.0 Device Authorization Grant to authenticate

The script to register users currently requires a service account to authenticate with Keycloak, however Keycloak also supports OAuth 2.0 Device Authorization Grant. This is the flow in which the CLI generates a code and link, you open a browser and authenticate using that link, which gives you a token, and you insert that into the CLI. This is the flow that you authenticate to streaming services on your TV and the flow that OpenShift uses for CLI authentication.

If we support/document this flow, we can allow users to interact with the API through the CLI without requiring a Keycloak service account.

If we additionally support #11 we could allow PIs themselves to bulk add through the script.

Allow adding of users from the SCIM API that aren’t yet in ColdFront

In the current flow of using ColdFront through the web browser, a PI and all members of a project register through RegApp, which creates for them an account in Keycloak. Afterwards the PI logs in to ColdFront with their institutional account and requests PI status, creates a project, resource allocation, and then adds users to the project through a search box. The search box finds users that are registered with the NERC Keycloak even though ColdFront is unaware of them since they haven’t logged in to it.

#9 that merged today, allows adding/removing users that are present in ColdFront. However it is unlikely that normal members log in to ColdFront since it doesn’t provide them any functionality, but just register through RegApp.

  1. Every user needs to have signed the Terms of Service, which we are currently handling through the manual registration process and email verification in RegApp. Therefore, with the current state of the system, we can only allow adding users that exist in Keycloak.
  2. The username of users may unfortunately be different from the email address, as currently RegApp allows that flexibility. Therefore the SCIM API needs to allow a mechanism for resolving usernames for email, as I’m assuming PIs will have a list of emails rather than usernames.
  3. The solution shouldn’t make API requests directly to Keycloak, but should make use of the functionality of ColdFront to search for users, which we have already extended through https://github.com/nerc-project/coldfront-plugin-keycloak

Solution

  • Connect the Groups API from #9 to the user functions above to allow adding Keycloak users to project. -> #12
  • Implement list users -> #13
  • Implement searching users via email
  • Implement getting information for a specific user -> #13

Provide an option to return not active resource allocations

Currently, /api/allocations only returns resource allocations that are in Active state.

As an API consumer, I want the ability to query resource allocations that are not Active.

This is important for invoicing as a resource allocation may have been active at some point during the last month and therefore its information needs to be queried when generating the invoices.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.