Giter VIP home page Giter VIP logo

Comments (4)

a-martynovich avatar a-martynovich commented on June 5, 2024

@vpetersson
I believe DBus is suitable for providing RPC API. You can check the caller's PID and UID, you have static typing and async, and there're bindings for every major language.
For Python there's https://github.com/LEW21/pydbus which is recommended by Freedesktop. Its dependencies are all present in Debian Stretch (as well as Ubuntu) APT repo. And it provides a ready-to-use systemd interaction like starting/stopping services, notifications, etc.

from agent.

vpetersson avatar vpetersson commented on June 5, 2024

@a-martynovich My major reservation for DBUS is that it is a bit more complicated to develop for versus a restful API and thus makeing it a bit more complicated for 3rd party app developers to integrate with our credential manager.

from agent.

a-martynovich avatar a-martynovich commented on June 5, 2024

@vpetersson If you look at pydbus examples they don't look too complicated. A unix socket based JSON API is not much easier (if not harder) to use, because it requires establishing socket connection, watching it, packing and unpacking the data. Either way we'll have to provide an easy to use API library for 3rdparty devs which will handle connection details itself.

I forgot that DBus won't work in Docker, thus making it a bit harder for CircleCI testing. But that also goes to systemd and journalctl which agent uses.

So when we're prototyping a unix socket JSON interface is fine, but it doesn't suit your global purpose.

from agent.

vpetersson avatar vpetersson commented on June 5, 2024

I've spent some time thinking about this, and I think you are right about using DBUS. However, it doesn't fully solve the problem, so here is what I suggest:

  • Ignore the API side for now and only worry about converting the agent from a cronjob to a service
  • For #86, let's ignore the API, but instead draw inspiration from Kuberenetes Secrets. What I mean by that is that we simply write the secret to a file on disk and use proper file permission.

from agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.