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

REST API to interact with fish_config #2240

Closed
gretel opened this issue Jul 24, 2015 · 4 comments
Closed

REST API to interact with fish_config #2240

gretel opened this issue Jul 24, 2015 · 4 comments

Comments

@gretel
Copy link

gretel commented Jul 24, 2015

i like the universal scope in fish and do use it quite often. i thought about a way to change the value of a variable from the outside of fish. then i stumbled upon https://github.com/typicode/json-server - while serving a different purpose i like it's simplicity. what'd be wonderful for me to have is using curl to interact with a little API reflecting set. i'd be glad if you'd share your thoughts. regards 💾

@zanchey
Copy link
Member

zanchey commented Jul 24, 2015

The fish_config server has some glue code which converts between HTTP requests and universal variables, so you could use that for inspiration.

I'm not sure shipping something like this turned on in fish by default is a good idea. In particular, it is possible to execute arbitrary code from universal variables, so some consideration should be given to securing the interface. (See #1438 for how this caused problems in the past.)

@gretel
Copy link
Author

gretel commented Jul 24, 2015

@zanchey thanks for pointing that out, i didn't connect the existing code in regards to http to my idea. of course, i should have added

  • should not be enabled by default
  • have some sort of authentication in place
  • bind to localhost only even if enabled

@zanchey
Copy link
Member

zanchey commented Jul 27, 2015

The existing Python doesn't fully follow the REST model, but it does marshall between universal variables and JSON, so if you wanted to convert the API that might be the way to go - then at least you have one known consumer in the codebase. I'm not sure how AngularJS goes with the full REST experience, so that might be something to get worked out before altering the server side.

@floam floam added this to the fish-tank milestone Jul 5, 2016
@floam floam changed the title REST API to interact with the data structures stored by fishd REST API to interact with fish_config Jul 5, 2016
@krader1961 krader1961 modified the milestone: fish-tank Nov 17, 2016
@krader1961 krader1961 added the RFC label Nov 17, 2016
@krader1961
Copy link
Contributor

I am closing this issue since there is no compelling use case and the security implications are significant.

@krader1961 krader1961 added this to the will-not-implement milestone Dec 17, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants