r/CyberARk • u/Dear_Gas_8467 • 11d ago
C# vs TPC based plugins
Hi,
I hope everyone is doing well. This question may be very weird for many. Nevertheless, i am posting here.
I heard that C# based CPM plugins has utilization/useful in broad scope and can be used to make CPM plugins for many targets where TPC- REST API based also do not supports. If this is real then what are those use cases where TPC based plugins are useful and scenario comes up where only C# based CPM plugin development is required and TPC based or TPC Rest API based do not work?
For example: we can make plugins for db, rest based targets etc using TPC. So where is the limitations where TPC based cpm plugins are not useful and we have to choose C# based?
Hopefully i explained clearly. Let me know if you need additional information/context.
Happy Weekend
1
u/Abs201301 11d ago
TPC is good for simple shell based executions where outcome is deterministic. Trying it for anything else is pretty much useless.
CPM REST API plugin framework is interesting one. It's best for simple synchronous REST API calls where xml file is your orchestrator engine. CyberArk has done a highly commemdable job because it's a hell load of programming to come up with something like that where your .NET SDK executes the flow based on xml engine.
Now my favourite one is obviously Credentials management .NET SDK. You can define asynchronous API calls, async waits, loops, try catch block, limitless execution logic, system returned exceptions and many more. You can write your C# code to interact with any supported endpoint, protocol etc.
Fun fact: CyberArk came up with REST API plugin framework which executes the login flow based on xml file much late in their journey. I wrote my first similar plugin based on json structure using credentials management .net sdk 4 years ago.
1
u/Dear_Gas_8467 10d ago
I have made TPC rest api based plugins. It was smooth and nicer to make. So what made you to stick only on dot net c# based ones?
2
u/International_Set632 11d ago
TPC plug-in development is awful to put it bluntly (sorry bias here). It uses “states” which can be a tough concept to grasp over traditional “linear “ programming development. Maybe AI has figured it out by now. That said a person could argue compiled c# code is just as painful to manage. In short TPC can’t “easily” support REST so given your question strictly between those 2, I would recommend c# route.
Fyi if you want “easy” (you still have to be somewhat knowledgeable) this repo abstracts the c# mumbo jumbo out to PowerShell so all you have to do is customize easier to code scripts where rest and other concepts are super easy to implement:
https://github.com/mhdevop/CyberArk-UniversalPowerShellPlugin