This post is the continuation of the previous one where
I explained how to read the User ID, Password, etc.. from a file in the Groovy
Program. So the file containing the User ID, Password, etc.. is a central
repository where you need to change it only once.
In this post, I will extend that feature by using the
encoding/decoding methods to encode the password and decode it wherever needed.
So the password Is not exposed anywhere and no security breach of storing the
password in a file or a program.
Let me divide this post into two parts
- Encode the Oracle EPM authenticating Password using a Secret Key.
Kindly note I have used the
AES encryption algorithm to encrypt the password.
Create a class to use the AES algorithm, where the needed inputs are the password as the string and the Secret Key of your choice.
In Line 45 we are encrypting the password by providing the
password and the Secret Key
Finally print Secret Key that is used, the Original Password, and the encrypted Password.
An example executed result is shown in the above picture.
2. Using the encrypted password in the Groovy program to authenticate to the Oracle EPM Cloud.
The complete program can be found here.
The Program uses the encrypted password stored in the file and decrypts it using the AES algorithm and the secret key used to encrypt it.
The password and all other parameters are read from the file.
Creating a class to execute Refresh database on the Oracle EPM instance after login using the decrypted password.
No comments:
Post a Comment