私の問題に対する明確な答えが見つからないため、ここに書きました。
私のプロジェクトは Spring MVC と Spring Security を使用しています。Webアプリケーション用に両方をうまくインストールしました(もちろんJavaを使用)。post および get メソッドでアクセスできますが、ユーザーが通常の形式の Spring Security を介して接続された後でのみです。
これから、ユーザーは次のようなアドレスでリクエストを行います。
../../get.request?request=getListCommand
get.request は Spring MVC からのマッピングです。このアクセスは、ユーザーが認証された後にのみ有効になります!
私がする必要があること: たとえば、次のようなアドレスを使用して、以前に認証されていなくても、このリクエストに直接アクセスする可能性を追加します。
http://123.123.123.123:123/get.request?request=getListCommand&j_password=myPassword&j_username=myName
また
same thing with the post protocol and the params given (request=getListCommand, j_password=myPassword, j_username=myName)
もちろん、リクエストが実行されて結果が返される前に、認証を行う必要があります。
多くの Web サイトで検索するか、Spring セキュリティ Web サイトで直接検索しました。彼らは、フィルターチェーン、独自のユーザー名認証、RMI について話しています。しかし、上で提示したことを実行する完全な例は実際には見つかりませんでした。
そのように私を助けることができる人に感謝します。
ps:Spring セキュリティのすべてのデフォルトまたは最も単純な構成を使用します (風水スタイルではありません :-))
これが私のsecurit context xmlファイルです
<http realm="NexCap Up"
auto-config="true"
access-denied-page="/www/jsp/authentication/accessDenied.jsp"
create-session="always"
disable-url-rewriting="true">
<port-mappings>
<port-mapping http="8084" https="8443"/>
</port-mappings>
<intercept-url pattern="/www/jsp/authentication/connexion.jsp"
access='IS_AUTHENTICATED_ANONYMOUSLY' requires-channel="https"/>
<intercept-url pattern="/www/jsp/authentication/connexionFailed.jsp"
access='IS_AUTHENTICATED_ANONYMOUSLY' />
<intercept-url pattern="/www/jsp/authentication/applicationExit.jsp"
access='IS_AUTHENTICATED_ANONYMOUSLY' />
<intercept-url
pattern="/get.Request"
method="GET"
access="ROLE_REMOTE" />
<intercept-url
pattern="/post.Request"
method="POST"
access="ROLE_REMOTE" />
<intercept-url pattern="/**"
access="ROLE_REMOTE,ROLE_SCRIPT" />
<form-login
authentication-failure-url="/www/jsp/authentication/connexionFailed.jsp"
login-page="/www/jsp/authentication/connexion.jsp"
default-target-url="/www/jsp/index.jsp"
always-use-default-target="true"/>
<logout
logout-success-url="/www/jsp/authentication/applicationExit.jsp"
invalidate-session="true"/>
<session-management
invalid-session-url="/www/jsp/authentication/invalidSession.jsp"
session-authentication-error-url = "/www/jsp/authentication/authentificationError.jsp"
session-fixation-protection="none">
<!-- Sessions concurrentes -->
<concurrency-control
error-if-maximum-exceeded="false"
expired-url="/www/jsp/authentication/sessionExpired.jsp"
max-sessions="1" />
</session-management>
</http>
そして、春のセキュリティに関する web.xml ファイルの部分
<security-constraint>
<web-resource-collection>
<web-resource-name>Security</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<filter>
<display-name>springSecurityFilterChain</display-name>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>
org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/secu-config.xml
</param-value>