SOLR-8167: Authorization framework does not work with POST params

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1709056 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2015-10-16 16:57:05 +00:00
parent 70ae2272df
commit 91a6c31d77
4 changed files with 12 additions and 2 deletions

View File

@ -274,6 +274,9 @@ Bug Fixes
* SOLR-8050: Partial update on document with multivalued date field fails to parse date and can
also fail to remove dates in some cases. (Burkhard Buelte, Luc Vanlerberghe, shalin)
* SOLR-8167: Authorization framework does not work with POST params (noble)
Optimizations
----------------------

View File

@ -460,7 +460,7 @@ public class RuleBasedAuthorizationPlugin implements AuthorizationPlugin, Config
" update :{" +
" path:'/update/*'}," +
" read :{" +
" path:['/update/*', '/get']}," +
" path:['/select', '/get']}," +
" config-edit:{" +
" method:POST," +
" path:'/config/*'}}");

View File

@ -957,7 +957,7 @@ public class HttpSolrCall {
return new AuthorizationContext() {
@Override
public SolrParams getParams() {
return getQueryParams();
return solrReq.getParams();
}
@Override

View File

@ -164,6 +164,13 @@ public class BasicAuthIntegrationTest extends TestMiniSolrCloudClusterBase {
fail("must have failed");
} catch (HttpSolrClient.RemoteSolrException e) {
}
reload.setMethod(SolrRequest.METHOD.POST);
try {
rsp = solrClient.request(reload);
fail("must have failed");
} catch (HttpSolrClient.RemoteSolrException e) {
}
cloudSolrClient.request(new CollectionAdminRequest.Reload()
.setCollectionName(defaultCollName)