|
|
|||||||||
Password Authentication For a real NodeBrain application, we want to use Webster as an interface to a NodeBrain agent, and perhaps for configuring NodeBrain rules using CGI scripts. But first we need to provide some form of user authentication to limit access to a small number of application administrators. We'll start with basic password authentication. First kill your webster1 process and execute webster2. (If you have problems, you can always go back to using webster1 to access this page again.)
#!/usr/bin/nb -d # File: tutorial/webster/webster2 set out=".",log="webster.log"; define webster node webster); webster. define uri cell "http://0.0.0.0:62443"; webster. define Authenticate cell "password"; # Default is "yes" webster. define AccessList cell "security/AccessList.conf"; set traceWebster; Click on your browser's refresh button and you should get a prompt for the user and password. Enter user "webster" and password "2torial". These values have been configured in the tutorial/Webster/security/AccessList.conf file included in the distribution. Warning: Using a default configuration like this is not actually secure because anyone with this documentation has access using the default tutorial port, user and password. So you should not leave webster2 running with default values for a long period. Changing or Adding Passwords Although, HTTP basic authentication is not recommended, you can improve it a bit by changing the password. If you don't plan to use basic authentication, you can skip this section, but remember to kill your webster2 process at the end of this tutorial. If you look in your tutorial/Webster/log/webster.log you will see an entry like this.
# Webster Access List # Format: # # role,userid; [# comment] # # role: a - administrator # b - browser # a,d2Vic3RlcjoydG9yaWFs; # webster:2torialThe easiest way to change the user and password is to:
# Webster Access List # Format: # # role,userid; [# comment] # # role: a - administrator # b - browser # #a,d2Vic3RlcjoydG9yaWFs; # webster:2torial a,new-value; Copyright © 2014 NodeBrain.org |