21

「j_security_check」を確認できるようにするための標準的な場所はありますか?

私のコンピューターを検索してもファイルは見つかりません。ファイルへの参照だけです。では、セキュリティ上の理由で非表示になっているのでしょうか、それともファイルではないのでしょうか。

私はアプリケーションから締め出されており、これが解決策を検討している最初の場所です。

4

3 に答える 3

26

これはサーブレットAPIの一部であり、サーブレットコンテナによって実装されます。あなたの場合、それはTomcatによって実装されています。より具体的には、org.apache.catalina.authenticator.FormAuthenticatorクラス。

227        // Is this the action request from the login page?
228        boolean loginAction =
229            requestURI.startsWith(contextPath) &&
230            requestURI.endsWith(Constants.FORM_ACTION);
231
232        // No -- Save this request and redirect to the form login page
233        if (!loginAction) {
234            session = request.getSessionInternal(true);
235            if (log.isDebugEnabled())
236                log.debug("Save request in session '" + session.getIdInternal() + "'");
237            try {
238                saveRequest(request, session);
239            } catch (IOException ioe) {
240                log.debug("Request body too big to save during authentication");
241                response.sendError(HttpServletResponse.SC_FORBIDDEN,
242                        sm.getString("authenticator.requestBodyTooBig"));
243                return (false);
244            }
245            forwardToLoginPage(request, response, config);
246            return (false);
247        }
248
249        // Yes -- Validate the specified credentials and redirect
250        // to the error page if they are not correct
251        Realm realm = context.getRealm();
252        if (characterEncoding != null) {
253            request.setCharacterEncoding(characterEncoding);
254        }
255        String username = request.getParameter(Constants.FORM_USERNAME);
256        String password = request.getParameter(Constants.FORM_PASSWORD);
257        if (log.isDebugEnabled())
258            log.debug("Authenticating username '" + username + "'");
259        principal = realm.authenticate(username, password);
260        if (principal == null) {
261            forwardToErrorPage(request, response, config);
262            return (false);
263        }

Constants.FORM_ACTIONです/j_security_check。_

ロックアウトされるという具体的な問題については、適切なユーザー名とパスワードを指定するようにしてください。ユーザーデータベースは通常、レルムによって構成されます。

于 2012-05-23T15:29:36.520 に答える
6

これはファイルではありません。これはコンテナベースの認証のエイリアスです。

http://docs.oracle.com/javaee/1.4/tutorial/doc/Security5.html

于 2012-05-23T15:29:30.807 に答える
-1

j_security_checkでは何もする必要はありません。問題は他の場所にあります:

例えば:

DB(またはTomcatを使用している場合はtomcat-users.xmlファイル)への接続、パスワードの暗号化、web.xml内の何か、context.xml内の何か。Glassfishの場合は、プールとレルム、またはglassfish-web.xml内の何かである可能性もあります。

ログを注意深く確認してください。GFの場合、次のようにFinestを有効にする必要があります。(a)次のページに移動します:http:// localhost:4848 / common / monitor/serverInstMonitoringServerPage.jsf。(b)このプロパティをFinestに設定します:javax.enterprise.system.core.security

于 2015-12-30T10:36:31.400 に答える