私はTomcat上で実行する必要があるJAVA APPを開発しています。私は自分のアプリケーションWebにアクセスしているリモートユーザーを特定できる必要があります。TomcatとWindowsの統合認証
このリモートユーザーはWindows上で実行されているため、「Windowsログイン」(sAMAccountNameアクティブディレクトリ属性)を取得する必要があります。
IISで最も簡単です。私は、ユーザーを取得するには、このDetect user logged on a computer using ASP.NET appに従うのserver.xmlの内容がある
をログに記録:私は自動ログインが必要
<!-- Define a Security Constraint on this Application -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>myCompany Users</role-name>
</auth-constraint>
</security-constraint>
<!-- Define the Login Configuration for this Application -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>myRealm</realm-name>
</login-config>
<!-- Security roles referenced by this web application -->
<security-role>
<description>The role that is required to log in to APP</description>
<role-name>myCompany Users</role-name>
</security-role>
:
<Realm
className="org.apache.catalina.realm.JNDIRealm" debug="99"
connectionURL="ldap://DAServer:389"
connectionName="[email protected]"
connectionPassword="secret"
referrals="follow"
userBase="OU=mycompany,DC=mydomain,DC=local"
userSubtree="true"
roleBase="OU=groups,DC=mydomain,DC=local"
roleName="name"
roleSubtree="true"
roleSearch="(member={0})"/>
とweb.xmlの内容があります。
私の問題についての詳細を追加 – VansFannel