지금까지 Kore.ai 가상 비서 플랫폼에서 경고 작업을 설정하는 방법을 여기에서 확인했습니다. 이 섹션에서는, OAuth v1를 사용한 경고 작업을 위한 권한 부여를 설정하는 방법을 살펴봅니다.

설정하기

OAuth는 웹, 모바일, 데스크톱 애플리케이션에서 간단하고 표준적인 방법으로 보안 권한 부여 사용이 가능한 개방형 프로토콜입니다. OAuth를 사용하려면, 애플리케이션이 권한 부여 메커니즘에 필요한 설정을 구성하려면 로그인 자격 증명이 필요하므로 웹 애플리케이션에 계정을 먼저 등록해야 합니다.

테넌시

필요한 경우, 하위 도메인 섹션에서, 웹 애플리케이션 또는 사용자 인터페이스의 기본 URL이 URL의 테넌트 이름을 사용하는 경우 를 선택합니다. 예: kore는 테넌트를 www.kore.someCompany.com.으로 사용하는 웹 서비스의 테넌트 조직입니다. 다음 예시 설정에서, 테넌시 URL은 {tenant} 조직 플레이스 홀더를 포함합니다.

양식 필드

oAuth v1을 정의하려면, 다음 표에 설명된 필드를 정의하세요.

필드 이름 설명
권한 부여 유형 oAuth v1로 설정합니다.
콜백 URL 최종 사용자 권한 부여가 완료된 후 최종 사용자를 리디렉션하기 위해 웹 애플리케이션 또는 웹 서비스가 사용하는 URL입니다. 이 값 https://idp.kore.ai/workflows/callback/은 oAuth v1 설정을 정의할 때 Kore.ai 애플리케이션에서 읽기 전용 값으로 제공합니다.
ID 공급자 이름 웹 애플리케이션 또는 웹 서비스 이름(예: Twitter)입니다. 이 필드는 필수입니다.
소비자 키 웹 애플리케이션에 대한 Kore.ai 애플리케이션 식별자로 제공되는 값입니다. 이 필드는 필수입니다.
소비자 시크릿 Kore.ai 애플리케이션이 소비자 키의 소유권을 설정하기 위해 제공하는 시크릿 값입니다. 이 필드는 필수입니다.
요청 토큰 링크 Kore.ai 애플리케이션이 권한이 없는 요청 토큰을 얻기 위해 사용하는 URL입니다. Kore.ai 애플리케이션이 최종 사용자로부터 권한 부여를 받고 액세스 토큰을 얻는 데 사용하는 값입니다. 예: https://{tenant}.someCompany.com/oauth/request_token. 최종 사용자 권한 부여 후, Kore.ai 애플리케이션에서 액세스 토큰을 요청할 수 있습니다. 이 필드는 필수입니다.
액세스 토큰 링크 최종 사용자 권한 부여 요청 토큰을 액세스 토큰으로 교환하는 데 사용되는 URL입니다. 액세스 토큰은 최종 사용자 로그온 자격 증명을 사용하지 않고 Kore.ai 애플리케이션이 최종 사용자를 대신하여 웹 애플리케이션 또는 웹 서비스에 대한 액세스 권한을 얻는 데 사용하는 값입니다. 예: https://{tenant}.someCompany.com/oauth/access_token. 이 필드는 필수입니다.
사용자 권한 부여 링크 Kore.ai 애플리케이션이 액세스 토큰을 사용하여 웹 애플리케이션이나 웹 서비스에 액세스하기 위한 최종 사용자 권한을 획득하는 데 사용되는 URL입니다. 예: https://{tenant}.someCompany.com/oauth/authorize. 이 필드는 필수입니다.
커넥터를 사용한 액세스 Kore.ai 커넥터 에이전트를 사용하여 Kore.ai 봇의 액세스를 사용하도록 설정하려면 를 선택합니다. 이 옵션은 Kore.ai 커넥터 에이전트가 엔터프라이즈 온프레미스 네트워크에서 설정되어 사용함으로 설정한 경우에만 표시됩니다. 자세한 내용은, Kore.ai 커넥터 사용하기를 참조하세요.

추가 필드 추가

  1. + 추가 필드 추가를 클릭하여 추가 필드 창을 열고, 다음 그림과 같이 필요한 경우 추가 권한 부여 입력 필드를 나타내는 키/값 쌍을 하나 이상 입력합니다.
    추가 권한 부여 필드
  2. 다음 필드를 지정합니다. 필드 키 – 권한 부여를 위해 지정할 사용자 정의 필드의 이름입니다.필드 값 – 권한 부여를 위해 지정할 사용자 정의 필드의 값입니다.
  3. 추가를 클릭하여 추가 필드를 저장합니다.
  4. 추가 필드를 더 추가하려면 권한 부여 필드 섹션에서 추가를 클릭합니다.

권한 부여 필드

기본적으로, 권한 부여 필드는 작업 요청 메시지의 헤더 일부로 구성됩니다. 작업 요청에 추가 권한 부여 필드가 필요하거나 예상되는 권한 부여가 헤더의 일부가 아닌 경우(예: 사회 보장 번호 또는 PIN),

  1. + 권한 부여 필드 추가를 클릭한 다음 그림과 같이 필드를 정의합니다.
    기본 인증을 위한 권한 부여 필드
  2. 필드 유형 필드에서, 작업 요청 메시지 및 필요한 권한 부여 필드 유형에서 위치에 따라 다음 중 하나를 선택할 수 있습니다. 헤더 – 봇은 요청 헤더의 일부로 권한 부여 필드를 예상합니다.페이로드 – 봇은 요청 본문의 내용 일부로 권한 부여 필드를 예상합니다.쿼리 문자열 – 봇은 요청 본문에서 권한 부여 필드를 쿼리로 예상합니다.경로 매개변수 – 봇은 권한 부여 필드를 요청의 URL 경로의 일부로 예상합니다.
  3. 필드 키 필드에서, 선택한 필드 유형에 대한 필드 이름을 입력합니다.
  4. 필드 값 필드에 지정된 필드 키의 값을 입력합니다.
  5. 추가를 클릭합니다. 새 권한 부여 필드가 권한 부여 필드 섹션에 추가됩니다.
  6. 추가 인증 권한 필드를 추가하려면, 권한 부여 필드 섹션에서 추가를 클릭합니다.

테스트

권한 부여를 저장한 후, 권한 부여 페이지에서 권한 부여 정의를 테스트할 수 있습니다.

  1. 작업의 나머지 단계 개발을 계속 진행하기 전에 권한 부여 테스트를 클릭합니다. 권한 부여 테스트
  2. 권한 부여 테스트를 클릭하면, 인증 토큰 URL, 소비자 키소비자 토큰을 사용하여 테스트가 실행됩니다. 테넌시가 정의된 경우, 다음 그림과 같이 권한 부여 테스트 대화 상자가 표시됩니다.
    권한 부여 테스트 대화 상자 - oAuth
  3. 테스트를 클릭하여 권한 부여 테스트를 시작합니다. 인증 유효성 검증이 완료되면, 권한 부여 테스트 창이 닫히고 성공 또는 실패 검증 결과가 권한 부여 테스트 버튼 바로 오른쪽에 표시됩니다. 권한 부여가 실패하면, 다음 그림과 같이 헤더응답 탭과 함께 권한 부여 테스트 실패 메시지가 표시됩니다.
    인증 테스트 실패

작동 원리 

  1. Kore.ai 애플리케이션은 웹 애플리케이션에서 권한이 없는 요청 토큰을 얻습니다. Kore.ai 애플리케이션은 사용자를 웹 애플리케이션의 로그인 대화 상자로 리디렉션합니다.
  2. 사용자는 요청 토큰의 권한을 부여하고 자신의 계정과 연결합니다. 웹 애플리케이션은 사용자를 Kore.ai 애플리케이션으로 다시 리디렉션합니다.
  3. Kore.ai 애플리케이션은 요청 토큰을 액세스 토큰으로 교환합니다.
  4. 액세스 토큰을 사용하여 Kore.ai 애플리케이션은 사용자를 대신하여 공급자의 보호된 리소스에 액세스할 수 있습니다.

다음 그림은 작업을 위한 사용자 정의 권한 부여 사용을 위해 정의해야 하는 oAuth v1 권한 부여 유형 필드의 예입니다.
새 권한 부여 메커니즘 - oAuth V1

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

こちらで、Kore.aiのバーチャルアシスタントプラットフォームでの通知タスクの設定方法について確認しました。このセクションでは、OAuth v1を使用した、通知タスクに対する認証の設定方法について見ていきます。

設定

OAuthは新規のWeb、モバイル、デスクトップアプリケーションから簡単に標準的な方法で安全認証を可能にするオープンプロトコルです。OAuthの使用で認証メカニズムの設定を設定するためには、そのアプリケーションのログイン認証クレデンシャルが必要になるため、まずはウェブアプリケーションにアカウントをログインする必要があります。

テナンシー

テナントを定義するWeb アプリケーションやユーザー インターフェイスがベース URL にテナント名を使用する場合は、必要に応じて [サブドメイン] セクションで [はい] を選択します。例えば、koreは、www.kore.someCompany.comとしてテナントを使用したウェブサービスのテナント組織です。下記の設定の例では、テンナンシーURLは{tenant}組織のプレースホルダが含まれます。

フォームフィールド

oAuth v1を定義する場合、下記のテーブルの説明の通りにフィールドを定義してください。

フィールド名 説明
認証タイプ oAuth v1に設定します。
コールバック URL エンドユーザーの認証が完了した後、エンドユーザーを導き直しするためにウェブアプリケーションまたはウェブサービスが使用するURLです。oAuth v1の設定を定義すると、Kore.ai アプリケーションがhttps://idp.kore.ai/workflows/callback/をリードオンリー値として提供します。
身分の提供元の名前 ウェブアプリケーションやウェブサービスの名前、例えば、Twitter。このフィールドは必須です。
コンシューマキー Kore.aiアプリケーションがウェブアプリケーションへの認識として提供される値。このフィールドは必須です。
コンシューマシックレット コンシューマキーの所有権を確立するために、Kore.aiアプリケーションが提供するシックレット値。このフィールドは必須です。
リクエストトークンリンク Kore.ai アプリケーションが未認証のリクエストトークンを取得するために使用するURL。リクエストトークンとはKore.aiアプリケーションがアクセストークンを取得ためのエンドユーザーからの認証を取得ための値。例えば、https://{tenant}.someCompany.com/oauth/request_token。エンドユーザーの認証の後、Kore.aiアプリケーションからアクセストークンを要求することができます。このフィールドは必須です。
アクセストークンリンク エンドユーザーが認証済のリクエストトークンをアクセストークンと交換するために使用されるURL。アクセストークンとはKore.ai アプリケーションが、エンドユーザーがクレデンシャルのログではなく、エンドユーザーの行為によりウェブアプリケーションやウェブサービスへのアクセスを得るために使用する値です。例えば、https://{tenant}.someCompany.com/oauth/access_token。このフィールドは必須です。
ユーザー認証リンク これは、アクセストークンを使用して ウェブアプリケーションまたは ウェブサービスにアクセスするために、 Kore.ai アプリケーションのエンドユーザー認証を取得するために使用される URL です。例えば、https://{tenant}.someCompany.com/oauth/authorize。このフィールドは必須です。
コネクタを使用してアクセス はいを選択してKore.ai ConnectorエージェントでKore.ai Botにアクセスできるようにします。このオプションは、Kore.ai コネクタ エージェントが企業の社内ネットワークで構成、有効化されている場合に表示されます。詳細については、Kore.ai Connectorの使用をご覧ください。

フィールドの追加

  1. +フィールドの追加をクリックするとフィールドの追加ウィンドウを開きます。必要に応じて、下記の図の通り、次に追加の認証を代表するその単一や複数のキー/値のペアを入力してください。 次のフィールドを指定します。
  2. 以下のフィールドを指定 してください:フィールドキー―認証のために指定するカスタムフィールドの名前。フィールド値―認証のために指定するカスタムフィールドの値。
  3. 追加をクリックして追加のフィールドを保存します。
  4. 追加のフィールドを追加する場合、認証フィールドセクションの追加をクリックしてください。

承認フィールド

デフォルトでは、認証フィールドとはタスクリクエストのメッセージのヘッダーの一部として調整されたものです。もしタスクリクエストには追加の認証フィールドが必須、または予想の認証はのヘッダーの一部ではないの場合、例えば、ソーシャルセキュリティの数字やPIN、

  1. +認証フィールドの追加をクリックして、下記の図の通りにフィールドを定義します。 Authorization Fields for Basic Auth
  2. フィールドタイプフィールドに、以下のうちの一つを選択することができます: 必須のタスクリクエストメッセージの位置および認証フィールドのタイプの次第です。ヘッダー―Botは、リクエストのヘッダの一部として認証フィールドを予想します。ペイロード―Botは、リクエストの本文のコンテンツの一部として認証フィールドを予想します。クエリ文字列―Botは認証フィールドをリクエストの本文にあるクエリとして予想します。パスパラメータ―Botは、認証フィールドをURLパスリクエストの一部として予想します。
  3. フィールドキーフィールドに、選択済のフィールドタイプフィールド名を入力してください。
  4. フィールド値フィールドに、フィールドキーの指定された値を入力してください。
  5. 追加をクリックします。新規の認証フィールドは認証フィールドのセクションに追加されました。
  6. 認証フィールドを追加する場合、認証フィールドセクションの追加をクリックしてください。

テスト

認証の保存後、認証ページで認証の定義をテストすることができます。

  1. タスクの残りの手順の開発を続ける前に、認証をテストをクリックします。 テストの承認
  2. テスト認証をクリックすると、テストはとは認証トークンのURLとコンシューマーキーおよびコンシューマートークンを使用して実行されます。もしテンナンシーは定義済の場合、テスト認証のダイアログは表示され下記の図の通りに表示されます。 認証ダイアログのテスト - oAuth
  3. テストをクリックすると認証テストを開始します。認証の検証が完成の場合、テスト認証のウィンドウが閉じて、その検証の結果、成功や失敗は即刻、テスト認証のボタンに.表示します。認証失敗の場合、下記の図の通りに、認証テスト失敗のメッセージはヘッダーおよび応答のタブとともに表示します。 認証テストに失敗

仕組みについて 

  1. Kore.ai アプリケーションはウェブアプリケーションから未認証のリクエストトークンを取得します。Kore.ai アプリケーションはユーザーをウェブアプリケーションのロクインダイアログへ導き直します。
  2. ユーザーはリクエストトークンを認証してそのアカウントと連結します。ウェブアプリケーションはユーザーをKore.ai アプリケーションへ導き直します。
  3. Kore.ai アプリケーション はリクエストトークンをアクセス トークンに変換します。
  4. アクセストークンはKore.aiアプリケーションをユーザーの身分として、提供元の保護済のリソースへアクセスことを可能にします。

以下の図とはoAuth v1認証タイプフィールドの作例、タスクのためにカスタマイズした認証を有効にするために定義する必要があります。 新しい認証メカニズム - oAuth V1

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

We have seen how an Alert task can be set up in Kore.ai virtual assistant platform here. In this section, we will see how authorization for the alert tasks can be set up using the OAuth v1.

Setting Up

OAuth is an open protocol to allow secure authorization in a simple and standard method from web, mobile, and desktop applications. To use OAuth, you must first register an account with the web application as you will need the log-in credentials for that application to configure the settings for the authorization mechanism.

Tenancy

If required, in the Subdomain section, select Yes if the base URL for a web application or user interface uses a tenant name in the URL. For example, kore is the tenant organization for a web service using tenants as www.kore.someCompany.com.
In the following example configuration, the tenancy URL contains the {tenant} organization placeholder.

Form Fields

To define oAuth v1, define the fields described in the following table.

FIELD NAME DESCRIPTION
Authorization Type Set to oAuth v1.
Callback URL The URL used by the web application or web service to redirect the end-user after end-user authorization is complete. This value, https://idp.kore.ai/workflows/callback/,  is provided as a read-only value by the Kore.ai application when you define oAuth v1 settings.
Identity Provider Name The name of the web application or web service, for example, Twitter. This field is required.
Consumer Key The value provided as the Kore.ai application identification to the web application. This field is required.
Consumer Secret The secret value provided by the Kore.ai application to establish ownership of the Consumer Key. This field is required.
Request Token Link The URL used by the Kore.ai application to obtain an unauthorized request token. A request token is the value used by the Kore.ai application to obtain authorization from the end-user to obtain an access token. For example, https://{tenant}.someCompany.com/oauth/request_token. After end-user authorization, an access token can be requested by the Kore.ai application. This field is required.
Access Token Link The URL used to exchange the end-user authorized request token for an access token. The access token is the value used by the Kore.ai application to gain access to the web application or web service on behalf of the end-user, instead of using the end-users log on credentials. For example, https://{tenant}.someCompany.com/oauth/access_token. This field is required.
User Authorization Link The URL used to obtain end-user authorization for the Kore.ai application to access the web application or web service using the access token. For example, https://{tenant}.someCompany.com/oauth/authorize. This field is required.
Access Using a Connector Select Yes to enable access for Kore.ai Bots using the Kore.ai Connector agent. This option is only visible if a Kore.ai Connector agent is configured and enabled in your enterprise on-premises network. For more information, see Using the Kore.ai Connector.

Add Additional Fields

  1. Click + Add Additional Fields to open the Additional Fields window, and then enter one or more key/value pairs that represent additional authorization input fields if required as shown in the following illustration.
    Additional Authorization Fields
  2. Specify the following fields:
    Field Key – The name of the custom field to specify for authorization.Field Value – The value of the custom field to specify for the authorization.
  3. Click Add to save the Additional Field.
  4. To add more Additional Fields, click Add in the Additional Fields section.

Authorization Fields

By default, authorization fields are configured as part of the header of the task request message. If your task request requires additional authorization fields or the expected authorization is not part of the header, for example, social security number or PIN,

  1. Click + Add Authorization Field and then define the fields as shown in the following illustration.
    Authorization Fields for Basic Auth
  2. In the Field Type field, you can select one of the following depending on where in the task request message and the type of authorization fields that are required.
    Header – The Bot expects the authorization fields as part of the header of the request.Payload – The Bot expects the authorization fields as part of the content of the body of the request.Query String – The Bot expects the authorization fields as a query in the body of the request.Path Param – The Bot expects the authorization fields as part of the URL path for the request.
  3. In the Field Key field, enter the name of the field for the selected Field Type.
  4. In the Field Value field, enter the value for the Field Key specified.
  5. Click Add. The new authorization field is added in the Authorization Fields section.
  6. To add additional authorization fields, click Add in the Authorization Fields section.

Testing

After you save the authorization, you can test your authorization definition on the Authorization page.

  1. Click Test Authorization before continuing to develop the remain steps of your task.
    Test Authorization
  2. When you click Test Authorization, the test is executed using the authentication token URLs and the Consumer Key and Consumer Token. If the tenancy was defined, the Test Authorization dialog is displayed as shown in the following illustration.
    Test Authorization Dialog - oAuth
  3. Click Test to begin the authorization test. When the validation of authentication is complete, the Test Authorization window is closed and the results of the validation, either success or failure, is displayed to the immediate right of the Test Authorization button. If the authorization fails, the Auth Test Failed message is displayed along with the Headers and Response tabs as shown in the following illustration.
    Authentication Test Fail

How it all Works 

  1. The Kore.ai application obtains an unauthorized request token from the web application. The Kore.ai application redirects the user to a login dialog at the web application.
  2. The user authorizes the request token, associating it with their account. The web application redirects the user back to the Kore.ai application.
  3. The Kore.ai application exchanges the request token for an access token.
  4. The access token allows the Kore.ai application to access a protected resource at the provider, on behalf of the user.

The following illustration is an example of the oAuth v1 authorization type fields that you must define to enable a customized authorization for your task.
New Authorization Mechanism - oAuth V1

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed