Skip to content

Commit 6ef01f2

Browse files
authored
Migration via rest fixes (#379)
* Updates * Updates to Migration.ps1 * Updates to Migration via Rest * Major updates to REST migration * README update but not complete
1 parent 0416e56 commit 6ef01f2

File tree

8 files changed

+2050
-634
lines changed

8 files changed

+2050
-634
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ Migration/Migration via REST/ExportOfAccounts.csv
1414
Migration/Migration via REST/FailedAccounts.csv
1515
Migration/Migration via REST/history.txt
1616
Migration/Migration via REST/TestingScript.ps1
17+
Migration/Migration via REST/output*
18+
Migration/Migration via REST/CheatSheat.ps1

.vscode/launchasda.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "PowerShell: Module Interactive Session",
9+
"type": "PowerShell",
10+
"request": "launch",
11+
"script": "Set-Location 'C:\\git\\epv-api-scripts\\Migration\\Migration via REST\\';Import-Module 'C:\\git\\epv-api-scripts\\Migration\\Migration via REST\\Migrate.psm1' -Force"
12+
}
13+
]
14+
}

Migration/Migration via REST/CyberArk-Migration.psm1

Lines changed: 287 additions & 213 deletions
Large diffs are not rendered by default.

Migration/Migration via REST/Migrate.ps1

Lines changed: 155 additions & 73 deletions
Large diffs are not rendered by default.

Migration/Migration via REST/Migrate.psm1

Lines changed: 1136 additions & 0 deletions
Large diffs are not rendered by default.

Migration/Migration via REST/README.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
11
# Migrate Via Rest
22

3+
## Main capabilities
4+
-----------------
35

4-
### IN PROGRESS NOT UP TO DATE AND THIS IS BEING USED AS A TEMPLATE NOTHING IN THESE DIRECTIONS ARE TO BE USED WITH Migrate.ps1 AT THIS TIME
56

6-
> **Note:** The content of the sample_accounts.csv is for example only and does not represent real accounts
77

8-
## Main capabilities
9-
-----------------
10-
- The tool Uses REST API and can support v10.4 of PVWA and up
11-
- The tool supports basic Account and Safe Creation, much like the Password Upload Utility
12-
- The tool supports Template Safe (currently one for all Accounts)
13-
- The tool can take a simple CSV file with only the relevant Account information
14-
- The tool will automatically update it self to the latest version if one exists in this GitHub folder
8+
## Parameters:
9+
```powershell
10+
Migrate.ps1
1511
16-
In order to run the tool you need to run some simple commands in Powershell.
17-
The Tool supports three modes: [*Create*](#create-command), [*Update*](#update-command) and [*Delete*](#delete-command)
12+
[-SRCPVWAURL] [-SrcAuthType] [-srcOTP] [-SRCPVWACredentials] [-srclogonToken]
1813
19-
The tool will create a log file in the same folder of the script called: _"Account_Onboarding_Utility.log"_
20-
Running the tool with common parameters of Debug and Verbose will add more information to the log
14+
[-DSTPVWAURL] [-DstAuthType] [-DSTPVWACredentials] [-dstlogonToken]
2115
22-
## Additional Platform Properties / File Categories
23-
With the newer version of the REST API's (seen as 2nd gen in the CyberArk documentation), in order to be able to upload accounts that have custom platform properties (file categories) these need to be already enabled/set at the platform level of the platform that the accounts will be linked with. This is also relevant to be able to upload accounts that have linked 'login' and 'reconcile' accounts listed in the CSV file.
16+
[-export] [-exportCSV] [-importCSV]
2417
25-
When accounts are attempted to be onboarded that have custom platform properties listed in the relevant columns in the csv however have not been already added at the platform level, a meaningful error will be seen relating to the fact that the account property has not been account to the platform.
18+
[-processSafes] [-createSafes] [-UpdateSafeMembers] [-CPMOld] [-CPMNew] [-CPMOverride] -[dstUPN]
2619
27-
There are six FC's that are required to be added to the platform if an account has a linked 'login' and 'reconcile' account set, three are for the linked 'login' account and three are for the linked 'reconcile' account. Further information on how to do this can be found in this CyberArk KB:
28-
"https://cyberark-customers.force.com/s/article/Add-Reconcile-and-Login-Accounts-to-an-Account-using-V10-REST-API"
20+
[-processAccounts] [-getRemoteMachines] [-newLDAP] [-noCreate] [-allowEmpty] [-SkipCheckSecret]
21+
22+
[-maxJobCount] [-ProgressDetails] [-SuppressProgress] [-DisableSSLVerify]
2923
30-
## Parameters:
31-
```powershell
32-
Migrate.ps1 -PVWAURL <string> [-<Create / Update / Delete>] [-AuthType] [-OTP] [-TemplateSafe] [-CsvPath] [-CsvDelimiter] [-DisableSSLVerify] [-NoSafeCreation] [-DisableAutoUpdate] [-CreateOnUpdate] -[ConcurrentSession] [-BypassSafeSearch] [-BypassAccountSearch]
3324
```
34-
- PVWAURL
35-
- The URL of the PVWA that you are working with.
36-
- Note that the URL needs to include 'PasswordVault', for example: "https://myPVWA.myDomain.com/PasswordVault"
37-
- When working with PVWA behind a load balancer, note that the session must be defined as sticky session. Alternatively, work with a single node PVWA
38-
- LogonToken
39-
- The logon token when using Privlage Cloud Shared Services (ISPSS)
40-
- To generate Token See https://github.com/cyberark/epv-api-scripts/tree/main/Identity%20Authentication
25+
- SRCPVWAURL
26+
- URL for the source environment
27+
- HTTPS://Source.lab.local/PasswordVault
28+
- SrcAuthType
29+
30+
- srcOTP
31+
- In cases where RADIUS authentication is used for the source and one-time-password is needed, use this parameter to enter the OTP value
32+
- SRCPVWACredentials
33+
- Credentials for use with source environment stored as PSCredentials
34+
-
35+
36+
4137
- DisableSSLVerify
4238
**(NOT RECOMMENDED)**
4339
- In cases when you want to test the script on a PVWA environment that does not include a valid SSL certificate, you can use this parameter
40+
41+
42+
4443
- AuthType
4544
- Authentication types for logon.
4645
- Available values: _CyberArk, LDAP, RADIUS_

0 commit comments

Comments
 (0)