-
Notifications
You must be signed in to change notification settings - Fork 30
Fix listen address processing #24
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
Conversation
8acf5b1 to
5f3e5d4
Compare
|
Thanks for this Chris! I'm a bit torn on one part though: I agree it seems a little wrong to have a different function signature of Also, the I have a busy next few days, so I'll think some more on this, and come back to this. again, thank you! |
|
No worries, I didn't think this diff would land right away. It just seems easier to reason about the purpose and future of For the local deployment case, I'll rework the logic to not ignore the Data sharing/isolation/security is on my mind. Single-user-multi-display is my primary use case for web deployment, but I know some other people who also think gamma ray spectroscopy is fun. For now, they can install interspec on their devices and can all work out of a shared drive. It might be useful if we could have a central interspec instance backed by some shared storage. I assume there are still other interspec users who turned pale and shouted "oh heck no!" at the thought of exposing their spectra and analysis on the internet. In a way this isn't too different from Jupyter. I run jupyter on my laptop for quick prototypes, and on my workstation where I have more resources. I could put a reverse proxy in front of that so I could hit it remotely. And I've seen jupyter deployed in business setting using various auth and isolation models from a single host with a single shared password, all the way up to dockerized with a container per user and auth via SSO. Again, this is for discussion and there's no need to merge this urgently. I'd rather take the time to figure out the right way than to quickly ship bugs. |
wcjohns
left a comment
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.
Sorry its taken so long to get to this request.
I wasn't ignoring it - I was thinking about the how the network adapter address to bind to is specified. Making the call to InterSpecServer::start_server(...) consistent wether it is being deployed as a web-app or not does clean stuff up in some ways. However, you are then left with a parameter that gets a runtime check that its value is exactly the one value that is allowed. I am always afraid of critical runtime checks getting broken in the future, on accident. And it moves catching a mistake (invalid bind address used) from compile-time, to runtime, which I'm slightly not in favor of.
So I think I would prefer to leave the function signature as changing, depending on BUILD_FOR_WEB_DEPLOYMENT.
However, this pull request does fix some definite bugs in checking for configuration parameters being specified when built for web deployment. E.x., if( cl_vm.count("config") ) should be if( 0 == cl_vm.count("config") ), as you have fixed. And I like the information message you added to stdout.
Would you be willing to submit a pull request that fixes these bugs, but doesn't change the start_server(...) function signature?
If not, or you would prefer, I will be happy to manually apply your bug fixes in this request.
Thank you for these fixes, and this discussions,
-will
|
Thanks for the feedback, I'll have an updated PR for you shortly. |
Whatever skin it's wearing InterSpec is a web app. It smells wrong to me to change the function signature of start_server and friends depending on whether BUILD_FOR_WEB_DEPLOYMENT or BUILD_AS_LOCAL_SERVER are defined, when all the same data files are being used and all javascript and HTML is being served no matter what display engine is being used.
This diff does a few things:
--http-addressoptional, and uses the localhost default if not otherwise specifiedTested with