

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# セキュアトンネリング
<a name="secure-tunneling-component"></a>

`aws.greengrass.SecureTunneling` コンポーネントにより、制限されたファイアウォールの背後にある Greengrass コアデバイスとの、セキュアな双方向通信を確立できます。

例えば、ファイアウォールの背後にあり、すべての着信接続を禁止している、Greengrass を使用しているとします。セキュアトンネリングでは、MQTT を使用してアクセストークンをデバイスに転送し、次に WebSockets を使用して、ファイアウォール経由でそのデバイスに対し SSH 接続を行います。この AWS IoT マネージドのトンネルを使用することで、必要な SSH 接続をデバイスに対し開くことができます。 AWS IoT セキュアトンネリングを使用してリモートデバイスに接続する方法の詳細については、「 *AWS IoT デベロッパーガイド*」の[AWS IoT 「セキュアトンネリング](https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html)」を参照してください。

このコンポーネントは、`$aws/things/greengrass-core-device/tunnels/notify`トピックの AWS IoT Core MQTT メッセージブローカーをサブスクライブして、安全なトンネリング通知を受信します。

**Topics**
+ [バージョン](#secure-tunneling-component-versions)
+ [タイプ](#secure-tunneling-component-type)
+ [オペレーティングシステム](#secure-tunneling-component-os-support)
+ [要件](#secure-tunneling-component-requirements)
+ [依存関係](#secure-tunneling-component-dependencies)
+ [構成](#secure-tunneling-component-configuration)
+ [ローカルログファイル](#secure-tunneling-component-log-file)
+ [ライセンス](#secure-tunneling-component-licenses)
+ [使用方法](#secure-tunneling-component-usage)
+ [関連情報](#secure-tunneling-component-see-also)
+ [変更ログ](#secure-tunneling-component-changelog)

## バージョン
<a name="secure-tunneling-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 1.1.x
+ 1.0.x

## タイプ
<a name="secure-tunneling-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="secure-tunneling-component-os-support"></a>

このコンポーネントは、Linux コアデバイスにのみインストールできます。

アーキテクチャ:
+ Armv71
+ Armv8 (AArch64)
+ x86\$164

## 要件
<a name="secure-tunneling-component-requirements"></a>

このコンポーネントには次の要件があります。
+ セキュアトンネリングコンポーネントで使用できるディスク容量は、最低 32 MB です。この要件には、同じデバイスで実行されている Greengrass コアソフトウェアやその他のコンポーネントは含まれません。
+ セキュアトンネリングコンポーネントで使用可能な RAM は 16 MB 以上です。この要件には、同じデバイスで実行されている Greengrass コアソフトウェアやその他のコンポーネントは含まれません。詳細については、「[JVM オプションでメモリ割り当てを制御する](configure-greengrass-core-v2.md#jvm-tuning)」を参照してください。
+ セキュアトンネリングコンポーネントバージョン 1.0.12 以降には、Linux カーネルが 3.2 以上の GNU C Library (glibc) バージョン 2.25 以降が必要です。長期サポート終了日を過ぎたオペレーティングシステムとライブラリのバージョンはサポートされていません。オペレーティングシステムとライブラリは、長期サポートとともに使用する必要があります。
+ オペレーティングシステムと Java ランタイムの両方を 64 ビットとしてインストールする必要があります。
+ Greengrass コアデバイスにインストールされ、PATH 環境変数に追加された [Python](https://www.python.org/) 3.5 以降。
+ `libcrypto.so.1.1` は、Greengrass コアデバイスにインストールされ、PATH 環境変数に追加されています。
+ Greengrass コアデバイスのポート 443 で、アウトバウンドトラフィックを開きます。
+ Greengrass コアデバイスとの通信に必要な、通信サービスのサポートをオンにします。例えば、デバイスへの SSH 接続を開くには、そのデバイスで SSH を有効にする必要があります。

### エンドポイントおよびポート
<a name="secure-tunneling-component-endpoints"></a>

このコンポーネントは、基本的な操作に必要なエンドポイントとポートに加えて、次のエンドポイントとポートに対し、アウトバウンドリクエストを実行できる必要があります。詳細については、「[プロキシまたはファイアウォールを介したデバイストラフィックを許可する](allow-device-traffic.md)」を参照してください。


| Endpoint | ポート | 必要 | 説明 | 
| --- | --- | --- | --- | 
|  `data.tunneling.iot.region.amazonaws.com`  | 443 | はい |  セキュアトンネルを確立します。  | 

## 依存関係
<a name="secure-tunneling-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#secure-tunneling-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 1.0.19 – 1.1.3 ]

次の表に、このコンポーネントのバージョン 1.0.19 から 1.1.3 までの依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <3.0.0  | ソフト | 

------
#### [ 1.0.18 ]

次の表に、このコンポーネントのバージョン 1.0.18 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.13.0  | ソフト | 

------
#### [ 1.0.16 – 1.0.17 ]

次の表に、このコンポーネントのバージョン 1.0.16 から 1.0.17 までの依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.12.0  | ソフト | 

------
#### [ 1.0.14 – 1.0.15 ]

次の表に、このコンポーネントのバージョン 1.0.14 から 1.0.15 までの依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.11.0  | ソフト | 

------
#### [ 1.0.11 – 1.0.13 ]

次の表に、このコンポーネントのバージョン 1.0.11～1.0.13 の間の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.10.0  | ソフト | 

------
#### [ 1.0.10 ]

次の表に、このコンポーネントのバージョン 1.0.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.9.0  | ソフト | 

------
#### [ 1.0.9 ]

次の表に、このコンポーネントのバージョン 1.0.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.8.0  | ソフト | 

------
#### [ 1.0.8 ]

次の表に、このコンポーネントのバージョン 1.0.8 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.7.0  | ソフト | 

------
#### [ 1.0.5 - 1.0.7 ]

次の表に、このコンポーネントのバージョン 1.0.5 から 1.0.7 までの依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.6.0  | ソフト | 

------
#### [ 1.0.4 ]

次の表に、このコンポーネントのバージョン 1.0.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.5.0  | ソフト | 

------
#### [ 1.0.3 ]

次の表に、このコンポーネントのバージョン 1.0.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.4.0  | ソフト | 

------
#### [ 1.0.2 ]

次の表に、このコンポーネントのバージョン 1.0.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.3.0  | ソフト | 

------
#### [ 1.0.1 ]

次の表に、このコンポーネントのバージョン 1.0.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.0 <2.2.0  | ソフト | 

------
#### [ 1.0.0 ]

次の表に、このコンポーネントのバージョン 1.0.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) |  >=2.0.3 <2.1.0  | ソフト | 

------

コンポーネントの依存関係の詳細については、「[コンポーネント recipe のリファレンス](component-recipe-reference.md#recipe-reference-component-dependencies)」を参照してください。

## 構成
<a name="secure-tunneling-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

`OS_DIST_INFO`  
(オプション) コアデバイスのオペレーティングシステム。デフォルトでコンポーネントは、コアデバイスで実行されているオペレーティングシステムを自動的に識別しようとします。コンポーネントがデフォルト値で開始できない場合は、この値を使用してオペレーティングシステムを指定します。このコンポーネントでサポートされているオペレーティングシステムのリストについては、「[デバイスの要件](greengrass-nucleus-component.md#greengrass-v2-requirements)」を参照してください。  
これには、次のいずれかの値を指定できます: `auto`、`ubuntu`、`amzn2`、`raspberrypi`。  
デフォルト: `auto`

`accessControl`  
(オプション) コンポーネントがセキュアトンネリング通知トピックにサブスクライブできるようにする [[authorization policy]](interprocess-communication.md#ipc-authorization-policies) (認可ポリシー) を含むオブジェクト。  
デプロイがモノグループをターゲットとする場合は、この設定パラメータを変更しないでください。デプロイで、個別のコアデバイスを対象としており、そのサブスクリプションをデバイスのトピックに制限したい場合は、そのコアデバイスのモノの名前 (thing name) を指定します。デバイスの認可ポリシー内にある `resources` の値で、MQTT のトピックワイルドカードを、対象のデバイスのモノの名前に置き換えます。

```
{
  "aws.greengrass.ipc.mqttproxy": {
    "aws.iot.SecureTunneling:mqttproxy:1": {
      "policyDescription": "Access to tunnel notification pubsub topic",
      "operations": [
        "aws.greengrass#SubscribeToIoTCore"
      ],
      "resources": [
        "$aws/things/+/tunnels/notify"
      ]
    }
  }
}
```

**Example 例: 設定マージの更新**  
次の設定例では、このコンポーネントが Ubuntu を実行する **MyGreengrassCore** という名前のコアデバイスでセキュアなトンネルを開くことができるように指定しています。  

```
{
  "OS_DIST_INFO": "ubuntu",
  "accessControl": {
    "aws.greengrass.ipc.mqttproxy": {
      "aws.iot.SecureTunneling:mqttproxy:1": {
        "policyDescription": "Access to tunnel notification pubsub topic",
        "operations": [
          "aws.greengrass#SubscribeToIoTCore"
        ],
        "resources": [
          "$aws/things/MyGreengrassCore/tunnels/notify"
        ]
      }
    }
  }
}
```

## ローカルログファイル
<a name="secure-tunneling-component-log-file"></a>

このコンポーネントは次のログファイルを使用します。

```
/greengrass/v2/logs/aws.greengrass.SecureTunneling.log
```

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。を AWS IoT Greengrass ルートフォルダへのパス`/greengrass/v2`に置き換えます。

  ```
  sudo tail -f /greengrass/v2/logs/aws.greengrass.SecureTunneling.log
  ```

## ライセンス
<a name="secure-tunneling-component-licenses"></a>

このコンポーネントには、次のサードパーティーソフトウェア/ライセンス品が含まれています。
+ [AWS IoT Device Client](https://github.com/awslabs/aws-iot-device-client)/Apache ライセンス 2.0
+ [AWS IoT Device SDK for Java](https://github.com/aws/aws-greengrass-core-sdk-java/)/Apache License 2.0
+ [gson](https://github.com/google/gson)/Apache License 2.0
+ [log4j](https://logging.apache.org/log4j/2.x/)/Apache License 2.0
+ [slf4j](http://www.slf4j.org/)/Apache License 2.0

## 使用方法
<a name="secure-tunneling-component-usage"></a>

デバイス上で安全なトンネリングコンポーネントを使用するには、以下を実行します。

1. セキュアトンネリングコンポーネントをデバイスにデプロイします。

1. [AWS IoT コンソール](https://console.aws.amazon.com/iot)を開きます。左側のメニューから、**[リモートアクション]** を選択し、**[セキュアトンネル]** を選択します。

1. Greengrass デバイスへのトンネルを作成します。

1. ソースアクセストークンをダウンロードします。

1. ソースアクセストークンでローカルプロキシを使用して、送信先に接続します。詳細については、*AWS IoT デベロッパーガイド*の「[How to use the local proxy](https://docs.aws.amazon.com/iot/latest/developerguide/how-use-local-proxy.html)」を参照してください。

## 関連情報
<a name="secure-tunneling-component-see-also"></a>
+ [AWS IoT 「 デベロッパーガイド」の「セキュアトンネ](https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html)リング*AWS IoT *」
+ *AWS IoT デベロッパーガイド*の「[How to use the local proxy](https://docs.aws.amazon.com/iot/latest/developerguide/how-use-local-proxy.html) 」

## 変更ログ
<a name="secure-tunneling-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  **バージョン**  |  **変更**  | 
| --- | --- | 
|  1.1.3  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.1.2  |   このバージョンは現在利用できません。このバージョンの改善は、このコンポーネントのそれ以降のバージョンで利用できます。  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.1.1  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.1.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.0.19  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  トンネルソースクライアントとしてセキュアトンネリングローカルプロキシを使用している場合は、ローカルプロキシをバージョン 3.1.1 以降にアップグレードするまで、コンポーネントをこのバージョンに更新しないでください。   | 
|  1.0.18  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  1.0.17  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.0.16  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  1.0.15  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.0.14  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  1.0.13  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.0.12  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.0.11  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  1.0.10  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  1.0.9  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  1.0.8  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  1.0.7  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/secure-tunneling-component.html)  | 
|  1.0.6  |  このバージョンには、バグ修正が含まれています。  | 
|  1.0.5  |  Greengrass nucleus バージョン 2.5.0 のリリース用にバージョンが更新されました。  | 
|  1.0.4  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  1.0.3  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  1.0.2  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  1.0.1  |  Greengrass nucleus バージョン 2.1.0 のリリース用にバージョンが更新されました。  | 
|  1.0.0  |  当初のバージョン  | 