-
Notifications
You must be signed in to change notification settings - Fork 17
Add keybridge satellite service #164
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
Add keybridge satellite service #164
Conversation
472129b
to
1601762
Compare
Fixes: samba-in-kubernetes#160 While it's not strictly necessary to make the protobuf file(s) part of the python library because we generate the code ahead of time this silences a warning from setuptools as well as making the file part of the library, so it's distributed along with the code - which could possibly be helpful in some situations. And it will be consistent with our plans for varlink interface files, which do *need* to be part of the library. Signed-off-by: John Mulligan <[email protected]>
55edd63
to
b58a8b5
Compare
I don't this this is necessarily 100% complete for all of our KMIP needs but I think it's sufficient for now, enough to be reviewed and possibly merged. Other bugs and features can be tackled in later PRs. |
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.
Overall looks fine, but see my comments on the thread-safety for the caching mechanism.
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
sambacc/varlink/interfaces/org.samba.containers.keybridge.varlink
Outdated
Show resolved
Hide resolved
Define a simple-ish interface for fetching data blobs from a peer service. The intent is that the backing service can be a basic key-value store or a more complex secret store. The keybridge server encapsulates the complexity of talking to a web-service or whatnot requiring the client to only deal with identifying the scope and key to fetch the value. Plus debugging and introspection stuff. Signed-off-by: John Mulligan <[email protected]>
Add a new keybridge extra. It will be used to build a server that depends on varlink and kmip libraries. Adding it now allows mypy to do it's thing. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
b58a8b5
to
6af69af
Compare
8d6053a
to
4f987c3
Compare
Was also missing a new |
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
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.
Generally lgtm. I haven't looked deep into the core KMIP and peer verification logic but the varlink server implementation (and its integration with sambacc) looks pretty good.
The sambacc varlink server types wrap the python varlink libraries types allowing it to more flexibly initialize the services (aka endpoints). Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Instead of constantly having to define new dedicated subcommands for things that don't fit neatly under the `samba-container` umbrella, create a new concept for things provided by sambacc that "orbit" the samba & smbd processes but are very optional in most scenarios. Establish the keybridge server as our first satellite. The keybridge server can be set up via the sambacc config or configured/customized by command line values. In particular, the TLS credentials needed for KMIP can be specified on the command line while the other params are in the file because of ceph-shaped reasons. Signed-off-by: John Mulligan <[email protected]>
Add the new varlink and kmip related packages to the list in the setuptools config. Sort the list of packages so it's easier to read and understand. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Add the samba-satellite script to the setup.cfg configuration as well as the example RPM spec file. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
I am certain that the .varlink and .proto files were being added to the source tarballs and wheels. However, when testing the container image I found that they were missing from the RPM. After mostly fruitless web searches and some pretty nonsense LLM responses I closely read the output being generated by the rpm python tools and revisited the docs and it managed to loosen something up to revisit MANIFEST.in and... it worked. Signed-off-by: John Mulligan <[email protected]>
c86f8d4
to
aca87d7
Compare
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.
Still lgtm.
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
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
A satellite service is a service provided by sambacc that "orbits" smbd or another core samba daemon, providing it optional enhanced features.
Our first sattelite service is
keybridge
- a server process that provides a varlink based RPC over a local unix socket. The keybridge server acts like a key-value store, where keys are embedded in a particular scope. That scope can be simple - such as a mapping in memory - or complex such as a KMIP client. Keybridge exists to hide complexity from smbd allowing it to focus on getting key material using this simple API.