Connecting to a RAD Remote Instance and Authenticating in Python
When connecting to a remote instance, no implicit authentication is performed. The connection is not established until you authenticate. The rad.auth
module provides a utility class (RadAuth
), which may be used to perform a PAM login. If you provide a username and password, authentication is non-interactive. If you do not provide username and password, you will receive a console prompt for the missing information.
Example 2-32 Python Language – Creating a RAD Remote Connection Over TLS
>>> import rad.connect as radcon >>> import rad.auth as rada >>> rc=radcon.connect_tls("host1") >>> # Illustrate examining RadConnection state. >>> print rc <open RadConnection > >>> auth = rada.RadAuth(rc) >>> auth.authenticate("jdoe", "xxxpasswordxxx") >>> <now authenticated and can use this connection> >>> rc.close() >>> print rc <closed RadConnection > >>>
RAD is deployed as two cooperating processes. A proxy
process is responsible for authentication and establishing communications. A slave
process is created by the proxy and handles module processing. A slave is created for each client connection.