> For the complete documentation index, see [llms.txt](https://docs.scepman.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scepman.com/ja/zheng-ming-shu-guan-li/active-directory/general-configuration.md).

# 一般設定

SCEPmanが受信SOAPリクエストを正常に処理できるようにするには、いくつかの手順が必要です。

{% stepper %}
{% step %}

### カスタムドメイン

SCEPmanで正常に認証するには、次の `A record` を使用するカスタムドメインがApp Serviceを指すように設定してください。そうしないと、クライアントはドメインコントローラーから有効なKerberosチケットを要求できません。

{% hint style="info" %}
カスタムドメインは、ADドメインのFQDNに似せる必要はありません。そのため、ドメイン `ad.contoso.local` を使用していても、SCEPman用に同一または類似のカスタムドメインを用意する必要はありません。

詳細については、以下の既知の問題に関する [WS\_E\_ENDPOINT\_ACCESS\_DENIED](https://docs.scepman.com/ja/zheng-ming-shu-guan-li/active-directory/general-configuration.md#ws_e_endpoint_access_denied) をご覧ください。
{% endhint %}

カスタムドメインを使用してアクセスできるように、SCEPmanが構成されていることを確認してください。

{% content-ref url="/pages/8eb47ea387d89933dddb8698281a8acb2f7a1af7" %}
[カスタム ドメイン](https://docs.scepman.com/ja/azure-gou-cheng/custom-domain.md)
{% endcontent-ref %}
{% endstep %}

{% step %}

### BaseUrl

{% tabs %}
{% tab title="Linux" %}
Linux App Service では、コロンの代わりに二重アンダースコア（`__`）を使用します。

認証を正常に行うには、次の [AppConfig\_\_BaseUrl](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/basics.md#appconfig-baseurl) 変数がカスタムドメインと一致していることを確認してください。

| 設定                                                                                                                     | 値                      |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| [AppConfig\_\_BaseUrl](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/basics.md#appconfig-baseurl) | 例: scepman.contoso.com |

**または**、他のSCEPmanエンドポイントとは異なるURLを使用してAD Endpointにアクセスする場合は、専用の [AppConfig\_\_ActiveDirectory\_\_BaseUrl](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/general.md#appconfig-activedirectory-baseurl) 設定を使用してください。

| 設定                                                                                                                                                                          | 値                         |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| [AppConfig\_\_ActiveDirectory\_\_BaseUrl](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/general.md#appconfig-activedirectory-baseurl) | 例: adendpoint.contoso.com |
| {% endtab %}                                                                                                                                                                |                           |

{% tab title="Windows" %}
Windows App Service では、設定名にコロン（`:`）を使用します。

認証を正常に行うには、次の [AppConfig:BaseUrl](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/basics.md#appconfig-baseurl) 変数がカスタムドメインと一致していることを確認してください。

| 設定                | 値                      |
| ----------------- | ---------------------- |
| AppConfig:BaseUrl | 例: scepman.contoso.com |

**または**、他のSCEPmanエンドポイントとは異なるURLを使用してAD Endpointにアクセスする場合は、専用の [AppConfig:ActiveDirectory:BaseUrl](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/general.md#appconfig-activedirectory-baseurl) 設定を使用してください。

| 設定                                | 値                         |
| --------------------------------- | ------------------------- |
| AppConfig:ActiveDirectory:BaseUrl | 例: adendpoint.contoso.com |
| {% endtab %}                      |                           |
| {% endtabs %}                     |                           |
| {% endstep %}                     |                           |

{% step %}

### Service Principalを作成する

SCEPman PowerShellモジュールの `New-SCEPmanADPrincipal` コマンドレットを使用して、オンプレミスのActive DirectoryドメインにService Principalを作成します。また、このアカウントからkeytabをエクスポートし、SCEPmanのCA証明書で暗号化します。

このコマンドは、ドメインコントローラー、または `RSAT-AD-Tools` 機能がインストールされたドメイン参加済みサーバーで実行できます。また、Service Principalを作成するOUで次のアクセス許可が必要です。

OU自体:

* コンピューターオブジェクトの作成

子孫のコンピューターオブジェクト:

* パスワードのリセット
* 次の属性の書き込み: `msDS-SupportedEncryptionTypes`
* 次の属性の書き込み: `servicePrincipalName`
* 次の属性の書き込み: `userPrincipalName`

以下のバリアントでも、SCEPman インスタンスへの送信 HTTPS ネットワークアクセスが必要です。

{% hint style="info" %}
Domain Controller にアクセスできるコンピューターがネットワークに接続されていない場合でも動作する CMDlet のバリアントがありますが、SCEPman CA 証明書をダウンロードして、CMDlet を実行するマシンに CA をコピーするなど、追加の準備が必要です。
{% endhint %}

```powershell
Install-Module SCEPman -Force
New-SCEPmanADPrincipal -Name "SCEPmanAD" -AppServiceUrl "scepman.contoso.com" -OU
"OU=Example,DC=contoso,DC=local"
```

このコマンドを実行すると、次の処理が行われます。

1. 次の場所にコンピューター オブジェクトを作成します。 `OU=Example,DC=contoso,DC=local` 組織単位。
2. 手順 5 で keytab を暗号化するため、SCEPman の CA 証明書をダウンロードします。
3. コンピューター オブジェクトにサービス プリンシパル名 (SPN) を追加します。
4. コンピューターのパスワードに基づく暗号化キーを含む、コンピューター アカウントの keytab を作成します。
5. SCEPman の CA 証明書で keytab を暗号化します。これにより、SCEPman だけが CA の秘密鍵を使って復号できます。
6. 暗号化された keytab を出力し、SCEPman の構成に転送できるようにします。

Base64 エンコードされた出力を、次の環境変数に追加します。 **AppConfig:ActiveDirectory:Keytab** SCEPman App Service 上で。
{% endstep %}

{% step %}

### SCEPman に Keytab を追加する

次の環境変数を **SCEPman App Service。** 用途に応じて、使用可能な証明書テンプレートを 1 つ以上有効にします。

*すべての証明書テンプレートを有効にする例：*

{% tabs %}
{% tab title="Linux" %}
Linux App Service では、コロンの代わりに二重アンダースコア（`__`）を使用します。

| 設定                                                                                                                                                                                                | 値                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [AppConfig\_\_ActiveDirectory\_\_Keytab](appconfig:ActiveDirectory:Keytab)                                                                                                                        | 次の場所で作成したサービス プリンシパルの Base64 エンコード済み keytab： [手順 3](#create-service-principal) |
| [AppConfig\_\_ActiveDirectory\_\_Computer\_\_Enabled](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/computer-template.md#appconfig-activedirectory-enabled) | true                                                                           |
| [AppConfig\_\_ActiveDirectory\_\_User\_\_Enabled](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/user-template.md#appconfig-activedirectory-enabled)         | true                                                                           |
| [AppConfig\_\_ActiveDirectory\_\_DC\_\_Enabled](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/dc-template.md#appconfig-activedirectory-enabled)             | true                                                                           |
| [AppConfig\_\_ActiveDirectory\_\_RdpServer\_\_Enabled](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/rdp-template.md#appconfig-activedirectory-enabled)     | true                                                                           |
| {% endtab %}                                                                                                                                                                                      |                                                                                |

{% tab title="Windows" %}
Windows App Service では、設定名にコロン（`:`）を使用します。

| 設定                                                                                                                                                                                       | 値                                                                              |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [AppConfig:ActiveDirectory:Keytab](appconfig:ActiveDirectory:Keytab)                                                                                                                     | 次の場所で作成したサービス プリンシパルの Base64 エンコード済み keytab： [手順 3](#create-service-principal) |
| [AppConfig:ActiveDirectory:Computer:Enabled](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/computer-template.md#appconfig-activedirectory-enabled) | true                                                                           |
| [AppConfig:ActiveDirectory:User:Enabled](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/user-template.md#appconfig-activedirectory-enabled)         | true                                                                           |
| [AppConfig:ActiveDirectory:DC:Enabled](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/dc-template.md#appconfig-activedirectory-enabled)             | true                                                                           |
| [AppConfig:ActiveDirectory:RdpServer:Enabled](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/active-directory/rdp-template.md#appconfig-activedirectory-enabled)     | true                                                                           |
| {% endtab %}                                                                                                                                                                             |                                                                                |
| {% endtabs %}                                                                                                                                                                            |                                                                                |
| {% endstep %}                                                                                                                                                                            |                                                                                |
| {% endstepper %}                                                                                                                                                                         |                                                                                |

## 既知の問題

### WS\_E\_ENDPOINT\_ACCESS\_DENIED

```
エラー：WS_E_ENDPOINT_ACCESS_DENIED 
16 進数：0x803d0005
10 進数：-2143485947
```

このエラーは、次を使用している場合に CEP サーバーの検証中に発生することが確認されています。 *既定の* Azure App Service の URI。このエラーは、Kerberos プロトコルがアクセス対象サービスのサービス プリンシパル名として、 `A record` を要求するために発生します。たとえば、既定の App Service ドメインの場合、 `contoso.azurewebsites.net` は `CNAME` であり、次のようなものを指します。 `A record` 類似の値：

```
waws-prod-ab1-234-c56d.westeurope.cloudapp.azure.com
```

このため、 `A record` インフラストラクチャホストのレコードは将来にわたって一貫性が保たれるとは限らないため、このホストのサービスプリンシパル名を追加することは **推奨されません。**.

必ずアプリサービスにカスタムドメインを追加し、DNSプロバイダーで `A record` を使用して、アプリサービスを指すように設定してください。 `CNAME`.

{% content-ref url="/pages/8eb47ea387d89933dddb8698281a8acb2f7a1af7" %}
[カスタム ドメイン](https://docs.scepman.com/ja/azure-gou-cheng/custom-domain.md)
{% endcontent-ref %}

### ERROR\_INVALID\_PARAMETER

```
エラー: ERROR_INVALID_PARAMETER
16進数: 0x80070057
10進数: -2147024809
```

このエラーは、次で始まるURIを入力した場合に、CEPサーバーの登録中に発生します。 `http://`。CEPサーバーの登録には、必ず `https://` .

### ERROR\_ACCESS\_DENIED

```
エラー: ERROR_ACCESS_DENIED
16進数: 0x80070005
10進数: -2147024891
```

コンピューターのコンテキストでCEPサーバーを登録する場合、GPOの編集中に操作を行うユーザー（ `gpmc.msc`を起動したアカウント）は、そのコンピューターのローカルAdministratorsグループのメンバーである必要があります。

この場合は、 `gpmc.msc` を管理者権限で起動してください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.scepman.com/ja/zheng-ming-shu-guan-li/active-directory/general-configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
