Summary
Requirements
• We need to authorize users of Flyte services on all GKE clusters. Only MSAT employees should be able to access these services.
• We will provision multiple GKE clusters, each with their own Flyte installation.
• We want the provisioning and bootstrapping of Flyte clusters to be fully automated.
• Ideally, we can leverage Google IAP to protect all deployments at the Google Organization and Project levels.
• Ideally, we can push TLS termination and user authorization to the edge components (e.g., using
GKE Ingress for HTTPS load balancing).
Flyte comes with auth out-of-the-box
•
Flyte has authentication built-in, once you enable it.
• Currently, we configure
Flyte to use OAuth client authorization. This has one major drawback: we have to
manually configure the OAuth domains and redirect URIs for each Flyte deployment.
• We cannot automate creating OAuth clients.
◦ If you use the Google APIs to create new OAuth clients, then you cannot use the GCP console to update the client (to add domains and redirects, see
here).
◦ Google lacks APIs to configure IAP origins and redirect URIs programmatically.
What we’ve tried
• GCP external HTTPS load balancer as the ingress controller for the Flyte ingress
• not using
contour, the default ingress controller Flyte uses
• Flyte authentication disabled (
common.adminServer.server.security.useAuth: false
)
• custom backend-configs for the Flyte GKE services, with GCP IAP enabled
What IS working
• OK: custom backend configs and Google health checks from external HTTPS load balancer to Flyte services running on HTTP port 80
• OK: IAP authorization to Flyte HTTPS workloads through the browser
What IS NOT working
• FAIL: Google backend configs and health checks to gRPC service endpoint.
◦
GCP: use only TCP for grpc health checks: “For backend services that use the gRPC protocol, use only gRPC or TCP health checks. Do not use HTTP(S) or HTTP/2 health checks.”
◦
GKE ingress: you can only use HTTP, HTTPS, or HTTP/2 for health checks: “PROTOCOL used by probe systems for health checking. The
BackendConfig
only supports creating health checks using the HTTP, HTTPS, or HTTP2 protocols.”
• FAIL:
flytectl
CLI connecting to
flyteadmin
behind GCP external HTTPS load balancer