The Kubectl CLI fails with the following error in TMC-SM after nine hours from the initial login time.
| Error: rpc error: code = Internal desc = transport: per-RPC creds failed due to error: failed to run a local listener to facilitate login: listen tcp :80: bind: permission denied |
Tanzu Mission Control Self-Managed manages user authentication using Pinniped Supervisor as the identity broker and requires an existing OIDC-compliant identity provider (IDP). Logging in using the Pinniped Supervisor via the Pinniped CLI is done using the OIDC authorization code flow.
The authorization code can then be exchanged using the Supervisor’s token endpoint for the following Supervisor-issued tokens, which are cached by the CLI in a file in the user’s home directory.
Note that none of the token or credential lifetimes described in this document are currently configurable. (One exception is the lifetime of ID tokens issued to OAuth2 clients created as OIDCClients may be configured by the administrator, but that does not apply when using the Pinniped CLI, which always uses the OAuth2 client called pinniped-cli.)
The maximum amount of time that any user can continue to refresh their Supervisor session is 9 hours from the initial login time. After that, the next refresh will fail and the user must perform a fresh login. This ensures that the user’s access privileges are updated at least once a day, even if the Supervisor cannot detect an access privilege change made in the external identity provider during the day.
Delete TMC-SM context and recreate the context by following the below guideline.
|
# list the available contexts
tanzu context list
# replace the CONTEXT_NAME with the valid context, and accept yes for confirmation
tanzu context delete CONTEXT_NAME
# create tmc context with the valid token
tanzu tmc context create --endpoint tmcsm.example.com -i pinniped --basic-auth
|
More information about Pinnped tokens and credentials can be found in the following document,