<#6089 [BUG] Flytectl authentication not working w...
# flyte-github
c
#6089 [BUG] Flytectl authentication not working with GCP IAP Issue created by gverkes ### Describe the bug After having set up IAP with Flyte according to https://pypi.org/project/flytekitplugins-identity-aware-proxy/, the
flytectl
command during flyte authentication seems to fail due to IAP. During the Flyte authentication the initial IAP works fine, but during the callback I get the error:
Couldn't get access token due to error: oauth2: cannot fetch token: 401 Unauthorized Response: Invalid IAP credentials: empty token
. Connecting through Flytekit or the console works fine. #### versions $ flytectl version { "App": "flytectl", "Build": "89efcc62a", "Version": "0.9.2", "BuildTime": "2024-12-06 100641.50991 +0000 WET m=+0.017617709" } `flyte-core`:
1.13.3
### Expected behavior The proxyCommand provides a token for IAP, that should be properly propagated, such that the Flyte authentication succeeds. Just like Flytekit ### Additional context to reproduce 1. Setup Flyte + IAP according to the tutorial on https://pypi.org/project/flytekitplugins-identity-aware-proxy/ 2. Set
config.yaml
to something like (also used for flytekit, which does work):
Copy code
admin:
  endpoint: dns:///example.com
  insecure: false
  insecureSkipVerify: false
  authType: Pkce
  proxyCommand: ["flyte-iap", "generate-user-id-token", "--desktop_client_id", "xxxxx.apps.googleusercontent.com", "--desktop_client_secret_gcp_secret_name", "flyte-desktop-oauth-client-secret", "--webapp_client_id", "xxxxx.apps.googleusercontent.com", "--project", "project-1"]
1. Try to run something like
flytectl get project
### Screenshots [image](https://private-user-images.githubusercontent.com/7087142/393199894-97ee88e7-f20d-489f-8c22-ee1273f74d4d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDk1MTQ0OTYsIm5iZiI6MTc0OTUxNDE5NiwicGF0aCI6Ii83MDg3MTQyLzM5MzE5OTg5NC05N2VlODhlNy1mMjBkLTQ4OWYtOGMyMi1lZTEyNzNmNzRkNGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDYxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTA2MTBUMDAwOTU2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDhjNjgwNjU1YzRmOGMwZmJiN2IyY2E1YmE4YzU5NGI0NGJhMDNmZWNjNmYxMjMxZTgyOTFjMGY4NjBjMTcxZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.5aA-AkGhAIVINMQ4WWZVyZxshC6wzPelVo6NMZwvUKg) ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte