whole-tale / girder_wholetale

Girder plugin providing basic Whole Tale functionality
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Enable authorization on arbitrary services #574

Closed craig-willis closed 1 year ago

craig-willis commented 1 year ago

Problem The current forward auth implementation is limited to instances. For the HTMDEC project, we want to be able to deploy a separate service (in this case documentation) and use Girder for authorization.

Approach Move the /authorize endpoint to the user and add a flag to determine whether to check for instance access. If not an instance,

To test

  docs:
    image: nginx
    networks:
      - traefik-net
    deploy:
      replicas: 1
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.docs.rule=Host(`docs.local.wholetale.org`)"
        - "traefik.http.routers.docs.entrypoints=websecure"
        - "traefik.http.routers.docs.tls=true"
        - "traefik.http.services.docs.loadbalancer.server.port=80"
        - "traefik.http.services.docs.loadbalancer.passhostheader=false"
        - "traefik.docker.network=wt_traefik-net"
        - "traefik.http.middlewares.docs.forwardauth.address=http://girder:8080/api/v1/user/authorize/"
        - "traefik.http.middlewares.docs.forwardauth.trustforwardheader=true"
        - "traefik.http.routers.docs.middlewares=docs"
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 95.45% and no project coverage change.

Comparison is base (56e8e15) 92.83% compared to head (99ad02e) 92.83%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #574 +/- ## ======================================= Coverage 92.83% 92.83% ======================================= Files 61 61 Lines 4897 4897 ======================================= Hits 4546 4546 Misses 351 351 ``` | [Impacted Files](https://codecov.io/gh/whole-tale/girder_wholetale/pull/574?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale) | Coverage Δ | | |---|---|---| | [server/rest/instance.py](https://codecov.io/gh/whole-tale/girder_wholetale/pull/574?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale#diff-c2VydmVyL3Jlc3QvaW5zdGFuY2UucHk=) | `90.32% <ø> (-0.99%)` | :arrow_down: | | [server/\_\_init\_\_.py](https://codecov.io/gh/whole-tale/girder_wholetale/pull/574?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale#diff-c2VydmVyL19faW5pdF9fLnB5) | `91.25% <95.45%> (+0.24%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.