-
Notifications
You must be signed in to change notification settings - Fork 495
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
Create a notifier plugin for AWS #1512
Comments
I have been struggling trying to figure it out how to create a notifier plugin based on Amazon's S3. Some context
So, to properly implement step 3, I need some support from the remote storage, which S3 doesn't seem to provide. All this bundle uploading to a remote storage is to enable the agents to boot using the trust bundle retrieved from a specified URL (as described here). Some possibilities/ideas
|
The notifier interface was originally created to satisfy the bundle update use case, with the thinking that more "notification" use cases would bubble up in the future. Unfortunately, we haven't really seen that happen. In the meantime, we modeled this bundle update use case against the notifier interface, which is event-driven. There are a lot of things that can cause this bundle update event to be fired... and if we are going to handle it appropriately, then consistency and concurrency become big concerns. I think the problem here is that our use case doesn't really require us to worry about concurrency or consistency. What we need is a bundle that is sufficiently up-to-date for agent bootstrapping. If I was an operator using SPIRE today, and I wanted a bundle on S3, I'd probably just write a cron job that pulls a copy of the bundle and uploads it every 5 minutes.... and, I bet that would work in most cases It makes me wonder what other options we have. It feels like the notifier interface isn't a good fit. |
Yeah, I concur. The notifier interface really hasn't turned out to be a good fit, even for bundle notifications, where we currently don't even use the bundle in the event payload because of the requisite read-modify-write conflict detection cycle the plugins have to employ so that servers don't overwrite recently published changes with stale results. |
@azdagron what would your preferred solution here be? Something inside SPIRE Server that knows how to do this, or something in a different binary? |
Good question. I do think this job can be performed satisfactorily from an outside binary consuming the Bundle.GetBundle endpoint. We've already got one of those (the oidc-discovery-provider), so there is precedent for building a sidecar binary to provide API-enabled behavior. I probably need to think about it. If it was implemented in SPIRE server, would we still want it pluggable or would we just implement various bundle "sources" directly? |
I don't know... we are getting uncomfortably close to |
This work never completed due to consistency model mismatch between the notifier plugin and S3. I don't think it will ever complete due to this reason. Rather than keep this issue, I opened a new issue (#2909) suggesting we deprecate the notifier plugin in favor of a new plugin that is built for this specific purpose. If we take this route, I think we can get our S3 bundles. Thanks very much to @martincapello for doing the research here 🤗 |
Create a notifier plugin for AWS for non-K8S usage, similar to the gcsbundle notifier plugin.
The text was updated successfully, but these errors were encountered: