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

Strip local ACL tokens from RPCs during forwarding if crossing datacenters #7414

Closed
rboyer opened this issue Mar 9, 2020 · 1 comment · Fixed by #7419
Closed

Strip local ACL tokens from RPCs during forwarding if crossing datacenters #7414

rboyer opened this issue Mar 9, 2020 · 1 comment · Fixed by #7419
Assignees
Labels
theme/acls ACL and token generation
Milestone

Comments

@rboyer
Copy link
Member

rboyer commented Mar 9, 2020

When forwarding RPCs from servers in one datacenter to servers in a different datacenter we should do something reasonable if we know in advance the ACL token attached to the RPC is a local token (and thus would not be resolvable in the remote datacenter).

The easy first fix would be to do this munging on the local server. If the token is detected as a local token simply strip it and forward the RPC along as-is. On the destination side this will activate the anonymous token.

A related fix would be to do a similar process when doing local forwarding from clients to servers. If the local client detects that a local ACL token is being passed, and the destination is not the current datacenter it should substitute the agent default token if present. This is conceptually similar to what would happen if you had an API call come in with no token to a client.

This couples nicely with the server-to-server fix above in the event that the agent default token itself was a local token.

@rboyer rboyer added the theme/acls ACL and token generation label Mar 9, 2020
@rboyer rboyer added this to the 1.8.0 milestone Mar 9, 2020
@rboyer rboyer self-assigned this Mar 9, 2020
@rboyer
Copy link
Member Author

rboyer commented Mar 9, 2020

This would provide one easy way to work around the scenario in #7381 by ensuring the anonymous token was setup to have a policy like:

service_prefix "" { policy = "read" }
node_prefix    "" { policy = "read" }

This is hopefully not too much to ask as it's roughly what you'd already need if you were exposing service discovery via DNS anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/acls ACL and token generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant