Re: Question on Geode security - Custom SecurityManager

2017-02-26 Thread Nilkanth Patel
Thanks Jinmei for the clarification.

Nilkanth.

On Mon, Feb 27, 2017 at 11:42 AM, Jinmei Liao  wrote:

> I'll update the wiki page to not include that line so that it won't be
> confusing to the users.
>
> On Sun, Feb 26, 2017 at 10:11 PM, Jinmei Liao  wrote:
>
> > Hi, NilKanth, the ExampleSecurityManager is meant as an example. When
> > using that ExampleSecurityManager with the json file described in
> > https://cwiki.apache.org/confluence/display/GEODE/
> > Using+Custom+SecurityManager, the role "data" only has permission to the
> > following two regions: "region1" and "region2". So it still can not do
> > "list region" and "create region". You can delete that line of
> ""regions":
> > ["region1", "region2"]" so that the data role can operate on all regions,
> > then your commands will succeed.
> >
> > On Sun, Feb 26, 2017 at 9:36 PM, Nilkanth Patel 
> wrote:
> >
> >> Hello,
> >>
> >> With the setup explained in
> >> https://cwiki.apache.org/confluence/display/GEODE/Using+
> >> Custom+SecurityManager,
> >> observed following,
> >>
> >> Started locator, server as explained in doc.
> >>
> >> gfsh>connect --locators=localhost[10334] --user=super-user
> >> --password=1234567
> >> Connecting to Locator at [host=localhost, port=10334] ..
> >> Connecting to Manager at [host=192.168.3.125, port=1099] ..
> >> Successfully connected to: [host=192.168.3.125, port=1099]
> >>
> >> gfsh>list members
> >> Name | Id
> >>  | 
> >> l1   | 192.168.3.125(l1:23399:locator):1024
> >> s1   | 192.168.3.125(s1:23597):1025
> >>
> >> gfsh>list regions
> >> Unauthorized. Reason : super-user not authorized for DATA:READ
> >>
> >> gfsh>create region --name=region1 --type=PARTITION
> >> Unauthorized. Reason : super-user not authorized for DATA:MANAGE
> >>
> >> gfsh>
> >>
> >> Why "list regions" and "create region" are Unauthorized, even though, as
> >> we
> >> see in security.json, user "super-user" has a role "data", which is
> mapped
> >> to permissions ("DATA:MANAGE", "DATA:WRITE", "DATA:READ").
> >>
> >> Am i missing something here...?
> >> Nilkanth.
> >>
> >
> >
> >
> > --
> > Cheers
> >
> > Jinmei
> >
>
>
>
> --
> Cheers
>
> Jinmei
>


Re: Question on Geode security - Custom SecurityManager

2017-02-26 Thread Jinmei Liao
I'll update the wiki page to not include that line so that it won't be
confusing to the users.

On Sun, Feb 26, 2017 at 10:11 PM, Jinmei Liao  wrote:

> Hi, NilKanth, the ExampleSecurityManager is meant as an example. When
> using that ExampleSecurityManager with the json file described in
> https://cwiki.apache.org/confluence/display/GEODE/
> Using+Custom+SecurityManager, the role "data" only has permission to the
> following two regions: "region1" and "region2". So it still can not do
> "list region" and "create region". You can delete that line of ""regions":
> ["region1", "region2"]" so that the data role can operate on all regions,
> then your commands will succeed.
>
> On Sun, Feb 26, 2017 at 9:36 PM, Nilkanth Patel  wrote:
>
>> Hello,
>>
>> With the setup explained in
>> https://cwiki.apache.org/confluence/display/GEODE/Using+
>> Custom+SecurityManager,
>> observed following,
>>
>> Started locator, server as explained in doc.
>>
>> gfsh>connect --locators=localhost[10334] --user=super-user
>> --password=1234567
>> Connecting to Locator at [host=localhost, port=10334] ..
>> Connecting to Manager at [host=192.168.3.125, port=1099] ..
>> Successfully connected to: [host=192.168.3.125, port=1099]
>>
>> gfsh>list members
>> Name | Id
>>  | 
>> l1   | 192.168.3.125(l1:23399:locator):1024
>> s1   | 192.168.3.125(s1:23597):1025
>>
>> gfsh>list regions
>> Unauthorized. Reason : super-user not authorized for DATA:READ
>>
>> gfsh>create region --name=region1 --type=PARTITION
>> Unauthorized. Reason : super-user not authorized for DATA:MANAGE
>>
>> gfsh>
>>
>> Why "list regions" and "create region" are Unauthorized, even though, as
>> we
>> see in security.json, user "super-user" has a role "data", which is mapped
>> to permissions ("DATA:MANAGE", "DATA:WRITE", "DATA:READ").
>>
>> Am i missing something here...?
>> Nilkanth.
>>
>
>
>
> --
> Cheers
>
> Jinmei
>



-- 
Cheers

Jinmei


Re: Question on Geode security - Custom SecurityManager

2017-02-26 Thread Jinmei Liao
Hi, NilKanth, the ExampleSecurityManager is meant as an example. When using
that ExampleSecurityManager with the json file described in
https://cwiki.apache.org/confluence/display/GEODE/Using+Custom+SecurityManager,
the role "data" only has permission to the following two regions: "region1"
and "region2". So it still can not do "list region" and "create region".
You can delete that line of ""regions": ["region1", "region2"]" so that the
data role can operate on all regions, then your commands will succeed.

On Sun, Feb 26, 2017 at 9:36 PM, Nilkanth Patel  wrote:

> Hello,
>
> With the setup explained in
> https://cwiki.apache.org/confluence/display/GEODE/
> Using+Custom+SecurityManager,
> observed following,
>
> Started locator, server as explained in doc.
>
> gfsh>connect --locators=localhost[10334] --user=super-user
> --password=1234567
> Connecting to Locator at [host=localhost, port=10334] ..
> Connecting to Manager at [host=192.168.3.125, port=1099] ..
> Successfully connected to: [host=192.168.3.125, port=1099]
>
> gfsh>list members
> Name | Id
>  | 
> l1   | 192.168.3.125(l1:23399:locator):1024
> s1   | 192.168.3.125(s1:23597):1025
>
> gfsh>list regions
> Unauthorized. Reason : super-user not authorized for DATA:READ
>
> gfsh>create region --name=region1 --type=PARTITION
> Unauthorized. Reason : super-user not authorized for DATA:MANAGE
>
> gfsh>
>
> Why "list regions" and "create region" are Unauthorized, even though, as we
> see in security.json, user "super-user" has a role "data", which is mapped
> to permissions ("DATA:MANAGE", "DATA:WRITE", "DATA:READ").
>
> Am i missing something here...?
> Nilkanth.
>



-- 
Cheers

Jinmei


Question on Geode security - Custom SecurityManager

2017-02-26 Thread Nilkanth Patel
Hello,

With the setup explained in
https://cwiki.apache.org/confluence/display/GEODE/Using+Custom+SecurityManager,
observed following,

Started locator, server as explained in doc.

gfsh>connect --locators=localhost[10334] --user=super-user
--password=1234567
Connecting to Locator at [host=localhost, port=10334] ..
Connecting to Manager at [host=192.168.3.125, port=1099] ..
Successfully connected to: [host=192.168.3.125, port=1099]

gfsh>list members
Name | Id
 | 
l1   | 192.168.3.125(l1:23399:locator):1024
s1   | 192.168.3.125(s1:23597):1025

gfsh>list regions
Unauthorized. Reason : super-user not authorized for DATA:READ

gfsh>create region --name=region1 --type=PARTITION
Unauthorized. Reason : super-user not authorized for DATA:MANAGE

gfsh>

Why "list regions" and "create region" are Unauthorized, even though, as we
see in security.json, user "super-user" has a role "data", which is mapped
to permissions ("DATA:MANAGE", "DATA:WRITE", "DATA:READ").

Am i missing something here...?
Nilkanth.


[GitHub] geode-native pull request #39: Add rat checks to travis-ci build

2017-02-26 Thread metatype
GitHub user metatype opened a pull request:

https://github.com/apache/geode-native/pull/39

Add rat checks to travis-ci build



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/metatype/geode-native develop

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/geode-native/pull/39.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #39


commit 4ff971de19aa9a33743eb729f17fefad93c5bc01
Author: Anthony Baker 
Date:   2017-02-27T05:01:59Z

Add rat checks to travis-ci build




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[Spring CI] Spring Data GemFire > Nightly-ApacheGeode > #485 has FAILED (1 tests failed). Change made by John Blum.

2017-02-26 Thread Spring CI

---
Spring Data GemFire > Nightly-ApacheGeode > #485 failed.
---
Scheduled with changes by John Blum.
1/1681 tests failed.

https://build.spring.io/browse/SGF-NAG-485/

-
Currently Responsible
-

No one is responsible for fixing this build.



--
Failing Jobs
--
  - Default Job (Default Stage): 1 of 1681 tests failed.



--
Code Changes
--
John Blum (84e671946b3b14e9b762862ba4a73dead175810d):

>SGF-597 - Set Apache Geode dependency to version 1.1.0 (GA release).

John Blum (7a893e1f1b6e3f967f09e2c8cb713a9156688f46):

>SGF-597 - Reset Artifact Repository for apache-geode build snapshots to 
>repo.spring.io/libs-snapshot.



--
Tests
--
New Test Failures (1)
   - ApacheGeodeSecurityManagerGeodeSecurityIntegrationTests: Authorized user

--
This message is automatically generated by Atlassian Bamboo

[jira] [Commented] (GEODE-2551) Possible bugs in the source code

2017-02-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15884914#comment-15884914
 ] 

ASF GitHub Bot commented on GEODE-2551:
---

GitHub user metatype opened a pull request:

https://github.com/apache/geode/pull/408

GEODE-2551 Fix code issues found by AppChecker



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/metatype/incubator-geode feature/GEODE-2551

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/geode/pull/408.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #408


commit 92c9ad1e2df8d11b970e08be7b868294300434a4
Author: Anthony Baker 
Date:   2017-02-26T21:20:34Z

GEODE-2551 Fix code issues found by AppChecker




> Possible bugs in the source code
> 
>
> Key: GEODE-2551
> URL: https://issues.apache.org/jira/browse/GEODE-2551
> Project: Geode
>  Issue Type: Bug
>Reporter: AppChecker
>
> Hello!
> We've checked your project with [static code analyzer 
> AppChecker|https://cnpo.ru/en/solutions/appchecker.php]
> It found several possible defects in the source code:
> 1) 
> https://github.com/apache/geode/blob/8bf39571471642beaaa36c9626a61a90bd3803c2/geode-core/src/main/java/org/apache/geode/management/internal/cli/parser/ParserUtils.java#L96
> {code:java}
> if ((split[i].endsWith("\"") && split[i].endsWith("\""))
> || (split[i].startsWith("\'") && split[i].endsWith("\'"))) {
> {code}
> {noformat}split[i].endsWith("\"") {noformat} is checked twice.
> Probably it should be:
> {code:java}
> if ((split[i].startsWith("\"") && split[i].endsWith("\""))
> || (split[i].startsWith("\'") && split[i].endsWith("\'"))) {
> {code}
> 2) 
> https://github.com/apache/geode/blob/6e5013102927099a725282b6bad5d64a79152fab/geode-core/src/test/java/org/apache/geode/cache/query/dunit/SelectStarQueryDUnitTest.java#L1384
> https://github.com/apache/geode/blob/6e5013102927099a725282b6bad5d64a79152fab/geode-core/src/test/java/org/apache/geode/cache/query/dunit/SelectStarQueryDUnitTest.java#L1444
> {code:java}
> else if (rs instanceof PortfolioPdx || rs instanceof PortfolioPdx) {
> {code}
> rs is checked twice
> 3) 
> https://github.com/apache/geode/blob/8bf39571471642beaaa36c9626a61a90bd3803c2/geode-core/src/main/java/org/apache/geode/management/internal/cli/util/JsonUtil.java#L388
> {code:java}
> } else if (klass.isAssignableFrom(Float.class) || 
> klass.isAssignableFrom(Float.class)) {
> {code}
> klass.isAssignableFrom(Float.class)  is checked twcie



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] geode pull request #408: GEODE-2551 Fix code issues found by AppChecker

2017-02-26 Thread metatype
GitHub user metatype opened a pull request:

https://github.com/apache/geode/pull/408

GEODE-2551 Fix code issues found by AppChecker



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/metatype/incubator-geode feature/GEODE-2551

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/geode/pull/408.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #408


commit 92c9ad1e2df8d11b970e08be7b868294300434a4
Author: Anthony Baker 
Date:   2017-02-26T21:20:34Z

GEODE-2551 Fix code issues found by AppChecker




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (GEODE-2551) Possible bugs in the source code

2017-02-26 Thread AppChecker (JIRA)
AppChecker created GEODE-2551:
-

 Summary: Possible bugs in the source code
 Key: GEODE-2551
 URL: https://issues.apache.org/jira/browse/GEODE-2551
 Project: Geode
  Issue Type: Bug
Reporter: AppChecker


Hello!

We've checked your project with [static code analyzer 
AppChecker|https://cnpo.ru/en/solutions/appchecker.php]
It found several possible defects in the source code:
1) 
https://github.com/apache/geode/blob/8bf39571471642beaaa36c9626a61a90bd3803c2/geode-core/src/main/java/org/apache/geode/management/internal/cli/parser/ParserUtils.java#L96
{code:java}
if ((split[i].endsWith("\"") && split[i].endsWith("\""))
|| (split[i].startsWith("\'") && split[i].endsWith("\'"))) {
{code}
{noformat}split[i].endsWith("\"") {noformat} is checked twice.
Probably it should be:
{code:java}
if ((split[i].startsWith("\"") && split[i].endsWith("\""))
|| (split[i].startsWith("\'") && split[i].endsWith("\'"))) {
{code}

2) 
https://github.com/apache/geode/blob/6e5013102927099a725282b6bad5d64a79152fab/geode-core/src/test/java/org/apache/geode/cache/query/dunit/SelectStarQueryDUnitTest.java#L1384
https://github.com/apache/geode/blob/6e5013102927099a725282b6bad5d64a79152fab/geode-core/src/test/java/org/apache/geode/cache/query/dunit/SelectStarQueryDUnitTest.java#L1444
{code:java}
else if (rs instanceof PortfolioPdx || rs instanceof PortfolioPdx) {
{code}
rs is checked twice

3) 
https://github.com/apache/geode/blob/8bf39571471642beaaa36c9626a61a90bd3803c2/geode-core/src/main/java/org/apache/geode/management/internal/cli/util/JsonUtil.java#L388
{code:java}
} else if (klass.isAssignableFrom(Float.class) || 
klass.isAssignableFrom(Float.class)) {

{code}
klass.isAssignableFrom(Float.class)  is checked twcie





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] geode issue #245: native-client-software-grant - ClientMetadata::getServerLo...

2017-02-26 Thread echobravopapa
Github user echobravopapa commented on the issue:

https://github.com/apache/geode/pull/245
  
@doribd yes, @fdaniel7 should close the PR on 
apache/geode/native-client-software-grant
and then switch to https://github.com/apache/geode-native and re-open the 
PR there as appropriate.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Build failed in Jenkins: Geode-nightly #760

2017-02-26 Thread Apache Jenkins Server
See 


Changes:

[klund] GEODE-2275: add FlakyTest category to flickering test

[klund] GEODE-2461: remove unnecessary explicit dependencies

--
[...truncated 117.43 KB...]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at 
org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:621)
at 
org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1067)
at java.lang.Thread.run(Thread.java:745)

310 tests completed, 4 failed, 8 skipped
:geode-core:flakyTest FAILED
:geode-core:integrationTest
:geode-cq:assemble
:geode-cq:compileTestJavaNote: Some input files use or override a deprecated 
API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:geode-cq:processTestResources
:geode-cq:testClasses
:geode-cq:checkMissedTests
:geode-cq:spotlessJavaCheck
:geode-cq:spotlessCheck
:geode-cq:test
:geode-cq:check
:geode-cq:build
:geode-cq:distributedTest
:geode-cq:flakyTest
:geode-cq:integrationTest
:geode-json:assemble
:geode-json:compileTestJava UP-TO-DATE
:geode-json:processTestResources UP-TO-DATE
:geode-json:testClasses UP-TO-DATE
:geode-json:checkMissedTests UP-TO-DATE
:geode-json:spotlessJavaCheck
:geode-json:spotlessCheck
:geode-json:test UP-TO-DATE
:geode-json:check
:geode-json:build
:geode-json:distributedTest UP-TO-DATE
:geode-json:flakyTest UP-TO-DATE
:geode-json:integrationTest UP-TO-DATE
:geode-junit:javadoc
:geode-junit:javadocJar
:geode-junit:sourcesJar
:geode-junit:signArchives SKIPPED
:geode-junit:assemble
:geode-junit:compileTestJava
:geode-junit:processTestResources UP-TO-DATE
:geode-junit:testClasses
:geode-junit:checkMissedTests
:geode-junit:spotlessJavaCheck
:geode-junit:spotlessCheck
:geode-junit:test
:geode-junit:check
:geode-junit:build
:geode-junit:distributedTest
:geode-junit:flakyTest
:geode-junit:integrationTest
:geode-lucene:assemble
:geode-lucene:compileTestJavaNote: Some input files use or override a 
deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:geode-lucene:processTestResources
:geode-lucene:testClasses
:geode-lucene:checkMissedTests
:geode-lucene:spotlessJavaCheck
:geode-lucene:spotlessCheck
:geode-lucene:test
:geode-lucene:check
:geode-lucene:build
:geode-lucene:distributedTest
:geode-lucene:flakyTest
:geode-lucene:integrationTest
:geode-old-client-support:assemble
:geode-old-client-support:compileTestJava
:geode-old-client-support:processTestResources UP-TO-DATE
:geode-old-client-support:testClasses
:geode-old-client-support:checkMissedTests
:geode-old-client-support:spotlessJavaCheck
:geode-old-client-support:spotlessCheck
:geode-old-client-support:test
:geode-old-client-support:check
:geode-old-client-support:build
:geode-old-client-support:distributedTest
:geode-old-client-support:flakyTest
:geode-old-client-support:integrationTest
:geode-old-versions:javadoc UP-TO-DATE
:geode-old-versions:javadocJar
:geode-old-versions:sourcesJar
:geode-old-versions:signArchives SKIPPED
:geode-old-versions:assemble
:geode-old-versions:compileTestJava UP-TO-DATE
:geode-old-versions:processTestResources UP-TO-DATE
:geode-old-versions:testClasses UP-TO-DATE
:geode-old-versions:checkMissedTests UP-TO-DATE
:geode-old-versions:spotlessJavaCheck
:geode-old-versions:spotlessCheck
:geode-old-versions:test UP-TO-DATE
:geode-old-versions:check
:geode-old-versions:build
:geode-old-versions:distributedTest UP-TO-DATE
:geode-old-versions:flakyTest UP-TO-DATE
:geode-old-versions:integrationTest UP-TO-DATE
:geode-pulse:assemble
:geode-pulse:compileTestJava
Download 
https://repo1.maven.org/maven2/org/springframework/spring-test/4.3.6.RELEASE/spring-test-4.3.6.RELEASE.pom
Download https://repo1.maven.org/maven2/com/tdunning/json/1.8/json-1.8.pom
Download 
https://repo1.maven.org/maven2/org/springframework/spring-test/4.3.6.RELEASE/spring-test-4.3.6.RELEASE.jar
Download https://repo1.maven.org/maven2/com/tdunning/json/1.8/json-1.8.jar
Note: 

 uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: 

 uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:geode-pulse:processTestResources
:geode-pulse:testClasses
:geode-pulse:checkMissedTests
:geode-pulse:spotlessJavaCheck
:geode-pulse:spotlessCheck
:geode-pulse:test
:geode-pulse:check
:geode-pulse:build