-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Warn if ACL is enabled but no token is provided to Envoy #15967
Conversation
299ba29
to
f48b94e
Compare
98bdd2a
to
0874992
Compare
978deec
to
48f14ba
Compare
Help: "Measures the number of active xDS streams handled by the server split by protocol version.", | ||
}, | ||
{ | ||
Name: []string{"xds", "server", "streamsUnauthenticated"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this read better as unauthenticatedStreams
?
I thought it would be nicer to close to the related streams
gauge when sorted alphabetically.
xDSv3 atomic.Uint64 | ||
unauthenticated atomic.Uint64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -541,6 +541,7 @@ These metrics are used to monitor the health of the Consul servers. | |||
| `consul.grpc.server.stream.count` | Counts the number of new gRPC streams received by the server. Includes a `server_type` label indicating either the `internal` or `external` gRPC server. | streams | counter | | |||
| `consul.grpc.server.streams` | Measures the number of active gRPC streams handled by the server. Includes a `server_type` label indicating either the `internal` or `external` gRPC server. | streams | gauge | | |||
| `consul.xds.server.streams` | Measures the number of active xDS streams handled by the server split by protocol version. | streams | gauge | | |||
| `consul.xds.server.streamsUnauthenticated` | Measures the number of active xDS streams handled by the server that are unauthenticated because ACLs are not enabled or ACL tokens were missing. | streams | gauge | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this gauge look like if ACLs are enabled. Will we have any (long-lived) xDS streams that are unauthenticated? Or would this basically be a gauge of the attempts to open an xDS stream that are unauthenticated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether ACLs are on or off this gauge will track streams that do not have tokens associated with them. I'm not entirely sure if any unauthenticated streams will be long-lived, unless the anonymous token is privileged enough to continue operating.
Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
7c54180
to
25760a9
Compare
Description
When ACLs are enabled, the CLI command
consul connect envoy
requires a valid ACL token for the sidecar proxy to function. However, the command may not error in the absence of a token since the anonymous token fallback will usually be sufficient forconsul connect envoy
to complete execution.This PR adds a call to check if ACLs are enabled then outputs a warning if ACLs are enabled but no token was provided.
This PR also adds a metric to count the number of unauthenticated streams in xDS.
PR Checklist