This is used for managing users in subaccounts. This was used during a p-user securuty incident we experienced with a leaked credential.
- btp cli
- cf cli
brew install coreutils
- Copy the credentials.sh file into folder
credentials
and add the credentials to it. Name 2 filesprod.sh
andnonprod.sh
.
Replacing users in cf org reference: https://wiki.wdf.sap.corp/wiki/display/Eureka/Change+the+bss+global+account+user+guide
sh cf/list_subaccounts.sh <global-account-id> <csv-file-name-without-extension>
CSV files in csv folder.
Example execution
sh cf/replace_org_user_global.sh <global-account-id> <csv-file-name-without-extension> >> <log-file-name>.log
Note: global account id
must correspond to the correct csv file name
These scripts were run for 5 subaccounts and the outputs are in log folder.
sh sh/assign.sh <global-account-id> <input-csv-without-extension>
sh sh/unassign.sh <global-account-id> <input-csv-without-extension>
sh sh/delete.sh <global-account-id> <input-csv-without-extension>