ESGF / esgf-cwt

Activities of the ESGF Compute Working Team (CWT)
BSD 2-Clause "Simplified" License
4 stars 1 forks source link

Build a web-proxy into the deployment stack #27

Open agstephens opened 1 year ago

agstephens commented 1 year ago

Requirement

Requirements:

Potential solution

We have deployed an Nginx proxy

API Management:

William has set up a testbed for CORDEX for this:

Without K8:

Example filter rule:

opa:
  restrictedPaths:
    - name: cordex
      path: "^/thredds/(fileServer|dodsC)/esg_cordex/.*"
      group: "cordex_research"
    - name: cordex_demo
      path: "^/thredds/(fileServer|dodsC)/esg_cordex_demo/.*"
      group: "cordex_demo"
agstephens commented 1 year ago

Discussion (09/03/2023) points:

Stages of managing a request before it is sent to the WPS:

  1. Request received by Proxy
  2. Proxy talks to the PEP
  3. PEP (Policy Enforcement Point Service - i.e. our Django App) checks with the OPA service (which is the first Policy Decision Point (PDP)) - layer 1 PDP
  4. The second PDP could be our new Service XYZ (later rebadged to the WAM!) - layer 2 PDP - might not need to exist at first
  5. Service XYZ could decide on the response based on rules/logic/usage:
    • Service XYZ could be part of the WPS or a separate application that tracks and records usage (that the WPS might also talk to separately).
    • Service XYZ would need to have access to usage information about the WPS (i.e. a database of job logs/stats)
    • Service XYZ needs some business logic to decide whether to allow a job
      • Note: the above approach could be written with only the OPA service and no second layer to start with.
agstephens commented 1 year ago

What exists and what would need to be built?

Components:

Examples

The dap.ceda.ac.uk service has many of these components:

agstephens commented 1 year ago

Need to investigate Slurm-like solutions for the business logic in the WAM!

agstephens commented 1 year ago

Regarding Keycloak, it looks like EGI-Checkin and Globus-Auth might be replacing Keycloak for LLNL.