

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon OpenSearch Serverless 中的 FIPS 合規
<a name="fips-compliance-opensearch-serverless"></a>

Amazon OpenSearch Serverless 支援聯邦資訊處理標準 (FIPS) 140-2，這是美國和加拿大政府標準，指定保護敏感資訊之密碼編譯模組的安全要求。當您使用 OpenSearch Serverless 連線至已啟用 FIPS 的端點時，密碼編譯操作會使用 FIPS 驗證的密碼編譯程式庫進行。

OpenSearch Serverless FIPS 端點可在支援 FIPS AWS 區域 的 中使用。這些端點對所有通訊使用 TLS 1.2 或更新版本和 FIPS 驗證的密碼編譯演算法。如需詳細資訊，請參閱*AWS 《 驗證存取使用者指南*》中的 [FIPS 合規](https://docs.aws.amazon.com/verified-access/latest/ug/fips-compliance.html)。

**Topics**
+ [搭配 OpenSearch Serverless 使用 FIPS 端點](#using-fips-endpoints-opensearch-serverless)
+ [使用 FIPS 端點搭配 AWS SDKs](#using-fips-endpoints-aws-sdks)
+ [設定 VPC 端點的安全群組](#configuring-security-groups-vpc-endpoints)
+ [使用 FIPS VPC 端點](#using-fips-vpc-endpoint)
+ [驗證 FIPS 合規](#verifying-fips-compliance)
+ [解決私有託管區域中的 FIPS 端點連線問題](serverless-fips-endpoint-issues.md)

## 搭配 OpenSearch Serverless 使用 FIPS 端點
<a name="using-fips-endpoints-opensearch-serverless"></a>

在支援 FIPS AWS 區域 的情況下，OpenSearch Serverless 集合可透過標準和 FIPS 相容的端點存取。FIPS 相容的變體適用於 OpenSearch Serverless NextGen 和 Classic 集合端點。如需詳細資訊，請參閱*AWS 《 驗證存取使用者指南*》中的 [FIPS 合規](https://docs.aws.amazon.com/verified-access/latest/ug/fips-compliance.html)。

在下列範例中，以您的{{集合 ID、ID 和區域取代 collection-id}}、{{account-id}} 和 region。 {{}} AWS 帳戶 

**NextGen 每個集合端點**
+ **標準** – **https://{{collection-id}}.aoss.{{region}}.on.aws**
+ **符合 FIPS** – **https://{{collection-id}}.aoss-fips.{{region}}.on.aws**

**NextGen 每個帳戶端點**
+ **標準** – **https://{{account-id}}.aoss.{{region}}.on.aws**
+ **符合 FIPS** – **https://{{account-id}}.aoss-fips.{{region}}.on.aws**

**每個集合的典型端點**
+ **標準** – **https://{{collection-id}}.{{region}}.aoss.amazonaws.com**
+ **符合 FIPS** – **https://{{collection-id}}.{{region}}.aoss-fips.amazonaws.com**

NextGen FIPS 端點使用 VPC AWS PrivateLink 存取的標準，與其非 FIPS 對等端點相同。如需詳細資訊，請參閱[透過 的資料平面存取 AWS PrivateLink](serverless-vpc.md)。

**注意**  
在啟用 FIPS 的區域中，標準和 FIPS 相容的端點都提供 FIPS 相容的密碼編譯。FIPS 特定的端點可協助您滿足合規要求，這些要求特別強制在名稱中使用具有 **FIPS** 的端點。

## 使用 FIPS 端點搭配 AWS SDKs
<a name="using-fips-endpoints-aws-sdks"></a>

使用 AWS SDKs時，您可以在建立用戶端時指定 FIPS 端點。在下列範例中，將 {{collection\_id}} 和 取代{{AWS 區域}}為您的集合 ID 及其 AWS 區域。

```
# Python SDK example
from opensearchpy import OpenSearch, RequestsHttpConnection, AWSV4SignerAuth
import boto3
host = '"https://{{collection_id}}.{{AWS 區域}}.aoss-fips.amazonaws.com"
region = 'us-west-2'
service = 'aoss'
credentials = boto3.Session().get_credentials()
auth = AWSV4SignerAuth(credentials, region, service)
client = OpenSearch(
    hosts = [{'host': host, 'port': 443}],
    http_auth = auth,
    use_ssl = True,
    verify_certs = True,
    connection_class = RequestsHttpConnection,
    pool_maxsize = 20
)
```

## 設定 VPC 端點的安全群組
<a name="configuring-security-groups-vpc-endpoints"></a>

為了確保與 FIPS 相容的 Amazon VPC (VPC) 端點進行適當通訊，請建立或修改安全群組，以允許來自您 VPC 中需要存取 OpenSearch Serverless 資源的傳入 HTTPS 流量 (TCP 連接埠 443)。然後在建立期間或在建立之後修改端點，將此安全群組與您的 VPC 端點建立關聯。如需詳細資訊，請參閱《*Amazon VPC 使用者指南*》的[建立安全群組](https://docs.aws.amazon.com/vpc/latest/userguide/creating-security-groups.html)。

## 使用 FIPS VPC 端點
<a name="using-fips-vpc-endpoint"></a>

建立符合 FIPS 標準的 VPC 端點後，您可以使用它從 VPC 中的資源存取 OpenSearch Serverless。若要使用 API 操作的端點，請將 SDK 設定為使用區域 FIPS 端點，如 [搭配 OpenSearch Serverless 使用 FIPS 端點](#using-fips-endpoints-opensearch-serverless)一節中所述。對於 OpenSearch Dashboards 存取，請使用集合特定的 Dashboards URL，從 VPC 內存取時，該 URL 會自動透過 FIPS 相容 VPC 端點路由。如需詳細資訊，請參閱[搭配使用 OpenSearch Dashboards 與 Amazon OpenSearch Service](dashboards.md)。

## 驗證 FIPS 合規
<a name="verifying-fips-compliance"></a>

若要驗證您對 OpenSearch Serverless 的連線是否使用 FIPS 相容密碼編譯，請使用 AWS CloudTrail 來監控對 OpenSearch Serverless 發出的 API 呼叫。檢查 CloudTrail 日誌中的 `eventSource` 欄位是否顯示 API `aoss-fips.amazonaws.com` 呼叫。

對於 OpenSearch Dashboards 存取，您可以使用瀏覽器開發人員工具來檢查 TLS 連線詳細資訊，並確認正在使用符合 FIPS 規範的密碼套件。