acoustic-carpenter-78188
08/15/2023, 5:05 PMpyflyte and flytectl cannot reach flyteadmin through IAP).
None of this is great.
Propose: Link/Inline OR Additional context
This issue tracks the integration of flyte with IAP, consisting of the following tickets:
• flyteorg/flytekit#1795
Adding a plugin, providing a CLI that can be used by flytekit (and flytectl) as an external command to generate access tokens for IAP (see here for "external command" authentication in flyte).
To create this token, the plugin performs a standard OAuth 2.0 flow with <https://accounts.google.com> (not with flyteadmin).
• flyteorg/flytekit#1787
Giving `flytekit`'s Remote (used by pyflyte) the ability to send "proxy-authorization" headers valid for IAP (generated with the new plugin) with every request, including the unauthenticated requests during the authentication flow with flyteadmin.
In flyte's client config this will look as follows:
admin:
endpoint: dns:///flyte.my-company.com
insecure: false
authType: Pkce # or ClientSecret, ExternalCommand, ...
proxyCommand: ["flyte-iap", "", "generate-user-id-token", "--desktop_client_id", "..."]
If a request, even one that is not yet authenticated with flyteadmin (via "authorization" headers), includes a valid "proxy-authorization" header, IAP strips this "proxy-authorization" header and forwards the request to flyteadmin without touching the "authorization" header used by Flyte.
If no valid "proxy-authorization" is included, the request is denied at the load balancer.
This means that the existing authentication flow `flytekit`'s Remote performs with flyteadmin is not modified. flyteadmin itself is not aware that it is protected with IAP.
• Implementing the same for flytectl. The external command can of course be reused.
• (Fixing a bug in the flyte helm chart that breaks deployments with the GCE ingress controller (instead of nginx) as IAP only works with GCE ingresses. #3964) <- Not needed anymore, see reason
• Adding documentation on how to deploy the flyte helm chart with a GCE ingress, GCP managed certificate, and IAP. The guide is currently documented in the README.md of the flytekit iap plugin added in flyteorg/flytekit#1795 (It could be moved from there.)
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyte