in order to increase the security for scheduled runs via cron we would like to have user key stored under the hdbuserstore of root user rather than in hdbuserstore of <sid>adm user (the logic is that fewer people are having access to root user compared to <sid>adm user and root user can anytime switch to <sid>adm user anyway).
We tested the code and when we source the environment variables via source /usr/sap/<SID>/home/.sapenv.sh then we are able to run the script - the only problem is usage of aliases from inside the script.
We developed and tested the enhancement of the code to detect whether executed from root and in such case to read the aliases from <sid>adm shell instead of "existing user" shell.
Note: we are aware of requirement to run on Python 2.7.x and we are making sure we are compliant here.
Can you please review the code enhancement and consider accepting the contribution?
Hello,
in order to increase the security for scheduled runs via
cron
we would like to have user key stored under thehdbuserstore
ofroot
user rather than inhdbuserstore
of<sid>adm
user (the logic is that fewer people are having access toroot
user compared to<sid>adm
user androot
user can anytime switch to<sid>adm
user anyway).We tested the code and when we source the environment variables via
source /usr/sap/<SID>/home/.sapenv.sh
then we are able to run the script - the only problem is usage of aliases from inside the script.We developed and tested the enhancement of the code to detect whether executed from
root
and in such case to read the aliases from<sid>adm
shell instead of "existing user" shell.Note: we are aware of requirement to run on Python 2.7.x and we are making sure we are compliant here.
Can you please review the code enhancement and consider accepting the contribution?
Thank you.