
How to login at the rrServer?
-------------------------------


There are different ways to authorize at the rrServer.



------------------------------------------------------------------------------------------------------------
A) USER AUTHORIZATION
------------------------------------------------------------------------------------------------------------

If you do NOT specify any user, it works like in rrControl with no user set.
You either get the rights of user *Anonymous* or, if the user you are logged in with exists in rrConfig/rrLogin, your customized user rights. 

User AND Password are required if:
 - You want to get the rights of an other user than the user you are logged in with
 - You are accessing the rrServer from a remote location (requires to set the IP whitelist in rrConfig/rrLogin)
 - You have enabled the option "Authorization required" in rrConfig/rrLogin.

Use one of these functions to set the login:
rrLib.tcp.setLogin(user_name, password) 
rrSubmit.Submitter.setLogin(user_name, password)


__________________________________________________________________________________
CLEAR TEXT PASSWORD?

You have to set a login, but you do not like clear test passwords in your scripts?
Then you have two options:

1) Text PW Hash
You create a hash of your password.
Note that this is almost as unsecure as using a clear text PW.
The difference is that nobody can retrieve the original password text any more.
But anybody can use it for the login.

2) Encoded PW Hash
Save the hash of your password either into your local user preferences or into a file.
The data can be encoded that is is not possible to read it from any other machine and/or that it is not possible to read from any other user account.


How to use?
For 1) and 2) you have to:
Create a new helper script to save the password.
Use setLogin() first to set your password inside the RR python module.
Then....

1) Text PW Hash
Then use getPassA85() to get the hash of your password.
In your main script use setLoginA85() instead of setLogin() to set the login.

2) Encoded PW Hash
Then use saveLogin() or saveLoginFile() to save the pw.
In your main script use loadLogin() or loadLoginFile()  instead of setLogin() to set the login.



__________________________________________________________________________________
REMOTE LOCATION?

It is highly recommended to use setRemoteLocation() in case the script is NOT executed in your office network.
All file checks (trying to access files on your RR share) are disabled.
And the rrServer uses the rrLogin rights "Remote Access" (If you do not use setLogin() ).



------------------------------------------------------------------------------------------------------------
B) JOB COMMAND PASSWORD
------------------------------------------------------------------------------------------------------------

If you have submitted the job with python, then you can specify a command PW for the job.
All commands are allowed with this password.

To use the jobs command PW, you have to use one of the function setJobCommandPassword() in one of the TCP modules

rSubmit.Submitter.setJobCommandPassword(jobPassword)
rrLib.tcp.setJobCommandPassword(jobPassword)

An example is the Houdini PDG plugin RR\render_apps\_submitplugins\Houdini\pdg\types\royalScheduler\royalScheduler.py


------------------------------------------------------------------------------------------------------------
C) rrCLIENT SCRIPT AUTHORIZATION
------------------------------------------------------------------------------------------------------------

The rrClient is able to generate a authorozation string for its active job.	
The rights what is allowed  with this Script Authorization can be set in rrConfig, rrLogins, *rrScriptAuth*.

An example is the delete post-script:
RR\render_apps\_prepost_scripts\Finished99__DeleteJob.cfg

The rrClient replaces the render config parameter  <AuthStr> with the password.
And the python script sets the login with tcp.setLogin(args.authStr, "")
