|
@@ -3,6 +3,8 @@ |
|
|
"comment": "activate service, create account, login", |
|
|
"comment": "activate service, create account, login", |
|
|
"include": "new_account", |
|
|
"include": "new_account", |
|
|
"params": { |
|
|
"params": { |
|
|
|
|
|
"username": "user-multifactor_auth", |
|
|
|
|
|
"email": "user-multifactor_auth@example.com", |
|
|
"password": "foobar1!" |
|
|
"password": "foobar1!" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -27,7 +29,7 @@ |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
"entity": { |
|
|
"entity": { |
|
|
"type": "email", |
|
|
"type": "email", |
|
|
"info": "{{policy.firstEmail}}", |
|
|
|
|
|
|
|
|
"info": "user-multifactor_auth@example.com", |
|
|
"authFactor": "required" |
|
|
"authFactor": "required" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -45,7 +47,7 @@ |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts/verify", |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts/verify", |
|
|
"entity": { |
|
|
"entity": { |
|
|
"type": "email", |
|
|
"type": "email", |
|
|
"info": "{{policy.firstEmail}}" |
|
|
|
|
|
|
|
|
"info": "user-multifactor_auth@example.com" |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -55,7 +57,7 @@ |
|
|
"comment": "as root, check inbox (1st) for email verification message", |
|
|
"comment": "as root, check inbox (1st) for email verification message", |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "rootSession", |
|
|
"session": "rootSession", |
|
|
"uri": "debug/inbox/email/{{policy.firstEmail}}?action=verify" |
|
|
|
|
|
|
|
|
"uri": "debug/inbox/email/user-multifactor_auth@example.com?action=verify" |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "userInbox", |
|
|
"store": "userInbox", |
|
@@ -72,11 +74,7 @@ |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "userSession", |
|
|
"session": "userSession", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"method": "post" |
|
|
|
|
|
}, |
|
|
|
|
|
"response": { |
|
|
|
|
|
"sessionName": "userSession", |
|
|
|
|
|
"session": "token" |
|
|
|
|
|
|
|
|
"entity": [{"name": "account", "value": "user-multifactor_auth"}] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@@ -102,10 +100,22 @@ |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
"entity": { |
|
|
"entity": { |
|
|
"type": "email", |
|
|
"type": "email", |
|
|
"info": "{{policy.firstEmail}}", |
|
|
|
|
|
|
|
|
"info": "user-multifactor_auth@example.com", |
|
|
"authFactor": "required" |
|
|
"authFactor": "required" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
"response": { |
|
|
|
|
|
"check": [ |
|
|
|
|
|
{"condition": "json.getType().name() == 'email'"}, |
|
|
|
|
|
{"condition": "json.getInfo() == 'user-multifactor_auth@example.com'"}, |
|
|
|
|
|
{"condition": "json.getAuthFactor().name() == 'required'"} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
"comment": "re-read policy, verify email is now a required auth factor", |
|
|
|
|
|
"request": { "uri": "users/{{userAccount.name}}/policy" }, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
"store": "policy", |
|
|
"check": [ |
|
|
"check": [ |
|
@@ -135,6 +145,7 @@ |
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 1"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 1"}, |
|
|
|
|
|
{"condition": "json.getMultifactorAuth()[0].getType().name() == 'email'"}, |
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo().indexOf('***') != -1"} |
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo().indexOf('***') != -1"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
@@ -145,7 +156,7 @@ |
|
|
"comment": "as root, check inbox (2nd), verify login request message sent", |
|
|
"comment": "as root, check inbox (2nd), verify login request message sent", |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "rootSession", |
|
|
"session": "rootSession", |
|
|
"uri": "debug/inbox/email/{{policy.firstEmail}}?action=login" |
|
|
|
|
|
|
|
|
"uri": "debug/inbox/email/user-multifactor_auth@example.com?action=login" |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "userInbox", |
|
|
"store": "userInbox", |
|
@@ -162,7 +173,7 @@ |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "userSession", |
|
|
"session": "userSession", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"method": "post" |
|
|
|
|
|
|
|
|
"entity": [{"name": "account", "value": "user-multifactor_auth"}] |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"sessionName": "userSession", |
|
|
"sessionName": "userSession", |
|
@@ -178,6 +189,46 @@ |
|
|
"type": "authenticator" |
|
|
"type": "authenticator" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
"response": { |
|
|
|
|
|
"store": "authenticator", |
|
|
|
|
|
"check": [ |
|
|
|
|
|
{"condition": "json.getType().name() == 'authenticator'"} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
"comment": "verify authenticator", |
|
|
|
|
|
"request": { |
|
|
|
|
|
"uri": "auth/authenticator", |
|
|
|
|
|
"entity": { |
|
|
|
|
|
"account": "{{userAccount.name}}", |
|
|
|
|
|
"token": "{{authenticator_token authenticator.totpKey}}", |
|
|
|
|
|
"verify": true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
"comment": "set authenticator as required auth factor", |
|
|
|
|
|
"request": { |
|
|
|
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
|
|
|
"data": "authenticator", |
|
|
|
|
|
"entity": { |
|
|
|
|
|
"authFactor": "required" |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
"response": { |
|
|
|
|
|
"store": "authenticator", |
|
|
|
|
|
"check": [ |
|
|
|
|
|
{"condition": "json.getType().name() == 'authenticator'"} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
"comment": "re-read policy, both contacts are now required auth factors", |
|
|
|
|
|
"request": { "uri": "users/{{userAccount.name}}/policy" }, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
"store": "policy", |
|
|
"check": [ |
|
|
"check": [ |
|
@@ -209,7 +260,7 @@ |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 2"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 2"}, |
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo().indexOf('***') != -1"}, |
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo().indexOf('***') != -1"}, |
|
|
{"condition": "json.getMultifactorAuth()[1].getInfo().indexOf('***') != -1"} |
|
|
|
|
|
|
|
|
{"condition": "json.getMultifactorAuth()[1].getInfo() == '{\"masked\": true}'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -219,7 +270,7 @@ |
|
|
"comment": "as root, check inbox (3rd), verify login request message sent", |
|
|
"comment": "as root, check inbox (3rd), verify login request message sent", |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "rootSession", |
|
|
"session": "rootSession", |
|
|
"uri": "debug/inbox/email/{{policy.firstEmail}}?action=login" |
|
|
|
|
|
|
|
|
"uri": "debug/inbox/email/user-multifactor_auth@example.com?action=login" |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "userInbox", |
|
|
"store": "userInbox", |
|
@@ -236,7 +287,7 @@ |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "userSession", |
|
|
"session": "userSession", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"method": "post" |
|
|
|
|
|
|
|
|
"entity": [{"name": "account", "value": "user-multifactor_auth"}] |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "remainingApprovals", |
|
|
"store": "remainingApprovals", |
|
@@ -244,7 +295,7 @@ |
|
|
{"condition": "json.getUuid() == null"}, |
|
|
{"condition": "json.getUuid() == null"}, |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 1"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 1"}, |
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo().indexOf('***') != -1"} |
|
|
|
|
|
|
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo() == '{\"masked\": true}'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -255,7 +306,7 @@ |
|
|
"uri": "auth/authenticator", |
|
|
"uri": "auth/authenticator", |
|
|
"entity": { |
|
|
"entity": { |
|
|
"account": "{{userAccount.name}}", |
|
|
"account": "{{userAccount.name}}", |
|
|
"token": "{{authenticator_token policy.authenticator.info}}" |
|
|
|
|
|
|
|
|
"token": "{{authenticator_token authenticator.totpKey}}" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
@@ -265,9 +316,9 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
"comment": "remove email as required auth factor", |
|
|
|
|
|
|
|
|
"comment": "remove email from contacts", |
|
|
"request": { |
|
|
"request": { |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts/email/{{policy.firstEmail}}", |
|
|
|
|
|
|
|
|
"uri": "users/{{userAccount.name}}/policy/contacts/email/user-multifactor_auth@example.com", |
|
|
"method": "delete" |
|
|
"method": "delete" |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
@@ -308,10 +359,10 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
|
|
|
|
|
|
"store": "smsContact", |
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts().length == 2"} |
|
|
|
|
|
|
|
|
{"condition": "json.getType().name() == 'sms'"}, |
|
|
|
|
|
{"condition": "json.getAuthFactor().name() == 'not_required'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -338,11 +389,7 @@ |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "userSession", |
|
|
"session": "userSession", |
|
|
"uri": "auth/approve/{{smsInbox.[0].ctx.confirmationToken}}", |
|
|
"uri": "auth/approve/{{smsInbox.[0].ctx.confirmationToken}}", |
|
|
"method": "post" |
|
|
|
|
|
}, |
|
|
|
|
|
"response": { |
|
|
|
|
|
"sessionName": "userSession", |
|
|
|
|
|
"session": "token" |
|
|
|
|
|
|
|
|
"entity": [{"name": "account", "value": "user-multifactor_auth"}] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@@ -369,17 +416,14 @@ |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
"entity": { |
|
|
"entity": { |
|
|
"type": "sms", |
|
|
"type": "sms", |
|
|
"info": "{{policy.firstSms}}", |
|
|
|
|
|
|
|
|
"info": "{{smsContact.info}}", |
|
|
"authFactor": "sufficient" |
|
|
"authFactor": "sufficient" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
|
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts().length == 2"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts()[1].sufficientAuthFactor()"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts()[1].getType().name() == 'sms'"} |
|
|
|
|
|
|
|
|
{"condition": "json.getType().name() == 'sms'"}, |
|
|
|
|
|
{"condition": "json.getAuthFactor().name() == 'sufficient'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -404,7 +448,7 @@ |
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 2"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 2"}, |
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo().indexOf('***') != -1"}, |
|
|
|
|
|
|
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo() == '{\"masked\": true}'"}, |
|
|
{"condition": "json.getMultifactorAuth()[1].getInfo().indexOf('***') != -1"} |
|
|
{"condition": "json.getMultifactorAuth()[1].getInfo().indexOf('***') != -1"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
@@ -432,7 +476,7 @@ |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "userSession", |
|
|
"session": "userSession", |
|
|
"uri": "auth/approve/{{smsInbox.[0].ctx.confirmationToken}}", |
|
|
"uri": "auth/approve/{{smsInbox.[0].ctx.confirmationToken}}", |
|
|
"method": "post" |
|
|
|
|
|
|
|
|
"entity": [{"name": "account", "value": "user-multifactor_auth"}] |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "remainingApprovals", |
|
|
"store": "remainingApprovals", |
|
@@ -440,7 +484,7 @@ |
|
|
{"condition": "json.getUuid() == null"}, |
|
|
{"condition": "json.getUuid() == null"}, |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth() != null"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 1"}, |
|
|
{"condition": "json.getMultifactorAuth().length == 1"}, |
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo().indexOf('***') != -1"} |
|
|
|
|
|
|
|
|
{"condition": "json.getMultifactorAuth()[0].getInfo() == '{\"masked\": true}'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -451,7 +495,7 @@ |
|
|
"uri": "auth/authenticator", |
|
|
"uri": "auth/authenticator", |
|
|
"entity": { |
|
|
"entity": { |
|
|
"account": "{{userAccount.name}}", |
|
|
"account": "{{userAccount.name}}", |
|
|
"token": "{{authenticator_token policy.authenticator.info}}" |
|
|
|
|
|
|
|
|
"token": "{{authenticator_token authenticator.totpKey}}" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
@@ -461,7 +505,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
"comment": "remove authenticator", |
|
|
|
|
|
|
|
|
"comment": "remove authenticator, only SMS remains as contact method", |
|
|
"request": { |
|
|
"request": { |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts/authenticator", |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts/authenticator", |
|
|
"method": "delete" |
|
|
"method": "delete" |
|
@@ -470,7 +514,8 @@ |
|
|
"store": "policy", |
|
|
"store": "policy", |
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
{"condition": "json.getAccountContacts().length == 1"} |
|
|
|
|
|
|
|
|
{"condition": "json.getAccountContacts().length == 1"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts()[0].getType().name() == 'sms'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -485,10 +530,9 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
|
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts().length == 2"} |
|
|
|
|
|
|
|
|
{"condition": "json.getType().name() == 'email'"}, |
|
|
|
|
|
{"condition": "json.getInfo() == 'foo@example.com'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -515,11 +559,7 @@ |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "userSession", |
|
|
"session": "userSession", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"method": "post" |
|
|
|
|
|
}, |
|
|
|
|
|
"response": { |
|
|
|
|
|
"sessionName": "userSession", |
|
|
|
|
|
"session": "token" |
|
|
|
|
|
|
|
|
"entity": [{"name": "account", "value": "user-multifactor_auth"}] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@@ -535,10 +575,9 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
|
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts().length == 2"} |
|
|
|
|
|
|
|
|
{"condition": "json.getAuthFactor().name() == 'sufficient'"}, |
|
|
|
|
|
{"condition": "json.getInfo() == 'foo@example.com'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -573,7 +612,7 @@ |
|
|
"comment": "as root, check inbox (7th), verify login request message sent", |
|
|
"comment": "as root, check inbox (7th), verify login request message sent", |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "rootSession", |
|
|
"session": "rootSession", |
|
|
"uri": "debug/inbox/email/{{policy.firstEmail}}?action=login" |
|
|
|
|
|
|
|
|
"uri": "debug/inbox/email/foo@example.com?type=request&action=login&target=account" |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "userInbox", |
|
|
"store": "userInbox", |
|
@@ -590,7 +629,7 @@ |
|
|
"request": { |
|
|
"request": { |
|
|
"session": "userSession", |
|
|
"session": "userSession", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"uri": "auth/approve/{{userInbox.[0].ctx.confirmationToken}}", |
|
|
"method": "post" |
|
|
|
|
|
|
|
|
"entity": [{"name": "account", "value": "user-multifactor_auth"}] |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"sessionName": "userSession", |
|
|
"sessionName": "userSession", |
|
@@ -609,10 +648,9 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
|
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts().length == 2"} |
|
|
|
|
|
|
|
|
{"condition": "json.getType().name() == 'email'"}, |
|
|
|
|
|
{"condition": "json.getAuthFactor().name() == 'not_required'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -623,15 +661,14 @@ |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
"uri": "users/{{userAccount.name}}/policy/contacts", |
|
|
"entity": { |
|
|
"entity": { |
|
|
"type": "sms", |
|
|
"type": "sms", |
|
|
"info": "US:800-555-1212", |
|
|
|
|
|
|
|
|
"info": "{{smsContact.info}}", |
|
|
"authFactor": "not_required" |
|
|
"authFactor": "not_required" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
|
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts().length == 2"} |
|
|
|
|
|
|
|
|
{"condition": "json.getType().name() == 'sms'"}, |
|
|
|
|
|
{"condition": "json.getAuthFactor().name() == 'not_required'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -669,8 +706,8 @@ |
|
|
"response": { |
|
|
"response": { |
|
|
"store": "policy", |
|
|
"store": "policy", |
|
|
"check": [ |
|
|
"check": [ |
|
|
{"condition": "json.getAccountContacts() != null"}, |
|
|
|
|
|
{"condition": "json.getAccountContacts().length == 3"} |
|
|
|
|
|
|
|
|
{"condition": "json.getInfo() == 'bar@example.com'"}, |
|
|
|
|
|
{"condition": "json.getType().name() == 'email'"} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|