-
Notifications
You must be signed in to change notification settings - Fork 212
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
Refactor claims plugin to be a storage plugin #859
Conversation
8ac6766
to
45181c0
Compare
45181c0
to
3c59886
Compare
Instead of having a credential plugin, and a claims plugin, etc this refactors the plugin POC so that there is a single storage plugin with the intent of being able to offload the entire porter home directory contents (except the config file) to the plugins. For example everything that we currently store today on the filesystem could be stored in blob storage or a database. This replies upon a unmerged branch with changes to the crud.Store interface and other changes to support this. I have also stubbed in a new plugin for secrets, though it isn't completely plumbed through and will be completed in a separate PR. At the moment all secrets, for example the values that we resolve credentials from but could eventually be parameter values too among other things, are coming from a host plugin embedded in porter.
It all works. I need to catch up on tests for net new classes and write a bit more doc strings to help explain what's going on. |
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.
Impressive work on such a large and complex endeavor!
All looking good so far to me. Mostly just a few clarifications at this point...
3c59886
to
a49e58c
Compare
Use the stame instance of the storage pluginStore between the claims storage and credentials storage.
* Loading from file * Ensure our mapstructure tags are correct * Switch to default-storage-plugin for consistency
I have submitted upstream PRs for everything that was in that branch of cnab-go, added tests for all the net new structs and added go docs. I officially declare this turd polished! 🌟 |
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.
LGTM!
Only non-blocking comments/suggestions.
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 change
Instead of having a credential plugin, and a claims plugin, etc this refactors the plugin POC so that there is a single storage plugin with the intent of being able to offload the entire porter home directory contents (except the config file) to the plugins.
For example everything that we currently store today on the filesystem could be stored in blob storage or a database. For this PR that means credential sets and claims.
This replies upon a unmerged cnab-go branch with changes to the crud.Store interface and other changes to support this.
I have also stubbed in a new plugin for secrets, though it isn't completely plumbed through and will be completed in a separate PR. At the moment all secrets, for example the values that we resolve
credentials from but could eventually be parameter values too among other things, are coming from a host plugin embedded in porter.
What issue does it fix
#866
Notes for the reviewer
Checklist