>>> Pretty close is not good enough unfortunately.
>> That's all right. The hash code isn't generally unique anyway.
>
> Well that confirms it. The hashCode is no good for my needs.
>> Several clients could be running on different machines and still show the same
>> IP address to the server. Clients on the same machine can show different IP
[quoted text clipped - 3 lines]
> I am hoping that a combination of client-side IP address and client-
> side port number will be unique for each client.
> > I am hoping that a combination of client-side IP address and client-
> > side port number will be unique for each client.
[quoted text clipped - 3 lines]
> protocol) via the same IP:port combination come from one client or different
> ones.
I am really hoping that this is not the case. Here is how things work
in the C++ version right now: once a client connects it is expected
sometime later to call the disconnect routine, which will cause the
server to lookup the file descriptor asociated with the underlying
connection. Once found the item is removed. That way when a new client
comes in it might get the same file descriptor allocated and it
doesn't matter. Two distinct clients cannot be connected with the same
file descriptor at the same time. I am hoping the same applies in the
java version when I make it use IP address and port number instead of
file descriptor.
> Also, some security software could mask the client port, making every
> client behind it seem to come from the same port or from some obfuscated port
> not correlated to the actual client.
Gulp. Well thank goodness this cannot apply in this particular case.
But this is useful to know, thanks! I wonder where I can find out more
that, just out of curiosity..
> If you control the network(s) involved and all the firewalls you can
> compensate for these phenomena.
Indeed, and luckily, I can.
> The canonical approach is for the server to create a unique token for the
> client upon connection and have the client submit it with each request to
> identify itself. Absence of a token indicates at least a new session, if not
> a new client.
Absolutely. And if I had designed the IDL that is what I would have
done. I strongly suspect it was done the way it was done to make it
much simpler to manage object lifetimes and reference counts. After
all what could be simpler than having just one object in the server
that lasts forever. Even though I prefer handing back a token this is
more coding work. It's a pity it was not done here.
Regards,
Andrew Marlow
Lew - 15 Aug 2007 12:55 GMT
> Two distinct clients cannot be connected with the same
> file descriptor at the same time. I am hoping the same applies in the
> java version when I make it use IP address and port number instead of
> file descriptor.
For scenarios when you can count on getting the real client port, the key
phrase "at the same time" should help you. As long as a client holds a
connection, it'll be on the same port.
I've just never trusted a black-box extrinsic process like a client acquiring
its port to be a source of unique identifiers. There is nothing in that
process that makes such a promise. Even the file descriptor approach could be
broken if ported to an operating system that worked with some unconventional
notion of file I/O. (Not that I know of any such, but why limit the world to
my knowledge or imagination?)
Lew said:
>> Also, some security software could mask the client port, making every
>> client behind it seem to come from the same port or from some obfuscated port
>> not correlated to the actual client.
apm35:
> Gulp. Well thank goodness this cannot apply in this particular case.
> But this is useful to know, thanks! I wonder where I can find out more
> that, just out of curiosity..
I do not know of specific cases. I do know that security software like
WebSeal, or really any proxy, makes connections on behalf of the client node.
So the connection the server sees is from the proxy, not the "real" client.
This is unlikely to be an issue in your case because you don't have a proxy
and you are holding connections, not reconnecting for each request.
>> If you control the network(s) involved and all the firewalls you can
>> compensate for these phenomena.
>
> Indeed, and luckily, I can.
Then your approach will likely work.
Very often a solution works in a particular case that has dangers in the
general. As long as no one tries to expand the IP:port scheme into the wide
area network, you should be all right. The trick is knowing what techniques
scale across the firewalls and proxies.

Signature
Lew
apm35@student.open.ac.uk - 16 Aug 2007 09:33 GMT
> > Two distinct clients cannot be connected with the same
> > file descriptor at the same time. I am hoping the same applies in the
> > java version when I make it use IP address and port number instead of
> > file descriptor.
> >> If you control the network(s) involved and all the firewalls you can
> >> compensate for these phenomena.
> >
> > Indeed, and luckily, I can.
>
> Then your approach will likely work.
Phew.
> Very often a solution works in a particular case that has dangers in the
> general. As long as no one tries to expand the IP:port scheme into the wide
> area network, you should be all right. The trick is knowing what techniques
> scale across the firewalls and proxies.
FWIW, IMO CORBA is broken when it comes to firewalls. I don't think
the OMG will ever come up with a workable, implementable specification
for a CORBA security service that takes firewalls properly into
account. I know they have tried and I know several companies (e.g.
ObjectSecurity, 2AB) have tried to get CORBA and security to work.
These companies have managed to suceed but I think they have done so
in spite of the OMG not because of it. And their solution usually
require a particular CORBA implementation that has the necessary
extensions for their seurity add-on to work, e.g ObjectSecurity
requires MICO. IONA has WonderWall but this requires Orbix. I really
like CORBA and think it is under-appreciated by the industry in
general, but IMO it is too little, too late for software that has to
work in the presence of a firewall and/or over the internet. I think
that in those spaces WSDL has emerged as the winner.
Regards,
Andrew Marlow