Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dedicated mode: control plane auth fails after token expires #484

Open
stevenctl opened this issue Mar 29, 2023 · 1 comment
Open

dedicated mode: control plane auth fails after token expires #484

stevenctl opened this issue Mar 29, 2023 · 1 comment
Assignees
Labels
area/authentication Area: Authentication (TLS and Identity) area/lifecycle Area: Lifecycle (installation, upgrade, etc)

Comments

@stevenctl
Copy link
Contributor

stevenctl commented Mar 29, 2023

RE: #440

With istio-agent, the token is intended for bootstrap and after it's fetched certs once we rely on mTLS auth.

Currently, we're tied just to the token for xDS auth

logs
2023-03-29T16:53:18.392212Z  INFO ztunnel::xds::client: sending initial request resources=0 type_url="type.googleapis.com/istio.security.Authorization"
2023-03-29T16:53:18.402299Z  WARN xds{id=5310}: ztunnel::xds::client: XDS client connection error: gRPC connection error (The request does not have valid authentication credentials): authentication failure, retrying in 15s
2023-03-29T16:53:33.415420Z  INFO ztunnel::xds::client: sending initial request resources=11 type_url="type.googleapis.com/istio.workload.Workload"
2023-03-29T16:53:33.415465Z  INFO ztunnel::xds::client: sending initial request resources=0 type_url="type.googleapis.com/istio.security.Authorization"
2023-03-29T16:53:33.424895Z  WARN xds{id=5311}: ztunnel::xds::client: XDS client connection error: gRPC connection error (The request does not have valid authentication credentials): authentication failure, retrying in 15s

Immediately after manually refreshing the token

2023-03-29T16:53:48.441406Z  INFO ztunnel::xds::client: sending initial request resources=11 type_url="type.googleapis.com/istio.workload.Workload"
2023-03-29T16:53:48.441454Z  INFO ztunnel::xds::client: sending initial request resources=0 type_url="type.googleapis.com/istio.security.Authorization"
2023-03-29T16:53:48.475730Z  INFO xds{id=5312}: ztunnel::xds::client: Stream established
2023-03-29T16:53:48.475805Z  INFO xds{id=5312}: ztunnel::xds::client: received response type_url="type.googleapis.com/istio.workload.Workload" size=11
2023-03-29T16:53:48.475938Z  INFO xds{id=5312}: ztunnel::xds::client: received response type_url="type.googleapis.com/istio.security.Authorization" size=0
2023-03-29T16:53:48.576655Z  INFO xds{id=5312}: ztunnel::xds::client: received response type_url="type.googleapis.com/istio.workload.Workload" size=1
@stevenctl stevenctl added area/authentication Area: Authentication (TLS and Identity) area/lifecycle Area: Lifecycle (installation, upgrade, etc) labels Mar 29, 2023
@stevenctl stevenctl self-assigned this Mar 29, 2023
@costinm
Copy link
Contributor

costinm commented May 5, 2023

My suggestion is to add an option (TOKEN_URL) to allow customization of the address to get new tokens for VMs and similar managed environments. A per VM agent acting as MDS could be used for non-cloud VMs - most cloud VMs
have a MDS that can give them tokens.

It is a far simpler and direct mechanism then attempting to use mTLS and have the agent refresh the cert.

We can also support mTLS - if Spire or some other external entity takes care of refreshing them, but I would
prioritize JWT-based to keep things consistent and simple.

Note that getting JWT tokens from a MDS will also help for ztunnel to talk with external hbone servers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/authentication Area: Authentication (TLS and Identity) area/lifecycle Area: Lifecycle (installation, upgrade, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants