Skip to content
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

practicality of read-only config.xml API endpoint #2731

Closed
fichtner opened this issue Sep 18, 2018 · 10 comments
Closed

practicality of read-only config.xml API endpoint #2731

fichtner opened this issue Sep 18, 2018 · 10 comments
Labels
support Community support

Comments

@fichtner
Copy link
Member

To be discussed, see https://forum.opnsense.org/index.php?topic=9707.0

@fichtner fichtner added the support Community support label Sep 18, 2018
@fichtner fichtner self-assigned this Sep 18, 2018
@ccesario
Copy link

+1

@AdSchellevis
Copy link
Member

I'm not against an endpoint for config retrieval, although I believe it should be part of a rewrite for diag_backup.php, since it's overlapping functionality. It's not very high on my list of things to work on to be honest.

Building a plugin that only serves a download config isn't much work, for consistency reasons probably won't be offered by us (certainly not in core, without replacing the old backup solution).

@fichtner
Copy link
Member Author

I was thinking such a temporary spot could maybe reside in the firmware API?

@AdSchellevis
Copy link
Member

It could, but eventually the backup api should probably have a different endpoint to better control access (people able to upgrade might not be granted access to everything that's stored in the box).

Another short term solution could be to add the download action to diag_backup.php which makes it the responsibility of whoever is going to replace this code in the future (which isn't a big issue given the functionality should be in the new api as well).

@fichtner
Copy link
Member Author

The issue with diag_backup.php or any other static page is that it's not API-key enabled. Otherwise that'd be working already...

@AdSchellevis
Copy link
Member

sorry, my mistake, moving the download to a new spot at a different namespace and using it in the legacy page could also be an option (kind of a hybrid approach), but the risk stays that eventually nobody is willing to invest into the real elephant in the room (moving the functionality), creating an indefinite hybrid component....

Adding a plugin with only a download action is easy to build and doesn't taint our support status (could stay at community support level) and can use it's own access control (lower risk of leaking sensitive data).

@fichtner
Copy link
Member Author

Now that you mention it... great idea to go forward indeed. :) That satisfies requirements from all sides and does not create roadblocks. Shall I move this to plugins then with a concrete plan?

@AdSchellevis
Copy link
Member

sure, if anyone is planning to work on it, I would even offer help if needed (just don't want to own the plugin).

@fabianfrz
Copy link
Member

fabianfrz commented Sep 22, 2018

Without encryption other data support, it would be an API endpoint with around less than 10 lines of code to download the current configuration.

@fichtner
Copy link
Member Author

@fabianfrz is that a "I'll take it"? :)

moving over to opnsense/plugins#865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Community support
Development

No branches or pull requests

4 participants