Start a new topic
Answered

Integration with ARCON PAM

We at ARCON have a product PAM(Privilege Access Management) system. It provides a SSO and password vault services.


We want to integrate with Royal TSX. To do that we need to lauch royal TSX auto-create the dynamic folders. When a user opens a new RDP or SSH connection we would like to fetch the password from the Vault API and establish the connection.


I tried to read the https://www.royalapplications.com/go/kb-all-royaljson but still not sure how do we proceed with this requirement.


Best Answer

Hi Kalpesh,


I'm sorry for the delay.


I stepped through the code and found the issue. The problem is that in the JSON the arguments like this:

    "Arguments": "-ssh 10.10.0.38 -l $EffectiveUsername$ -pw $EffectivePassword$ -P 22 -X",


will resolve the the $EffectiveUsername$ and the $EffectivePassword$ with the credentials of the dynamic folder.


To ensure the tokens are resolved at connect time using the dynamic credential values, you need to escape the tokens:

    "Arguments": "-ssh 10.10.0.38 -l $$EffectiveUsername$$ -pw $$EffectivePassword$$ -P 22 -X",


Let me know if this works.


Regards,
Stefan


Glad to hear that. Is your issue now resolved or is still something missing/not working?

Hi Stefan


Thank you for the response. Yes just got that working when the token is escaped.

Answer

Hi Kalpesh,


I'm sorry for the delay.


I stepped through the code and found the issue. The problem is that in the JSON the arguments like this:

    "Arguments": "-ssh 10.10.0.38 -l $EffectiveUsername$ -pw $EffectivePassword$ -P 22 -X",


will resolve the the $EffectiveUsername$ and the $EffectivePassword$ with the credentials of the dynamic folder.


To ensure the tokens are resolved at connect time using the dynamic credential values, you need to escape the tokens:

    "Arguments": "-ssh 10.10.0.38 -l $$EffectiveUsername$$ -pw $$EffectivePassword$$ -P 22 -X",


Let me know if this works.


Regards,
Stefan

If we can pass Arguments before we launch the app just  like credential this will be helpful.

I dont get any errors or warnings in log. Can you try if this works at your end?

Can you examine the logs (via the View tab) and check if there's an error or warning?

Yes the api returns


{
    "Username": "user1",
    "Password": "user@111"
}



I see you assign the CredentialID "00002" to the object. Is this credential a dynamic credential and returns the dynamic credential script the appropriate username and password?

If i use the below json the aplication is launched with arguments "-ssh 10.10.0.38 -l  -pw  -P 22 -X"


{

    "Type":"ExternalApplicationConnection",

    "Name":"kalpesh-38",

    "Description":"test",

    "Properties":{

    "Command": "putty.exe",

    "Arguments": "-ssh 10.10.0.38 -l $EffectiveUsername$ -pw $EffectivePassword$ -P 22 -X",

    "WorkingDirectory":"F:\\Test"

    },

    "ComputerName":"10.10.0.38",

    "CredentialID":"00002",

    "ID":"00004"

 }

This is unfortunately not possible. What part of the arguments are dynamic? If it's the username and password, you can actually use dynamic credentials and use in the Arguments the replacement tokens:

$EffectiveUsername$ and $EffectivePassword$

Then you just have to assign the appropriate dynamic credential to the connection object.


Let me know if this helps.


Regards,

Stefan

Hi Stefan


Thanks for your response. I am able to create the connection in the dynamic folder in that way. But the arguments are hard coded in the dynamic folder. Can we pass the arguments at connection time just like dynamic credentials. 


I tried to return following json

--------------------------------------------------------------------------------------------------------

 {

    "Username": "user1",

    "Password": "user@111",

    "Arguments": "-ssh 10.10.0.38 -l user1 -pw user@111 -P 22 -X"

}


OR


 {

    "Arguments": "-ssh 10.10.0.38 -l user1 -pw user@111 -P 22 -X"

}


OR


 {

    "Properties": {

        "Command": "putty.exe", 

        "Arguments": "-ssh 10.10.0.38 -l user1 -pw user@111 -P 22 -X",

        "WorkingDirectory": "F:\\app"

    }

}



--------------------------------------------------------------------------------------------------------


But none are able to supply the arguments at the time of connection. 

Can you help me out here?

Hi


For this connection type you need to set special properties which have to be addressed differently.

In the docs:

https://www.royalapplications.com/go/rjson-documentation

There's a section called "Advanced scenarios"


{

    "Type":"ExternalApplicationConnection",

    "Name":"kalpesh-38",

    "ComputerName":"10.10.0.38",

    "ID": "00004",

    "Description": "test",

    "Properties": {

        "Command": "putty.exe",

        "Arguments": "-ssh 10.10.0.38 -l user1 -pw user@111 -P 22 -X",

        "WorkingDirectory": "F:\\app"

    }

}


You can find all properties for the external application connection here:

https://content.royalapplications.com/Help/RoyalTS/V5/index.html?scripting_objectproperties_royalappconnection.htm


Note that we also have TerminalConnectionType in the royalJson docs for these kind of connections.


Let me know if this helps.


Regards,
Stefan

Hi Stefan I've managed to use RoyalJSON to fetch services from API and connect RDP with the password from API.

Now i want to launch an external application using the dynamic folder

I'm using the below json object to create the external app.

----------------------------------------------------------------------------------------------------------------------------

{

    "Type":"ExternalApplicationConnection",

    "Name":"kalpesh-38",

    "ComputerName":"10.10.0.38",

    "ID": "00004",

    "Description": "test",

    "CommandWindows": "putty.exe",

    "ArgumentsWinodws": "-ssh 10.10.0.38 -l user1 -pw user@111 -P 22 -X",

    "WorkingDirectoryWindows": "F:\\app"

}

----------------------------------------------------------------------------------------------------------------------------


Whenever i try to launch the app it says "An error occurred while starting the external application: Cannot start process because a file name has not been provided.."



Please find the attached screenshot

royalts.png
(102 KB)

Hi Kalpesh,


the purpose of the dynamic folder is that the script embedded is doing all the work and populates the objects based on the json output. I'm not sure why you want to dynamically create a dynamic folder. Maybe there's a misunderstanding but once you have created the dynamic folder with the script, you can simply put this folder in a document and let Royal TS open that document by either command line argument or by using the auto start feature in View -> Options -> General.


If you can provide more information about your scenario, I'm sure I can help you find a proper solution.


Regards,
Stefan

If we need an external application to launch Royal TS, we would need to automatically create the dynamic folders. Is there a way to provide the .rdfe as an input while launching ?

Login or Signup to post a comment