---
title: "ウォークスルー:Content Deliveryインスタンスのセキュリティデータベースを無効にする"
slug: "walkthrough--disable-the-security-database-on-a-content-delivery-instance"
abstract: "Content DeliveryインスタンスでSitecore Securityデータベースを無効化する方法。"
---
# ウォークスルー:Content Deliveryインスタンスのセキュリティデータベースを無効にする

Sitecoreセキュリティデータベースを使ってセキュリティ情報を保存します。セキュリティデータベースはデフォルトでコアデータベースの一部ですが、[スタンドアロンデータベースに分離することも可能です](https://doc.sitecore.com/xp/ja/developers/92/platform-administration-and-architecture/walkthrough--moving-security-data-to-a-separate-database.html "Walkthrough: Moving security data to a separate database")。Content Delivery(CD)インスタンスは、コアデータベースの一部であれスタンドアロンであれ、セキュリティデータベースと通信するためにsecurity接続文字列を使用します。

ユーザー認証が不要で、できるだけ小規模に管理したい場合、CDインスタンスのセキュリティデータベースを無効にすることもできます。

> !重要Federated Experience Manager(FXM)を使用している場合は、CDインスタンスのセキュリティデータベースを無効に *しないでください* 。
> 
> ヘッドレスサービス(JSS)を使用する場合Sitecore、CDインスタンス上のセキュリティデータベースを無効に *しないでください* 。レイアウトサービスおよび辞書サービスは、ユーザーなりすまし(ImpersonateApiKeyUser/AnonymousUserFilter)API Sitecoreサービスに依存しており、これによりユーザーを解決するためにセキュリティデータベースが必要です。これを無効にすると、これらのサービスはHTTP 403(禁止)エラーを返します。

これを実現するには、各CDインスタンスで4つのコンポーネントを無効化する必要があります:

-   フェデレーテッド認証
-   ASP.NETメンバーシップ認証
-   セキュリティデータベース接続
-   EnsureAnonymousUsersプロセッサ

## フェデレーテッド認証を無効にする

フェデレーテッド認証を無効にするには:

1.  CDインスタンスのルートフォルダでWeb.configファイルを開いてください。
    
2.  appSettingsノード、add key="security:define"ノードでは、value属性をNoneに変更します。
    
    <add key="security:define" value="None" />
    
    > !注これにより[Authentication.OWIN](https://doc.sitecore.com/xp/en/developers/100/sitecore-experience-manager/en/using-federated-authentication-with-sitecore.html)およびフェデレーテッド認証が無効になります。
    
3.  Web.configファイルを保存してください。
    

## ASP.NETのメンバーシップ認証を無効にしてください

ASP.Netメンバー認証を無効にするには:

1.  CDインスタンスのルートフォルダでWeb.configファイルを開いてください。
    
2.  system.web/membershipノードでは:
    
    -   add name="sitecore"ノードでrealProviderName属性をdisabledに変更します。
    -   add name="sql"ノードを削除してください。
    
    <membership defaultProvider="sitecore" hashAlgorithmType="SHA1">
     <providers>
     <clear />
     <add name="sitecore"
     type="Sitecore.Security.SitecoreMembershipProvider, Sitecore.Kernel"
     realProviderName="disabled"
     providerWildcard="%"
     raiseEvents="true" />
     <add name="sql"
     type="System.Web.Security.SqlMembershipProvider"
     connectionStringName="security"
     applicationName="sitecore" minRequiredPasswordLength="1"
     minRequiredNonalphanumericCharacters="0"
     requiresQuestionAndAnswer="false"
     requiresUniqueEmail="false"
     maxInvalidPasswordAttempts="5" />
     <add name="disabled"
     type="Sitecore.Security.DisabledMembersipProvider, Sitecore.Kernel"
     applicationName="sitecore" />
     <add name="switcher"
     type="Sitecore.Security.SwitchingMembershipProvider, Sitecore.Kernel"
     applicationName="sitecore"
     mappings="switchingProviders/membership" />
     </providers>
    </membership>
    
3.  system.web/roleManagerノードでは:
    
    -   add name="sitecore"ノードでrealProviderName属性をdisabledに変更します。
    -   add name="sql"ノードを削除してください。
    
    <roleManager defaultProvider="sitecore" enabled="true">
     <providers>
     <clear />
     <add name="sitecore"
     type="Sitecore.Security.SitecoreRoleProvider, Sitecore.Kernel"
     realProviderName="disabled"
     raiseEvents="true" />
     <add name="sql"
     type="System.Web.Security.SqlRoleProvider"
     connectionStringName="security"
     applicationName="sitecore" />
     <add name="disabled"
     type="Sitecore.Security.DisabledRoleProvider, Sitecore.Kernel"
     applicationName="sitecore" />
     <add name="switcher"
     type="Sitecore.Security.SwitchingRoleProvider, Sitecore.Kernel"
     applicationName="sitecore"
     mappings="switchingProviders/roleManager" />
     </providers>
    </roleManager>
    
4.  system.web/profileノードでは:
    
    -   defaultprovider属性をdisabledに変更します。
    -   add name="sql"ノードを削除してください。
    
    <profile defaultProvider="disabled" enabled="true" inherits="Sitecore.Security.UserProfile, Sitecore.Kernel">
     <providers>
     <clear />
     <add name="sql"
     type="System.Web.Profile.SqlProfileProvider"
     connectionStringName="security"
     applicationName="sitecore" />
     <add name="disabled"
     type="Sitecore.Security.DisabledProfileProvider, Sitecore.Kernel"
     applicationName="sitecore" />
     <add name="switcher"
     type="Sitecore.Security.SwitchingProfileProvider, Sitecore.Kernel"
     applicationName="sitecore"
     mappings="switchingProviders/profile" />
     </providers>
    </profile>
    
5.  Web.configファイルを保存してください。
    

> !注realProviderName属性をdisabledに設定すると、Sitecore name=disabledプロバイダーを使い、アクティブユーザー名は*Undefined*という名前のユーザーになります。

## セキュリティデータベース接続を無効にしてください

セキュリティデータベース接続を無効にするには:

1.  CDインスタンスの App\_Config\\ フォルダで ConnectionStrings.config ファイルを開いてください。
2.  add name="security"ノードを削除してください。
3.  ConnectionStrings.configファイルを保存してください。

## EnsureAnonymousUsersプロセッサを無効にしてください

EnsureAnonymousUsersプロセッサを無効化するには:

1.  CDインスタンスのApp\_Config\\ フォルダでSitecore.configファイルを開いてください。
    
2.  processor type="Sitecore.Pipelines.Loader.EnsureAnonymousUsers, Sitecore.Kernel"ノードをコメントアウトします。
    
    <!-- <processor type="Sitecore.Pipelines.Loader.EnsureAnonymousUsers, Sitecore.Kernel" resolve="true" /> -->
    
3.  Sitecore.configファイルを保存してください。