XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.2k stars 510 forks source link

How to execute admin commands? #1377

Closed Mwni closed 3 years ago

Mwni commented 3 years ago

Hi, the plan is to run a admin command on a self-hosted validator. Sadly, the docs state nothing about how to pass the admin credentials to the API. The description in the server's ripped.cfg states:

#   admin_user = <text>
#   admin_password = <text>
#
#       When set, clients must provide these credentials in the submitted
#       JSON for any administrative command requests submitted to the HTTP/S,
#       WS, or WSS protocol interfaces. If administrative commands are
#       disabled for a port, these credentials have no effect.

However, the API does not allow for these extra keys.

Using IP whitelisting instead does not work either. Tried values were:

[port_ws_public]
port = 6005
ip = 0.0.0.0
protocol = ws
admin = ::ffff:127.0.0.1, ::1, ::ffff:MY_REMOTE_IP, MY_REMOTE_IP

where I even tried running ripple-lib locally on the validator, to no avail.

elmurci commented 3 years ago

@Mwni Have you tried the authorization parameter int he RippleAPI constructor? The value should be in the following format: username:password.

intelliot commented 3 years ago

@Mwni We're closing this issue because we haven't heard from you in a while. However, feel free to open a new issue if the problem persists. Thanks!