Getting Error : Calling External Shell Script From OAG Using PGP Commands To Encrypt-Decrypt Some Files
(Doc ID 2069484.1)
Last updated on FEBRUARY 24, 2019
Applies to:Oracle API Gateway - Version 22.214.171.124.0 and later
Information in this document applies to any platform.
While using the Execute Process filter to call an external script in OAG 126.96.36.199, the following error is generated
WHAT IS WORKING
The script is being called fine outside OAG. it only fails when being called from inside OAG and it only happens in Linux
OS: Linux x86-64
1. Create a policy that has Execute Process Filter
2. Deploy the Policy
3. Call the policy
The execute process filter will call the script which should be created and tested using these steps: (test was done on windows and it was working fine)
Tutorial on gpg
1. Download gpg (gpg4win-2.2.6.exe) from gpg4win.org/download.html and install it
2. Create a text password file with the correct password
3. Create a file that has a message to encrypt:
4. Create a batch or script file that has the following line:
gpg2.exe --symmetric --status-fd --batch --yes --passphrase-file <PATH>\<PASSWORD FILE> --output <PATH>\<OUTPUTFILE> <PATH>\<FILE TO ENCRYPT>
5. For linux:
gpg --symmetric --status-fd --batch --yes --passphrase-file <PATH>/<PASSWORD FILE> --output <PATH>/<OUTPUTFILE> <PATH>/<FILE TO ENCRYPT>
6. Test it in the command line by running the Script file created (the output file will be created and if opened with an editor encrypted text will be seen.)
7. After testing that the script works fine, it is time to call it from OAG using Execute Process filter.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document