rockcarver / frodo-cli

A CLI to manage ForgeRock platform deployments supporting Identity Cloud tenants, ForgeOps deployments, and classic deployments.
MIT License
17 stars 14 forks source link

Add ability to see usage of scripts and ESVs #338

Closed phalestrivir closed 7 months ago

phalestrivir commented 7 months ago

This PR adds the ability to see if (and where) scripts and ESVs are being used by adding the option to the corresponding "list" commands. By default, it performs a full export and searches it for where ids are found and reports the results, but there's also the option to use a previous export since doing a full export of everything can be pretty slow.

Note: There may be another way to determine usage without doing a full export. I'm pretty sure ForgeRock has some way to determine whether or not scripts and ESVs are being used due to the fact that it is not possible (to my knowledge) to delete a script or ESV that is being used. However, this may be an internal feature of ForgeRock and not something we can use, but if we can find a way to use it then we should use that instead of doing the full export since it is likely much faster.