Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Provide a REST API #46

Open
mpreisler opened this issue Jan 19, 2016 · 14 comments
Open

Provide a REST API #46

mpreisler opened this issue Jan 19, 2016 · 14 comments
Milestone

Comments

@mpreisler
Copy link
Member

We already provide a dbus API but some prospective users would strongly prefer a REST API. We should refactor the System and DBusDaemon classes so that we can run one service that exposes 2 APIs at the same time.

@mpreisler mpreisler modified the milestones: 0.1.2, 0.1.3 Jan 19, 2016
@jan-cerny jan-cerny modified the milestones: 0.1.4, 0.1.3 Feb 11, 2016
@mpreisler mpreisler modified the milestones: 0.1.4, 0.1.5 Mar 24, 2016
@mpreisler mpreisler modified the milestones: 0.1.5, 0.1.6 Apr 22, 2016
@mvazquezc
Copy link
Collaborator

Hi!,

I've written a Python API using flask on top of your daemon, maybe it can be integrated somehow.

https://github.com/mvazquezc/oscap-daemon-api

@mpreisler
Copy link
Member Author

Hi @mvazquezc. Your project looks great, would you be interested in refactoring it and submitting it as a pull request here? I think we could refactor the code so that dbus and REST APIs can be used in any combination, depending on config.ini.

Could you please relicense your code as LGPL? I can't change the license of this project.

@mvazquezc
Copy link
Collaborator

Sure! It will take me some time but I'll send a PR as soon as I have the new implementation coded.

@mpreisler mpreisler modified the milestones: 0.1.6, 0.2.0 Aug 5, 2016
@naltun
Copy link

naltun commented Jul 12, 2018

Hey guys. Is providing a REST API still planned, or has it been put to rest?

I wasn't aware of the dbus API, so I'll take a look at that. Having a REST API would be awesome, though. Also, I'm taking a look at @mvazquezc's oscap-daemon-api. Pretty nifty. I'll have to test that at some point.

@jan-cerny
Copy link
Member

@naltun I agree that a REST API would be awesome. However, I think it is still just an idea.

@naltun
Copy link

naltun commented Jul 12, 2018

@jan-cerny I've never hacked onto OpenSCAP (nor OpenSCAP Daemon), but if I can help out with the REST API, I'd be happy to help.

@rshade
Copy link

rshade commented Aug 22, 2018

I have been using @mvazquezc openscap api, and its great. It seems to have all the requisite features and the report and guide are awesome.

@naltun
Copy link

naltun commented Aug 22, 2018

Can OpenSCAP fork and test the project, and manage their own version? Is this a potential option?

@mpreisler
Copy link
Member Author

Can OpenSCAP fork and test the project, and manage their own version? Is this a potential option?

Definitely an option. We all have time constraints though. If you want to make it very likely that we will integrate this into openscap-daemon please feel free to submit a PR yourself. Waiting for somebody else might also sometimes work but it has been two years :-)

@rshade
Copy link

rshade commented Aug 31, 2018

@mpreisler would you be willing to make us a feature branch to work off of, so we can sync many disparate forks?

@rshade
Copy link

rshade commented Aug 31, 2018

Also can we setup a wiki for design ideas. My first initial move would be to dump @mvazquezc code in there once he changes the license out and approves it, but we would need to discuss how openscap-daemon will serve http requests.

@mvazquezc
Copy link
Collaborator

I've changed the license to use the same licenses as OpenScap Daemon.

I just took a look at this a few days ago. I've done some changes to the daemon to read the API config from the config file.

We can migrate the main class and just use the method defined on the OpenScap daemon (there is no need to talk with the DBUS daemon anymore, correct me if I'm wrong though.)

I'm willing to help with this feature, if you set up a new branch I could commit my changes there.

@mpreisler
Copy link
Member Author

We can migrate the main class and just use the method defined on the OpenScap daemon (there is no need to talk with the DBUS daemon anymore, correct me if I'm wrong though.)

Agreed, there shouldn't be any need to talk REST to dbus to daemon API, REST can talk directly to the API.

@mpreisler
Copy link
Member Author

I'm willing to help with this feature, if you set up a new branch I could commit my changes there.

just for public record, I gave @mvazquezc write access to the repo. I think doing those changes in a separate branch and then merging into master after things stabilize is the way to go.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants