I have code that needs some shotgun auth to upload a mov preview to shotgun from our render farm.
From a user authenticated SGTK session, is there a way to either
A). Create temporary credentials that are generated by the HumanUser and able to be used on the farm job for a period of time?
B). A way to get a serialized instance of an authenticated python Shotgun api instance.
I have a third option that I could potentially do, but it feels goofy too.
I could use ShotgunAuthenticator.create_script_user with randomized values and pass those values to the render job. At the end of my job, I would make sure I delete the script user from the site. I haven’t tested this way yet, I don’t know if I can make a script user with credentials to delete itself but not other scripts.
Turns out create_script_user does not create a new script user on the site. It creates an instance of an existing script user. Requiring a valid api_key
I have seen some stuff on the SGTK documentation about defining credentials in your shotgun.yml file but that states that is the old way of doing it.
I think ideally, it would be great if you could generate temp creds tied to a user for a period of time. I doubt that exists already however.
Let me know what the recommended way to do this is.