You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/09/22 09:40:24 UTC
[GitHub] [ignite] SomeFire opened a new pull request #8266: IGNITE-13472 fix security context for JDBC bulkload operations
SomeFire opened a new pull request #8266:
URL: https://github.com/apache/ignite/pull/8266
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
### The Contribution Checklist
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] ololo3000 commented on a change in pull request #8266: IGNITE-13472 fix security context for JDBC bulkload operations
Posted by GitBox <gi...@apache.org>.
ololo3000 commented on a change in pull request #8266:
URL: https://github.com/apache/ignite/pull/8266#discussion_r566009404
##########
File path: modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcAuthorizationTest.java
##########
@@ -164,7 +169,11 @@ public void testCopyFrom() throws Exception {
assertAuthorizationFailed(sql, CACHE_READ_USER);
assertAuthorizationFailed(sql, CACHE_REMOVE_USER);
+ int cnt = ignite(0).cache(DEFAULT_CACHE_NAME).size();
Review comment:
It seems that we should check TEST_BULKLOAD_CACHE cache size here and check its size using equality.
##########
File path: modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcAuthorizationTest.java
##########
@@ -143,7 +144,11 @@ public void testInsert() throws Exception {
assertAuthorizationFailed(sql, CACHE_READ_USER);
assertAuthorizationFailed(sql, CACHE_REMOVE_USER);
+ int cnt = ignite(0).cache(DEFAULT_CACHE_NAME).size();
+
execute(sql, CACHE_PUT_USER);
+
+ assertTrue(ignite(0).cache(DEFAULT_CACHE_NAME).size() > cnt);
Review comment:
Can we verify that the cache size has only increased by one?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] NSAmelchev commented on a change in pull request #8266: IGNITE-13472 fix security context for JDBC bulkload operations
Posted by GitBox <gi...@apache.org>.
NSAmelchev commented on a change in pull request #8266:
URL: https://github.com/apache/ignite/pull/8266#discussion_r566136664
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
##########
@@ -960,9 +962,11 @@ public void runLocalWithThreadPolicy(IgniteThread thread, Runnable c) {
final GridWorkerFuture<R> fut = new GridWorkerFuture<>();
+ final SecurityContext secCtx = ctx.security().securityContext();
Review comment:
An operation can be performed without a security context if the worker was rejected.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] NSAmelchev merged pull request #8266: IGNITE-13472 fix security context for JDBC bulkload operations
Posted by GitBox <gi...@apache.org>.
NSAmelchev merged pull request #8266:
URL: https://github.com/apache/ignite/pull/8266
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] NSAmelchev commented on a change in pull request #8266: IGNITE-13472 fix security context for JDBC bulkload operations
Posted by GitBox <gi...@apache.org>.
NSAmelchev commented on a change in pull request #8266:
URL: https://github.com/apache/ignite/pull/8266#discussion_r566807977
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
##########
@@ -960,9 +962,11 @@ public void runLocalWithThreadPolicy(IgniteThread thread, Runnable c) {
final GridWorkerFuture<R> fut = new GridWorkerFuture<>();
+ final SecurityContext secCtx = ctx.security().securityContext();
Review comment:
Got it, thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] SomeFire commented on a change in pull request #8266: IGNITE-13472 fix security context for JDBC bulkload operations
Posted by GitBox <gi...@apache.org>.
SomeFire commented on a change in pull request #8266:
URL: https://github.com/apache/ignite/pull/8266#discussion_r566760854
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
##########
@@ -960,9 +962,11 @@ public void runLocalWithThreadPolicy(IgniteThread thread, Runnable c) {
final GridWorkerFuture<R> fut = new GridWorkerFuture<>();
+ final SecurityContext secCtx = ctx.security().securityContext();
Review comment:
No, it will be executed in current context, which we give to worker. So, in case of reject we already have proper context.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] SomeFire commented on a change in pull request #8266: IGNITE-13472 fix security context for JDBC bulkload operations
Posted by GitBox <gi...@apache.org>.
SomeFire commented on a change in pull request #8266:
URL: https://github.com/apache/ignite/pull/8266#discussion_r566076805
##########
File path: modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcAuthorizationTest.java
##########
@@ -164,7 +169,11 @@ public void testCopyFrom() throws Exception {
assertAuthorizationFailed(sql, CACHE_READ_USER);
assertAuthorizationFailed(sql, CACHE_REMOVE_USER);
+ int cnt = ignite(0).cache(DEFAULT_CACHE_NAME).size();
Review comment:
Fixed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] SomeFire commented on a change in pull request #8266: IGNITE-13472 fix security context for JDBC bulkload operations
Posted by GitBox <gi...@apache.org>.
SomeFire commented on a change in pull request #8266:
URL: https://github.com/apache/ignite/pull/8266#discussion_r566076667
##########
File path: modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcAuthorizationTest.java
##########
@@ -143,7 +144,11 @@ public void testInsert() throws Exception {
assertAuthorizationFailed(sql, CACHE_READ_USER);
assertAuthorizationFailed(sql, CACHE_REMOVE_USER);
+ int cnt = ignite(0).cache(DEFAULT_CACHE_NAME).size();
+
execute(sql, CACHE_PUT_USER);
+
+ assertTrue(ignite(0).cache(DEFAULT_CACHE_NAME).size() > cnt);
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org