jgarzik / jgarzik/python-bitcoinrpc

authentication in example outdated?

Aperta
#94 3 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
663
Fork
300
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Authentication in the example did not work for me:
`# rpc_user and rpc_password are set in the bitcoin.conf file`
`rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:8332"%(rpc_user, rpc_password))`

Instead I followed this source:
https://github.com/bitcoin/bitcoin/blob/master/doc/JSON-RPC-interface.md#json-rpc-interface

> Secure authentication: By default, Bitcoin Core generates unique login credentials each time it restarts and puts them into a file readable only by the user that started Bitcoin Core, allowing any of that user's RPC clients with read access to the file to login automatically. The file is .cookie in the Bitcoin Core configuration directory, and using these credentials is the preferred RPC authentication method. If you need to generate static login credentials for your programs, you can use the script in the share/rpcauth directory in the Bitcoin Core source tree. As a final fallback, you can directly use manually-chosen rpcuser and rpcpassword configuration parameters---but you must ensure that you choose a strong and unique passphrase (and still don't use insecure networks, as mentioned above).

The cookie-method worked for me. With the this mehtod, the example would look like this::
`#The file .cookie in the Bitcoin Core configuration directory specifies your login credentials each time bitcoin core is started`
`rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:8332"%("__cookie__", "yourpassword")`

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with the authentication example shown in the issue and compare it with Bitcoin Core's linked JSON-RPC interface documentation. Locate the example in the repository, verify the supported credential method, and consider the work complete when the example reflects the documented authentication approach and remains usable.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api, documentation
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.