Maintenance
We keep the IP restriction data (IP whitelist) in a DynamoDB table called wap-audit-settings-{env}
. In production environments, it is not allowable to update the table directly. The proper way to set IP restriction is actually by synchronizing the data from HUE, but to simplify IP address management you can also use a Jenkins job prepared to add and remove IP address from the IP whitelist:
https://jenkins-ec2.collabo-dev.worksap.com:8443/job/worksaudit/job/update-ip-restriction/
This Jenkins job works for both development and production environments.
The Jenkins job to update IP restriction is implemented as AWS Lambda and Jenkins groovy and shell script. The groovy script is here, while the shell script is here.
The lambda for updating IP restriction is implemented in wap-audit-lambda-settings-ip-restr-update
module.