Re: Odg: Certificate Based Authorization

2020-06-22 Thread Jacob Barrett
I went on a little journey to see if it was possible and it looks promising. I 
was able to get access to the SSLSocket and thus the SSLContext.

Proof of concept patch attached.



> On Jun 19, 2020, at 2:53 PM, Jacob Barrett  wrote:
>
> So I can see why this research paper was so bleak about the options in trying 
> to get the SSL certificate for the current connection being serviced. As they 
> discovered the accept loop in OpenJDK’s (and older Oracle implementations) 
> immediately fires the RMI operation to a thread pool after connected. This is 
> after SSLSocket would have would’ve done the handshake and been passed to any 
> of our validation callbacks so stashing anything in a thread local storage is 
> dead.
>
> Good news is deep in the sun.rmi.transport.tcp.TCPTransport there is a 
> ThreadLocal that has the socket used to establish the 
> connection and this thread local is set before each invocation of an RMI 
> operation. The bad news is that it's private on an internal class. I think 
> this is where the age of the research is in our favor. Back when I think it 
> was writing we didn’t have OpenJDK. We had Oracle, IBM, and a few others. Now 
> with everything pretty much converging on OpenJDK I don’t believe it as as 
> nasty to go poke at this internal using reflection. I think it is less dirty 
> then their nasty trick of utilizing the IPv6 address as a unique identifier 
> in a custom Socket.
>
> Once we have the SSLSocket for this connection then we are golden. From there 
> you have public API access to the SSLSession.
>
> Looking at the OpenJDK source this class has largely been unchanged since its 
> initial import into the repo in 2007. Most importantly the private member in 
> question has been and its sill available in all versions of OpenJDK. Sure 
> this limits us to OpenJDK support for certificate based authentication by SSL 
> handshake via RMI but in Geode that’s really only gfsh. This is a really 
> small surface area. With the focus being on converting gfsh activities into 
> REST APIs this surface area is shrinking. Personally I would be inclined to 
> leave RMI out of the solution initially. Second I would use this private 
> variable to compete the support in OpenJDK.
>
> -Jake
>
>
>> On Jun 19, 2020, at 11:14 AM, Jacob Barrett  wrote:
>>
>>
>>
>>>
>>> On Jun 18, 2020, at 4:24 AM, Jakov Varenina 
>>> mailto:jakov.varen...@est.tech>> wrote:
>>>
>>> In order to completely remove the need for username/password, it is 
>>> required that we implement this new kind of authorization on *all* geode 
>>> interfaces/components (cluster, gateway, web, jmx, locator, server). The 
>>> reason why we didn't have any progress is because we faced major obstacle 
>>> during development when we tried to retrieve clients certificate from RMI 
>>> connections (e.g. jmx connections). It seems there are no easy/nice way to 
>>> retrieve it, and what we came up so far is following:
>>>
>>> 1) We have found some possible "hack solution" that could be implemented 
>>> and it is described in the following paper 
>>> (https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.224.2915%26rep%3Drep1%26type%3Dpdf&data=02%7C01%7Cjabarrett%40vmware.com%7Cb850f9bde4674352e4a908d8149b3ad0%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637282004231487337&sdata=SbJiZKJxsJ3lTmKFVFIPRNzVO2tmc4w817Asbra5lR4%3D&reserved=0).
>>>  We have started to work on the prototype that will implement this solution.
>>
>> Wow, that is a hack. Have you found any implementation of this solution. 
>> There doesn’t appear to be a repository listed. There also doesn’t appear to 
>> be a publish date on this document. The most recent references are from 
>> 2010. I wonder if things are better now. I am going to poke at the Java 
>> source code a bit and report back.
>>
>> Would your needs be dependent on Java 8? If we found a solution that only 
>> worked say with java 12, would that work?
>>
>> -Jake
>>
>



Re: Reviewers for GEODE-8231: C++ native client keeps trying to connect to down cache server hosting a partitioned region

2020-06-22 Thread Mike Martell
On it now.

Mike

From: Alberto Gomez 
Sent: Monday, June 22, 2020 9:04 AM
To: dev@geode.apache.org 
Subject: Re: Reviewers for GEODE-8231: C++ native client keeps trying to 
connect to down cache server hosting a partitioned region

Hi,

I have no complete reviews yet. Any volunteers?

Thanks,

Alberto

From: Alberto Gomez 
Sent: Monday, June 15, 2020 1:31 PM
To: dev@geode.apache.org 
Subject: Reviewers for GEODE-8231: C++ native client keeps trying to connect to 
down cache server hosting a partitioned region

Hi,

Can someone please review my PR about 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FGEODE-8231&data=02%7C01%7Cmartellm%40vmware.com%7C181a471ae8ee41f8759f08d816c5ef4c%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637284386667373704&sdata=M%2B7fqoR8zLqCdnOBLex31KkZy84fBn%2FStL%2BgFHpuhl0%3D&reserved=0
 (C++ native client keeps trying to connect to down cache server hosting a 
partitioned region)?

Here is the link to the PR: 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fgeode-native%2Fpull%2F615&data=02%7C01%7Cmartellm%40vmware.com%7C181a471ae8ee41f8759f08d816c5ef4c%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637284386667373704&sdata=8w609LPiPhRPJkIUgn79U6zdrypWMyEEt%2BG9%2FzzYmvk%3D&reserved=0

Thanks,

/Alberto G.


Re: JIRA access

2020-06-22 Thread Alexander Murmann
Hi Louis,

You should have access now

Please let me know if you need any further help

On Mon, Jun 22, 2020 at 10:33 AM Louis Jacome  wrote:

> Hello,
>
> I am emailing to request access to the Geode project, I have a personal
> account registered under louisjac...@gmail.com that I would like granted
> access. Please let me know if there's anything else you need.
>
> Thanks!
>Louis
>


JIRA access

2020-06-22 Thread Louis Jacome
Hello,

I am emailing to request access to the Geode project, I have a personal account 
registered under louisjac...@gmail.com that I would like granted access. Please 
let me know if there's anything else you need.

Thanks!
   Louis


Re: Reviewers for GEODE-8231: C++ native client keeps trying to connect to down cache server hosting a partitioned region

2020-06-22 Thread Alberto Gomez
Hi,

I have no complete reviews yet. Any volunteers?

Thanks,

Alberto

From: Alberto Gomez 
Sent: Monday, June 15, 2020 1:31 PM
To: dev@geode.apache.org 
Subject: Reviewers for GEODE-8231: C++ native client keeps trying to connect to 
down cache server hosting a partitioned region

Hi,

Can someone please review my PR about 
https://issues.apache.org/jira/browse/GEODE-8231 (C++ native client keeps 
trying to connect to down cache server hosting a partitioned region)?

Here is the link to the PR: https://github.com/apache/geode-native/pull/615

Thanks,

/Alberto G.


Re: Client Usage of RMI

2020-06-22 Thread Joris Melchior
Pulse communicates to the locator over jmx/rmi as well.

From: Kirk Lund 
Sent: June 19, 2020 14:24
To: dev@geode.apache.org 
Subject: Re: Client Usage of RMI

The only use of RMI in Geode that I'm aware of is:

1) GFSH to Locator communication over jmx/rmi
2) Communication from the main JUnit JVM to DUnit JVM for dunit tests

In theory, a User could connect to the Locator over jmx/rmi from any JVM
using JDK JMX code. This could include deploying a Function (that uses JMX)
to a Server or executing JMX code directly within a Geode Java Client.

On Fri, Jun 19, 2020 at 11:17 AM Jacob Barrett  wrote:

> All,
>
> Related to the conversation about certificate based authentication, how
> much of the client side would invoke any RMI requests? I am trying to gauge
> the impact of not having RMI as an option for client applications wishing
> to use certificate based authentication.
>
> -Jake
>
>