Password encryption in MAXL script
An
objective of this blog is to provide information about how to encrypt the Username
and Password in Maxl script. To login into Essbase Server, in traditional
method we manually enter the User credentials and do the process. We also have
another process to login into Essbase server and do the process i.e. through
Maxl scripts in which we can automate Maxl scripts through batch by scheduling
and also through command prompt we can run the process by calling the Maxl. Through
manually login User credentials are remembered by the user whereas through Maxl
script we give the User credentials in text file. So, there might be a chance
of stealing the User credentials. To provide the more security we do User
credential encryption.
There will be two basic keys are used
- Encrypt: Public key
- Decrypt: Private key
The
Public and Private Key pair comprises of two uniquely related Cryptographic keys (It is a string of
data used to lock and unlock cryptographic functions like authentication,
authorization and encryption).
Public key: It uses the asymmetric algorithm that converts
message into unreadable format. A person who has public key can encrypt the
message to the specific receiver.
Private Key: The private key is a secret key that is used to
decrypt the message. The receiver with private key can only decode the message,
which is encrypted by the public key.
Now, I will login
into Essbase Server using maxl command with encrypted key.
For that I need to generate Public key and Private key. So, I need
to connect with Hyperion local server. You can pass Maxl statements to Essbase
server using Maxl Shell. I am using Command Prompt to call the Maxl script. So,
you must start essmsh using startmaxl command in “Command Prompt” as below.
- startmaxl -gk >E:\Automation\mykeys.txt
After running the command, a text file will be created with the
name “mykeys” in the folder path I have given in the command which can be seen
in the below fig.
"mykeys" text file consists of Public Key for Encryption and Private Key for Decryption.
So,
we have generated the Public and Private keys and now we must encrypt the
Username and Password in Maxl script as shown below fig and save the file with some
name with “.mxl” extension. I have saved the file with “Login1” name.
To encrypt the username and password, need to run the command as below. We use Public Keys to encrypt as shown in the below fig. “E” in the command stands for Encryption.
· startmaxl -E E:\Automation\Login1.mxl
11707,1293821299
After running the
command, “Login1” file will be created with the extension “.mxls” as shown in
the below fig. (Note: “S” on the end of the file stands for “Secure”).
Inside Login1.mxls file we will find the maxl script in which username and password get replaced with encrypted codes as shown in the below fig.
So, these unique encrypted codes are used in Maxl scripts. To decrypt the code for logging into Essbase server, we need to run the below command using Private Keys as shown in the below fig. “D” in command stands for decryption.
- startmaxl -D E:\Automation\login.mxls 6630643,1293821299
After running the command, it will login into Essbase server.
Comments
Post a Comment