-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Cloud Onboarding Endpoints. Need Documentation
- Loading branch information
Showing
19 changed files
with
666 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
meta { | ||
name: Add AWS Account | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
post { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/account | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"accountId": "823467896521", | ||
"services": ["dpa"], | ||
"accountDisplayName": "PIN - TEST", | ||
"description": "Pineapple Test" | ||
} | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
meta { | ||
name: Add Service | ||
type: http | ||
seq: 6 | ||
} | ||
|
||
post { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/account/{{id}}/services | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"services": ["secrets_hub"] | ||
} | ||
} | ||
|
||
vars:pre-request { | ||
id: 1339d34c9db34a19a601653b9d086f61 | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
meta { | ||
name: Delete AWS Account | ||
type: http | ||
seq: 4 | ||
} | ||
|
||
delete { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/account/{{id}} | ||
body: none | ||
auth: none | ||
} | ||
|
||
vars:pre-request { | ||
id: 1339d34c9db34a19a601653b9d086f61 | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
meta { | ||
name: Generate CF Link | ||
type: http | ||
seq: 5 | ||
} | ||
|
||
post { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/account/{{id}}/generate-link | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"accountId":"969656756524", | ||
"services":["dpa"], | ||
"accountDisplayName":"PIN - AWS - Root", | ||
"description": "Pineapple AWS Root Account" | ||
} | ||
} | ||
|
||
vars:pre-request { | ||
id: | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
} |
27 changes: 27 additions & 0 deletions
27
SaaS/Cloud Onboarding/AWS Accounts/Get AWS Account by Id.bru
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
meta { | ||
name: Get AWS Account by Id | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
get { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/account/{{id}} | ||
body: none | ||
auth: none | ||
} | ||
|
||
vars:pre-request { | ||
id: 1339d34c9db34a19a601653b9d086f61 | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
meta { | ||
name: Get AWS Accounts | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/accounts | ||
body: none | ||
auth: none | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
meta { | ||
name: Remove Service | ||
type: http | ||
seq: 7 | ||
} | ||
|
||
delete { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/account/{{id}}/services | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"services": ["dpa"] | ||
} | ||
} | ||
|
||
vars:pre-request { | ||
id: 1339d34c9db34a19a601653b9d086f61 | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
} |
34 changes: 34 additions & 0 deletions
34
SaaS/Cloud Onboarding/AWS Organizations/Add AWS Organization.bru
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
meta { | ||
name: Add AWS Organization | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
post { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/organization | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"organizationRootId":"r-zjhf", | ||
"organizationId":"o-apl4ofpkaq", | ||
"managementAccountId":"969656756524", | ||
"services":["dpa"], | ||
"accountDisplayName":"PIN - AWS - IC - COB", | ||
"description": "Pineapple AWS via Cloud Onboarding" | ||
} | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
meta { | ||
name: Add Services | ||
type: http | ||
seq: 6 | ||
} | ||
|
||
post { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/organization/{{id}}/services | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"services":["secrets_hub"] | ||
} | ||
} | ||
|
||
vars:pre-request { | ||
id: 230f9c6b773aexample98892bf3aa7 | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
const tools = require('./tools/tools'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
|
||
// Sets pasSafeMemberName for testing based on environment flag and variables | ||
var flag = bru.getEnvVar('testFlag') | ||
if (flag == 'true') { | ||
tools.log('Setting Variables'); | ||
bru.setVar('id', bru.getEnvVar('testAwsCybrId')); | ||
tools.log('Cybr AWS ID: ' + bru.getEnvVar('testAwsCybrId')) | ||
} | ||
} | ||
|
||
script:post-response { | ||
// Log on error | ||
const tools = require('./tools/tools'); | ||
|
||
// Log on error | ||
if (res.status != 200) { | ||
if (res.body.message) { | ||
tools.log('Message: ' + res.body.message); | ||
} | ||
if (res.body.code) { | ||
tools.log('Code: ' + res.body.code); | ||
} | ||
if (res.body.description) { | ||
tools.log('Description: ' + res.body.description); | ||
} | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
SaaS/Cloud Onboarding/AWS Organizations/Generate CF Link.bru
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
meta { | ||
name: Generate CF Link | ||
type: http | ||
seq: 4 | ||
} | ||
|
||
post { | ||
url: https://{{identityTenantName}}-cloud_onboarding.cyberark.cloud/api/aws/organization/{{id}}/generate-link | ||
body: none | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"organizationRootId":"r-zjhf", | ||
"organizationId":"o-apl4ofpkaq", | ||
"managementAccountId":"969656756524", | ||
"services":["dpa"], | ||
"accountDisplayName":"PIN - AWS - IC - COB", | ||
"description": "Pineapple AWS via Cloud Onboarding" | ||
} | ||
} | ||
|
||
vars:pre-request { | ||
id: 230f9c6b773example2bf3aa7 | ||
} | ||
|
||
assert { | ||
res.body: isJson | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
const platformTokenAuth = require('./tools/platformTokenAuth'); | ||
const tools = require('./tools/tools'); | ||
|
||
// Perform authentication usings platformToken.js tools | ||
await platformTokenAuth.login(); | ||
|
||
// Sets pasSafeMemberName for testing based on environment flag and variables | ||
var flag = bru.getEnvVar('testFlag') | ||
if (flag == 'true') { | ||
tools.log('Setting Variables'); | ||
bru.setVar('id', bru.getEnvVar('testAwsCybrId')); | ||
tools.log('Cybr AWS ID: ' + bru.getEnvVar('testAwsCybrId')) | ||
} | ||
} | ||
|
||
script:post-response { | ||
// Log on error | ||
const tools = require('./tools/tools'); | ||
|
||
// Log on error | ||
if (res.status != 200) { | ||
if (res.body.message) { | ||
tools.log('Message: ' + res.body.message); | ||
} | ||
if (res.body.code) { | ||
tools.log('Code: ' + res.body.code); | ||
} | ||
if (res.body.description) { | ||
tools.log('Description: ' + res.body.description); | ||
} | ||
} | ||
} |
Oops, something went wrong.