보조 사용자 확인

보조 사용자 확인을 사용하면 음성 명령에 2단계 보안을 추가할 수 있습니다. 이렇게 하면 보안 카메라 끄기나 문 열기와 같은 특정 작업의 보안을 강화할 수 있습니다. 보조 사용자 인증은 특정 기기 특성에 연결되지 않으므로 Google Assistant가 언제 본인 확인을 진행하도록 할지 결정할 수 있습니다. 예를 들어 보안 카메라의 OnOff 특성에는 챌린지를 실행하고 조명의 OnOff 특성에는 챌린지를 발행하지 않도록 선택할 수 있습니다. 특정 상황에서 동일한 작업에 대해 Assistant 문제 문제가 발생할 수도 있습니다. 예를 들어 NFC 키가 문 근처에 있지 않으면 Assistant에서 문을 열기 위한 본인 확인 요청을 실행하도록 요청할 수 있으며, 전자 키가 있는 경우에는 보안 질문을 실행하지 않습니다.

Assistant는 명시적 확인 또는 PIN 번호 (PIN)라는 두 가지 유형의 본인 확인 요청을 발행할 수 있습니다. 이렇게 하면 Assistant에서 작업으로 다시 전송된 QUERYEXECUTE 인텐트에 챌린지 블록이 추가되고 challengeNeeded 오류 응답이 허용됩니다. 그러면 Assistant는 챌린지 블록의 챌린지 데이터와 함께 인텐트 요청을 작업으로 다시 보냅니다. 그러면 챌린지 데이터를 검증하여 사용자가 올바른 보안 응답을 제공했는지 확인할 수 있습니다.

Assistant는 대화상자를 사용하여 본인 확인 요청을 실행하지만, 음성 이외의 표시 경로에서 Assistant를 사용하면 PIN 및 확인이 화면에서 이루어집니다.

지원되는 기기 유형

2차 사용자 확인은 모든 기기 유형에서 지원됩니다.

지원되는 기기 trait

보조 사용자 확인은 모든 기기 특성에 지원됩니다.

지원되는 챌린지 유형

다음은 지원되는 2차 사용자 인증 질문 유형입니다.

  • 챌린지 없음 - 보조 사용자 인증 질문을 사용하지 않는 요청 및 응답입니다.
  • ackNeeded - 명시적 확인이 필요하며 (예 또는 아니요) 특성 상태를 응답 피드백으로 사용할 수 있는 보조 사용자 인증입니다. 이 챌린지 유형은 보안 기기 및 특성에 권장되지 않습니다.
  • pinNeeded - 개인 식별 번호 (PIN)가 필요한 보조 사용자 인증으로, 보안 기기 및 특성에 적합합니다.

챌린지 없음

이 예에서는 조명을 켜기 위한 챌린지가 없는 성공적인 EXECUTE 요청 및 응답을 보여줍니다.

사용자(User) 조명을 켭니다.
Google Assistant 알겠습니다. 조명 3개를 켭니다.
요청
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.OnOff",
          "params": {
            "on": true
          }
        }]
      }]
    }
  }]
}
응답
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "SUCCESS",
      "states": {
        "on": true,
        "online": true
      }
    }]
  }
}

ackNeeded

특성 또는 간단한 확인 인증에 여러 상태를 사용할 수 있는 보조 사용자 확인 인증

ackNeeded 챌린지 유형에는 다음과 같은 유형이 있습니다.

필수 항목(단순)

이 예에서는 조명을 어둡게 하는 ackNeeded 챌린지와 조도를 어둡게 하기 위한 확인을 포함하는 간단한 요청 및 응답을 보여줍니다.

사용자(User) 거실 조명을 어둡게 해 줘.
Google Assistant 거실 조명을 어둡게 합니다. 계속하시겠어요?
사용자(User) 저도요
Google Assistant 거실 조명을 어둡게 합니다.
요청 1
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.BrightnessAbsolute",
          "params": {
            "brightness": 12
          }
        }]
      }]
    }
  }]
}
응답 1
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "ERROR",
      "errorCode": "challengeNeeded",
      "challengeNeeded": {
        "type": "ackNeeded"
      }
    }]
  }
}
요청 2
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.BrightnessAbsolute",
          "params": {
            "brightness": 12
          },
          "challenge": {
            "ack": true
          }
        }]
      }]
    }
  }]
}
응답 2
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "SUCCESS"
    }]
  }
}

트레잇 상태에 필요

특성에 상태를 사용할 수 있는 보조 사용자 확인 인증. 예를 들어 TemperatureSetting 특성으로 작업하고 thermostatModethermostatTemperatureSetpoint가 모두 설정된 경우 Assistant에어컨의 난방 온도를 28도로 설정하시겠습니까?라고 질문할 수 있습니다.

응답에 상태를 포함하여 Assistant가 주어진 요청에 따라 특정 작업을 실행하도록 할 수도 있습니다.

다음 트레잇 및 상태는 트레잇 상태와 함께 ackNeeded를 지원합니다. 특정 특성의 목록은 모든 상태가 지원됨을 나타냅니다.

이 예에서는 트레잇 상태를 사용하는 ackNeeded 챌린지가 있는 요청 및 응답을 보여줍니다. 에어컨 모드를 난방으로 변경하고 온도를 28도로 설정합니다. 그런 다음 응답에서 28thermostatTemperatureSetpoint가 상태로 반환되므로 Assistant는 사용자에게 난방을 켜고 온도를 28도로 설정하도록 확인을 요청합니다.

사용자(User) 에어컨 모드를 난방 모드로 설정합니다.
Google Assistant 에어컨 난방 온도를 28도로 설정하시겠어요?
사용자(User) 저도요
Google Assistantnt 에어컨 난방 28도로 설정합니다.
요청 1
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.TemperatureSetting",
          "params": {
            "thermostatMode": "heat"
          }
        }]
      }]
    }
  }]
}
응답 1
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "ERROR",
      "states": {
        "thermostatMode": "heat",
        "thermostatTemperatureSetpoint": 28
      },
      "errorCode": "challengeNeeded",
      "challengeNeeded": {
        "type": "ackNeeded"
      }
    }]
  }
}
요청 2
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.TemperatureSetting",
          "params": {
            "thermostatMode": "heat"
          },
          "challenge": {
            "ack": true
          }
        }]
      }]
    }
  }]
}
응답 2
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "SUCCESS",
      "states": {
        "thermostatMode": "heat",
        "thermostatTemperatureSetpoint": 28
      }
    }]
  }
}

pinNeeded

보안 기기에는 pinNeeded 챌린지를 사용하는 것이 좋습니다.

이 예시에서는 pinNeeded 챌린지가 있는 초기 요청 및 응답을 보여줍니다. 이 예에서는 pinNeeded 챌린지가 포함된 응답을 반환하므로 Assistant가 PIN을 요청합니다. 이 시점에서 사용자는 잘못되거나 유효한 PIN을 제공할 수 있습니다.

잘못되거나 유효한 PIN에 대한 요청 및 응답의 예:

사용자(User) 문을 잠금 해제합니다.
Google Assistant 보안 코드를 알려 주시겠어요?
요청
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.LockUnlock",
          "params": {
            "lock": false
          }
        }]
      }]
    }
  }]
}
응답
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "ERROR",
      "errorCode": "challengeNeeded",
      "challengeNeeded": {
        "type": "pinNeeded"
      }
    }]
  }
}

잘못된 PIN

이 예시에서는 challengeFailedPinNeeded 챌린지가 있는 요청과 응답을 보여줍니다. 이 챌린지는 최초 pinNeeded 챌린지가 실패한 후에 사용해야 합니다.

challengeFailedPinNeeded 유형이 반환되면 Assistant에서 보안 코드를 다시 요청합니다. 사용자가 잘못된 시도를 너무 많이 수행하면 tooManyFailedAttempts 오류 응답이 반환될 수 있습니다. 오류 응답을 참고하세요.

사용자(User) 333222
Google Assistant 죄송합니다. 보안 코드가 잘못되었습니다. 보안 코드를 알려 주시겠어요?
요청
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.LockUnlock",
          "params": {
            "lock": false
          },
          "challenge": {
            "pin": "333222"
          }
        }]
      }]
    }
  }]
}
응답
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "ERROR",
      "errorCode": "challengeNeeded",
      "challengeNeeded": {
        "type": "challengeFailedPinNeeded"
      }
    }]
  }
}

유효한 PIN

다음 예는 유효한 PIN에 대한 요청과 응답을 보여줍니다.

사용자(User) 333444
Google Assistant 문을 잠금 해제합니다.
요청
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.LockUnlock",
          "params": {
            "lock": false
          },
          "challenge": {
            "pin": "333444"
          }
        }]
      }]
    }
  }]
}
응답
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "SUCCESS",
      "states": {
        "isLocked": false,
        "isJammed": false
      }
    }]
  }
}
사용자(User) 거실 조명을 어둡게 해 줘.
Google Assistant 보안 코드를 알려 주시겠어요?
요청
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123"
        }],
        "execution": [{
          "command": "action.devices.commands.BrightnessAbsolute",
          "params": {
            "brightness": 12
          }
        }]
      }]
    }
  }]
}
응답
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "ERROR",
      "errorCode": "challengeNeeded",
      "challengeNeeded": {
        "type": "pinNeeded"
      }
    }]
  }
}

오류 응답

다음은 응답과 함께 반환될 수 있는 오류 코드입니다.

  • tooManyFailedAttempts - 죄송합니다. 실패한 시도 횟수가 너무 많습니다. 기기의 앱으로 이동하여 작업을 완료하세요.
  • pinIncorrect - 죄송합니다. 보안 코드가 잘못되었습니다.
  • userCancelled - 확인

오류 및 예외의 전체 목록을 참조하세요.