Skip to content

Commit

Permalink
Add api-access console log to node startup when present
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Jul 21, 2017
1 parent 5e67be7 commit 80d81ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -110,7 +110,7 @@ API 0 is accessible using regular JSON-RPC:
Accessing restricted API's
--------------------------

You can restrict API's to particular users by specifying an `apiaccess` file in `config.ini`. Here is an example `apiaccess` file which allows
You can restrict API's to particular users by specifying an `api-access` file in `config.ini` or by using the `--api-access /full/path/to/api-access.json`. Here is an example `api-access` file which allows
user `bytemaster` with password `supersecret` to access four different API's, while allowing any other user to access the three public API's
necessary to use the wallet:

Expand Down
5 changes: 4 additions & 1 deletion libraries/app/application.cpp
Expand Up @@ -456,9 +456,12 @@ namespace detail {
_force_validate = true;
}

if( _options->count("api-access") )
if( _options->count("api-access") ) {
_apiaccess = fc::json::from_file( _options->at("api-access").as<boost::filesystem::path>() )
.as<api_access>();
ilog( "Using api access file from ${path}", ("path", _options->at("api-access").as<boost::filesystem::path>().string()) );
}

else
{
// TODO: Remove this generous default access policy
Expand Down

0 comments on commit 80d81ac

Please sign in to comment.