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

Login API issues #2614

Closed
8 of 22 tasks
abitmore opened this issue Jul 26, 2022 · 1 comment · Fixed by #2617
Closed
8 of 22 tasks

Login API issues #2614

abitmore opened this issue Jul 26, 2022 · 1 comment · Fixed by #2617

Comments

@abitmore
Copy link
Member

abitmore commented Jul 26, 2022

Bug Description

  • The login_api::login API call will create all API objects, even if none of them is used later. It is better to only create the corresponding API object the first time an API is requested.
  • Access to the database API set can not be avoided even with the api-access option
  • The login_api::database API call will create a new database_api object, which is unnecessary since there is already one registered (according to docs, it has ID 0).
  • The following API call will fail with error too few arguments passed to method:
    curl -d '{"id":1,"method":"call","params":["login","database",[ ]]}' http://localhost:8090/
    But this API call will succeed:
    curl -d '{"id":1,"method":"call","params":[1,"database",[ ]]}' http://localhost:8090/
    It means we can not use the name "login" when calling an API in the login_api API set (but we can do that with database_api, history_api and etc). Although it doesn't matter at the moment, it will be inconvenient when we adding new APIs in login_api.
    The reason is that login_api::login is used for login but not for retrieving the ID of login_api itself.
  • Since Auto login on every ws/rpc connection using HTTP Authorization header if present #223, login_api::login("*","*") is called by default on each new connection with no username or password supplied (this is a feature). As a result, the documentation saying login must be called first is no longer true. Task: update documentation.

Note: #2618 was originally reported here but we can not fix it at the moment.

Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

Host Environment
Please provide details about the host environment. Much of this information can be found running: witness_node --version.

  • Host OS: [e.g. Ubuntu 18.04 LTS]
  • Host Physical RAM [e.g. 4GB]
  • BitShares Version: [e.g. 2.0.180425]
  • OpenSSL Version: [e.g. 1.1.0g]
  • Boost Version: [e.g. 1.65.1]

CORE TEAM TASK LIST

  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@abitmore abitmore added this to the 6.1.0 - Feature Release milestone Jul 26, 2022
@abitmore abitmore changed the title API issues Login API issues Jul 29, 2022
@abitmore abitmore linked a pull request Jul 30, 2022 that will close this issue
@abitmore
Copy link
Member Author

Fixed by #2617.

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

Successfully merging a pull request may close this issue.

1 participant