-
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 SSH MFA Key retrieval API endpoint
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
SaaS/Secure Infrastructure Access/MFA Key Retrieval/Get MFA Key.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,72 @@ | ||
meta { | ||
name: Get MFA Key | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: https://{{identityTenantName}}-jit.cyberark.cloud/api/ssh/sso/key | ||
body: none | ||
auth: none | ||
} | ||
|
||
assert { | ||
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(); | ||
} | ||
|
||
script:post-response { | ||
const tools = require('./tools/tools'); | ||
|
||
// Log on error | ||
if (res.status != 200) { | ||
if (res.body.code) { | ||
tools.log('Code: ' + res.body.code); | ||
} | ||
if (res.body.message) { | ||
tools.log('Message: ' + res.body.message); | ||
} | ||
if (res.body.description) { | ||
tools.log('Description: ' + res.body.description); | ||
} | ||
} | ||
} | ||
|
||
docs { | ||
## Get SIA SSH MFA Key | ||
|
||
Get MFA key. To run this API, you must have the JitUser role. | ||
|
||
### Endpoint | ||
``` | ||
https://subdomain-jit.cyberark.cloud/api/ssh/sso/key | ||
``` | ||
|
||
### Method | ||
GET | ||
|
||
### Example Response Body | ||
NA | ||
|
||
### Error Response Body | ||
``` | ||
{ | ||
"code": "DPA_INVALID_VALUE", | ||
"message": "error message", | ||
"description": "error description" | ||
} | ||
``` | ||
|
||
### Response Codes | ||
|code|Description| | ||
|-----|:---------------| | ||
|200|Success| | ||
|500|Internal Server Error| | ||
} |