Peter Roelants
03/15/2021, 6:09 PMserver.ui.apollo_url
is called from the browser (and not from the server where the UI is running).
For example, I have a docker-compose managed prefect server somewhere with an internal network called prefect-server
, which has both apollo
, ui
, and the other prefect server services. Using apollo_url="<http://localhost:4200/graphql>"
only works if I also bind apollo:4200
to the local 4200
port where I'm running the browser from.
For example setting apollo_url="<http://apollo:4200/graphql>"
and letting the UI -> GraphQL connection go via the docker network wouldn't work afaik. In this case I see the following error in my browser's JS console:
VM9:1 POST <http://apollo:4200/graphql> net::ERR_NAME_NOT_RESOLVED
nicholas
Peter Roelants
03/15/2021, 7:48 PMnicholas
Andrew Druchenko
03/15/2021, 11:10 PMPeter Roelants
03/16/2021, 5:50 AMAndrew Druchenko
03/16/2021, 8:02 AMJonathan Wright
03/16/2021, 4:18 PMAndrew Druchenko
03/16/2021, 4:32 PM<http://prefect.yourcompany.com|prefect.yourcompany.com>
)
2. Oauth2-proxy checks for secure cookie and if there’s none or it is expired, presents you with a special page asking to redirect you for login at your Oauth provider
3. You click that button, then you’re redirect to login page and then you’re redirected back again to <http://prefect.yourcompany.com|prefect.yourcompany.com>
4. At this point, your browser has secure cookie issued by Keycloak
5. All requests to prefect backend API (apollo) issued by Prefect UI from browser are all having secure cookie, so that they are correctly proxied by oauth2-proxy to upstream apollo service
The only “glitch” and minor inconvenience is that once cookie expires, Prefect UI just starts displaying you tons of weird errors (since all backend requests start to fail at this time) Only full browser refresh helps
So, TL;DR; — try to find something similar with your OAuth provider and/or use KeycloakJonathan Wright
03/16/2021, 5:12 PMJonathan Wright
03/16/2021, 5:20 PMAndrew Druchenko
03/16/2021, 6:29 PMAndrew Druchenko
03/16/2021, 6:29 PMJonathan Wright
03/16/2021, 6:54 PMBring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by