#4592 [BUG] flytectl cannot validate JWT token
Issue created by
givanovexpe
On every flytectl invocation we get an RPC error that points to a JWT verification failure.
could this be related to this issue -
https://flyte-org.slack.com/archives/CP2HDHKE1/p1699281995557189
$ flytectl get projects
{"json":{"src":"viper.go:400"},"level":"debug","msg":"Config section [admin] updated. Firing updated event.","ts":"2023-12-13T14
2148Z"}
{"json":{"src":"viper.go:398"},"level":"debug","msg":"Config section [storage] updated. No update handler registered.","ts":"2023-12-13T14
2148Z"}
{"json":{"src":"viper.go:398"},"level":"debug","msg":"Config section [root] updated. No update handler registered.","ts":"2023-12-13T14
2148Z"}
{"json":{"src":"viper.go:398"},"level":"debug","msg":"Config section [files] updated. No update handler registered.","ts":"2023-12-13T14
2148Z"}
{"json":{"src":"viper.go:398"},"level":"debug","msg":"Config section [console] updated. No update handler registered.","ts":"2023-12-13T14
2148Z"}
{"json":{"src":"client.go:63"},"level":"info","msg":"Initialized Admin client","ts":"2023-12-13T14
2148Z"}
{"json":{"src":"auth_interceptor.go:86"},"level":"debug","msg":"Request failed due to [rpc error: code = Unauthenticated desc = token parse error [JWT_VERIFICATION_FAILED] Could not retrieve id token from metadata, caused by: rpc error: code = Unauthenticated desc = Request unauthenticated with IDToken]. If it's an unauthenticated error, we will attempt to establish an authenticated context.","ts":"2023-12-13T14
2151Z"}
{"json":{"src":"auth_interceptor.go:91"},"level":"debug","msg":"Request failed due to [Unauthenticated]. Attempting to establish an authenticated connection and trying again.","ts":"2023-12-13T14
2151Z"}
{"json":{"src":"token_source_provider.go:233"},"level":"info","msg":"retrieved token with expiry 2023-12-13 14
5152.947038086 +0000 UTC m=+1805.303830171","ts":"2023-12-13T14
2153Z"}
{"json":{"src":"project.go:102"},"level":"debug","msg":"Retrieved 2 projects","ts":"2023-12-13T14
2154Z"}
== flyteadmin auth setup
userAuth - Okta
appAuth - selfAuthServer
server.yaml: |
auth:
appAuth:
selfAuthServer:
staticClients:
flyte-cli:
audience: null
grant_types:
- refresh_token
- authorization_code
id: flyte-cli
public: true
redirect_uris:
-
http//localhost53593/callback
-
http//localhost12345/callback
response_types:
- code
scopes:
- all
- offline
- access_token
flytectl:
audience: null
grant_types:
- refresh_token
- authorization_code
id: flytectl
public: true
redirect_uris:
-
http//localhost53593/callback
-
http//localhost12345/callback
response_types:
- code
scopes:
- all
- offline
- access_token
flytepropeller:
audience: null
client_secret: ...
grant_types:
- refresh_token
- client_credentials
id: flytepropeller
public: false
redirect_uris:
-
http//localhost3846/callback
response_types:
- token
scopes:
- all
- offline
- access_token
thirdPartyConfig:
flyteClient:
audience: ""
clientId: flytectl
redirectUri:
http//localhost53593/callback
scopes:
- offline
- all
authorizedUris:
- https://<public_url>
-
http://flyteadmin
-
http//flyteadmin.flyte.svc.cluster.local80
userAuth:
openId:
baseUrl: https://<okta_url>/oauth2/default
clientId: ...
clientSecretFile: ...
scopes:
- profile
- openid
flyteorg/flyte