-
Notifications
You must be signed in to change notification settings - Fork 648
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
Server Info API #626
Comments
If such API could provide a estimated load of the node it would be very helpful, but dunno if it's viable to estimate it... |
I believe this belongs in the login_api. The call will return a collection of settings. Note: Care must be taken as to not expose information that could become an attack vector. If no one else is currently working on this, I'll attempt to tackle it. I'll concentrate on the server version, and then information can be added from there. Any questions/comments/advice, let me know. |
Please keep the exposed information minimal, for reasons of security. Server load is nobody's business, for example. |
The rationale of creating this issue, is that some API nodes didn't upgrade when a new feature is released, or didn't enable some plugins. It's good for clients to easily know the API server's capacity when connected, otherwise, for better user experience, the clients have to guess/detect with some methods. Nevertheless some info may be sensitive. |
Here are my thoughts and questions: Almost any information retrieved from the server can be considered a security risk. I try to always err on the side of security. But we must find the balance between giving clients the information they need to do their job, and strong security. Therefore, in the following list, I ask those with a better knowledge of the risks to assign each one of these a value of low, medium, or high risk.
I suggest that low risk items be included in the information returned from the API. Medium risk items should be available if a command line parameter is passed allowing the information (granularity will need to be discussed), and the implementation of high risk items should be evaluated individually, and not as part of this issue. I'm fairly certain that if (2) and (3) are considered anything but low risk, the items in (3) will need to be evaluated on a case-by-case basis. I feel I am at a disadvantage here, as I do not have use cases for how the API will be used. So I ask those with an interest for this API addition to chime in with why they need it. |
This. There are very few plugins that might be of legitimate interest to a client, and even for those some parameters might be considered sensitive. Note that GRAPHENE_CURRENT_DB_VERSION is not directly connected to the API. We don't have an explicit API version at this time (versioned API would be cool to have though). |
what if all of that information was packaged into single hash value?
something simple that I notice on various versions is if a price is supposed to be 2100 satoshi on the market history, some nodes will display for example: here's current example: unix - EST time - 16 digit price - volume market is BTS:OPEN.BTC |
Server info would be super helpful, even if it's just the running release information. Allowed apis would also very cool (asset_api etc), plugin settings to some extent (e.g. ES, extent of history). But of course security first, fully agree there. Minimal expectation would be release information. Thanks! |
Bad idea, IMO. Better explicitly deliver interesting information that is not a security risk. |
Quoted from bitshares/bitshares-ui#1521 (comment):
|
@pmconrad feels this is a security risk: Please comment further about what should developed regarding OP within the Issue here (rather than the PR). |
From the UI's perspective (not just reference wallet) it will be beneficial to know configuration. I would suggest having an API that exposes
Besides the last, the information can be queried manually as well (count returned history size, try access plugin and get exception, try calling non-existing calls that are specific to a server relase). Can you elaborate on the possible security risks @pmconrad ? |
If a flaw is found for certain versions / plugins or a combination of each, an attacker can query the network for which peers have that combination, making her job easier. But I believe there are legitimate reasons to provide this information. So I believe providing this ability, along with the ability to turn it off (or requiring them to turn it on), gives us flexibility with some security. I look forward to additional comments. |
An attacker that is capable enough to enter a node will also have no problem preparing a script that queries the API nodes for certain calls that allows establishing the version as well. |
just to mention #1726, it could be nice to provide the url of the rpc server as well. I suppose for security it would be best if private addresses were censored, or maybe a way around security concerns would be to make configurable what information is included. |
Here is the latest iteration of requirements. I ask that others chime in where I am wrong.
Previous PRs for this issue will need to be reworked or thrown away. I believe that if we can all agree on the above 3 points, and agree on some kind of versioning scheme for API and protocol, we can implement this fairly quickly. |
If acceptable, please include the RPC server url. |
2 should include a user-configurable custom string as requested by @sschiessl-bcp . Possibly other top-level settings as well? Can't see anything relevant at first glance. Clarifications on 3:
|
Done via #2617. |
Do we have API's so that clients can know the API servers' version and configured parameters? For example, the
history_api::get_market_history_buckets
API provides some info to clients which is useful.Inspired by this discussion.
Update: @sschiessl-bcp requested some info: #626 (comment)
## CORE TEAM TASK LIST - [ ] Design / Develop Solution - [x] Assigned: @manikey123 - [x] Note: All effort will be tracked on #782The text was updated successfully, but these errors were encountered: