ジョシュアが言ったように、ユーザー名を使用してクライアントを認証する場合、クライアント証明書は必要ありません。このシナリオでは、クライアントはユーザー名とパスワードを渡し、サーバーは相互認証/ハンドシェイク プロセス用の証明書を提供します。
私は最近、同様のシステム (win form over www) 用に wcf セキュリティ システムをセットアップしました。CodePlexからのガイダンスを使用しました。すべての手順に従う必要はありません。たとえば、ロール機能は使用していませんが、メンバーシップ ストアを使用しています。
以下は、ユーザー名とサーバー証明書を使用した wsHttpBinding のセットアップ/構成の簡単な要約です。
クライアント構成:
<security mode="Message">
<message clientCredentialType="UserName" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="false" />
</security>
プロキシに設定されたユーザー名パスワード:
'ClientCredentials added to service call for authentication
objServiceClient.ClientCredentials.UserName.UserName = MyAppContext.Username
objServiceClient.ClientCredentials.UserName.Password = MyAppContext.Password
サーバー構成:
バインディング:
<wsHttpBinding>
<binding name="MyApp.wsHttpBindingMessageUname">
<security mode="Message">
<message clientCredentialType="UserName" negotiateServiceCredential="true"
establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
行動:
<serviceBehaviors>
<behavior name="MyApp.DefaultServiceBehavior">
<serviceCredentials>
<serviceCertificate findValue="localhost" storeLocation="LocalMachine"
storeName="My" x509FindType="FindBySubjectName" />
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
membershipProviderName="AspNetSqlMembershipProvider" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
ご不明な点がございましたら、お気軽にお問い合わせください。