Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor re-index program endpoint #302

Open
joneubank opened this issue Mar 13, 2024 · 0 comments
Open

Refactor re-index program endpoint #302

joneubank opened this issue Mar 13, 2024 · 0 comments
Assignees
Labels
donor-data-api new-feature Request is a new feature

Comments

@joneubank
Copy link
Member

The existing endpoint that allows users to request a program to be reindexed needs a few modifications to work on teh RDPC instead of in the DCC.

The endpoint is currently defined in src/index.ts: https://github.com/icgc-argo/donor-submission-aggregator/blob/develop/src/index.ts#L24

Changes needed:

  1. Move endpoint out of server definition file and into a dedicated router file
  2. Add authorization rules to this endpoint to only allow it to be accessed by RDPC Admin with Write permissions
  3. Wrap existing index endpoint in a feature flag. This flag will be enabled in the central platform environment so that the existing system can trigger a reindex. It will be disabled in the RDPC environment (default behaviour) to prevent access to this endpoint that does not enforce authorization rules.
@joneubank joneubank added new-feature Request is a new feature donor-data-api labels Mar 13, 2024
ciaranschutte added a commit that referenced this issue May 8, 2024
* apollo setup. mirror argo-clinical (#303)

* apollo setup. mirror argo-clinical

* skip TS lib check on node modules

* fix path

* fix typo

---------

Co-authored-by: Ciaran Schutte <[email protected]>

* Gql schemas (#304)

* apollo setup. mirror argo-clinical

* fix path

* add program donor summary

* add missing utils and configs. in line with recent argo-clinical commits

* add program donor published analysis by date

* adds missing configs and utils

* fix schema merging and types

---------

Co-authored-by: Ciaran Schutte <[email protected]>

* auth function code refactor and reusable (#305)

* rearrange some auth funcs

* clean up imports

* use ego package utils

* add rdpc code from env var

* remove rdpc_code property from base query args

---------

Co-authored-by: Ciaran Schutte <[email protected]>

* fix imports

* public key and prettier

* use ego token utils

* apollo setup. mirror argo-clinical (#303)

* apollo setup. mirror argo-clinical

* skip TS lib check on node modules

* fix path

* fix typo

---------

Co-authored-by: Ciaran Schutte <[email protected]>

* Gql schemas (#304)

* apollo setup. mirror argo-clinical

* fix path

* add program donor summary

* add missing utils and configs. in line with recent argo-clinical commits

* add program donor published analysis by date

* adds missing configs and utils

* fix schema merging and types

---------

Co-authored-by: Ciaran Schutte <[email protected]>

* add route

* add env feature flag

* add json web token, get token from req, check auth

* export get public key

* add prettier org plugin

* fix build issues. update prettuer packages

* jwt env var unused

* export unused getpublickey

* npm i @apollo/server lib

* use develop branch package-lock and use npm i for missing libs

---------

Co-authored-by: Ciaran Schutte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
donor-data-api new-feature Request is a new feature
Projects
None yet
Development

No branches or pull requests

2 participants