Security

javadoc

 

If you have something to hide this service is for you !
Useful to store passwords or secrets keys ( like api keys ) inside an AES safe and expose some code lines.
It is important to never expose API keys inside any script !

 

 

 

Examples:


#file : service/Security.py edit raw
#########################################
# Security.py
# description: used as a general template
# categories: simulator
# more info @: http://myrobotlab.org/service/Security
#########################################


# start the service
security = Runtime.start("security","Security")

# store & crypt secret infomations
# these lines are added only one time the program is run.. then they are deleted
# so that the "actual" keys are no longer in the script !  - and the encrypted keys
# exist on the file system (don't forget to delete these lines after you add your secrets)
security.addSecret("amazon.polly.user.key", "FIE38238733459852");
security.addSecret("amazon.polly.user.secret", "Ujffkds838234jf/kDKJkdlskjlfkj");
security.saveStore()

# get & decrypt secret infomations
security.loadStore()
print security.getSecret("amazon.polly.user.key")
print security.getSecret("amazon.polly.user.secret")