-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Vault Agent 1.13.0 requires a listener block when its documented as optional #19436
Comments
Hi there! I wasn't able to reproduce this issue. The I was able to start Agent just fine with the following config, with no API proxy configuration or listeners:
I think I know the source of your issue, though, you've likely configured the API proxy through the cache stanza, like maybe something like this. It would be helpful to see your full config, though, if this isn't the case:
It's worth noting that the above config has been moved to the The above configuration is API proxy configuration, and does nothing without a defined listener. In other words, there's no reason to configure an API proxy if you're not using that use case. |
Ah, that's great info @VioletHynes! Indeed I have the Thanks for looking into this issue! We can close it now! I'd suggest to add a note in the release notes or docs to avoid other folks hitting this scenario. Its not clear that having the |
Thanks for confirming! I'll close it, and thanks for the feedback! I'll think about how best to improve this experience. |
Sorry for commenting on a closed issue, but this is somewhat confusing. Are we meant to define a |
Just wanted to chime in on this as I ran into this issue as well. Do we need a listener if we just want to use the cache? I have this in my config and the vault agent also fails to start with cache {
// An empty cache stanza still enables caching
} In my case, I don't plan to clear the cache using the api, so having to define a listener seems extraneous. |
I was hoping that #20934 fixed this, but it didn't. It appears that we are indeed supposed to define Excerpt with relevant lines from a working deployment: # Set up caching for leased secrets between Vault Agent init and runtime containers
# We need to define a`listener` block for this to work, even if nothing is meant to talk to the Agent.
listener "unix" {
address = "/run/vault.sock"
tls_disable = true
}
cache {
use_auto_auth_token = true
persist "kubernetes" {
path = "/vault/agent-cache"
}
} |
Hey! Sorry if this is still causing some kind of issue. I'd love to learn more about what's going on. You do need either a listener or templating for the cache to do anything, so we require either block -- this isn't new, as far as I can tell and remember. Just to confirm, are you saying you're getting errors enabling the cache when you do have templating in your config? Could you post what your full config is (do redact sensitive stuff!) This definitely sounds like a bug, though, you shouldn't need to add a listener and it certainly shouldn't be required for the cache. |
Oh, I just noticed that you had The reason |
@VioletHynes hey, thanks for the input. I'll revisit this tomorrow and report back. |
Going to close this one, as I think I re-opened this erroneously and the error was valid. In the config posted above, In newer versions of Agent, and our docs, we have a separate stanza,
Feel free to comment after I've closed if you think I've misunderstood in some way, or you're still getting some kind of errors even after removing the API proxy specific configuration. |
Sorry for the late reply, I wasn't able to get around to testing this earlier. The changes proposed by you work, the whole "listener config in the cache stanza" thing is confusing indeed. Thank you! Everything works just fine with the
|
Describe the bug
In Vault 1.13.0, not defining a
listener
block in avault agent
configuration will cause the following error at startup:error validating configuration: configuring the api_proxy requires at least 1 listener to be defined
This was introduced here
This is a specially opinionated decision given the fact the
api_proxy
is also not declared in the config and both directives are documented asoptional
hereTo Reproduce
Steps to reproduce the behavior:
listener
andapi_proxy
stanzas definedExpected behavior
Vault agent will start without failures and not allocate a listener
Environment:
Vault server configuration file(s):
Additional context
In our use case we use Vault Agent to render certificates and configuration file templates but we don't need any listener binding since we don't have any other processes talking to Vault. In this case, the vault agent is acting more like a
client
rather than aproxy
. So for our specific use case, this is a breaking change.The text was updated successfully, but these errors were encountered: