Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Configure challenge/response negotiation with other UserManager
[CDO] Configure challenge/response negotiation with other UserManager [message #430486] Sun, 24 May 2009 18:50 Go to next message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
Hi,

I need to handle the case when a user does not want to persist a
(hashed) password, and have thus written a CDO UserManager which never
reads/writes to file.

There is something I am missing on the server-side which makes the
connection fail with a timeout.

Here is the code:

// Instead of: INegotiator negotiator = (INegotiator)
container.getElement(NegotiatorFactory.PRODUCT_GROUP, "challenge",
"/temp/users.db");

UserManager userManager = getUserManager(); // This is my
"in-memory" user manager
ChallengeNegotiator negotiator = new ChallengeNegotiator();
negotiator.setUserManager(userManager);
negotiator.setRandomizer(new Randomizer());
acceptor.getConfig().setNegotiator(negotiator);

I haven't really understood the container.getElement and how the
factories work. My guess is that I am missing some registration step
when doing it "manually".

Thanks in advance,

---
Anders
Re: [CDO] Configure challenge/response negotiation with other UserManager [message #430487 is a reply to message #430486] Sun, 24 May 2009 19:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Anders,

Funny, just the other minute I committed this new feature:

272703: Need to negotiate users on session opening
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272703

Maybe it's interesting for you. More comments below...



Anders Forsell schrieb:
> Hi,
>
> I need to handle the case when a user does not want to persist a
> (hashed) password, and have thus written a CDO UserManager which never
> reads/writes to file.
>
> There is something I am missing on the server-side which makes the
> connection fail with a timeout.
The exception traces could be interesting but I think I have an idea
what happens, see below.
>
> Here is the code:
>
> // Instead of: INegotiator negotiator = (INegotiator)
> container.getElement(NegotiatorFactory.PRODUCT_GROUP, "challenge",
> "/temp/users.db");
>
> UserManager userManager = getUserManager(); // This is my
> "in-memory" user manager
> ChallengeNegotiator negotiator = new ChallengeNegotiator();
> negotiator.setUserManager(userManager);
> negotiator.setRandomizer(new Randomizer());
Please add:
negotiator.activate();

Cheers
/Eike

----
http://thegordian.blogspot.com


> acceptor.getConfig().setNegotiator(negotiator);
>
> I haven't really understood the container.getElement and how the
> factories work. My guess is that I am missing some registration step
> when doing it "manually".
>
> Thanks in advance,
>
> ---
> Anders


Re: [CDO] Configure challenge/response negotiation with other UserManager [message #430488 is a reply to message #430487] Sun, 24 May 2009 19:32 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040800050708010405080602
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Correction!

Eike Stepper schrieb:
> Anders,
>
> Funny, just the other minute I committed this new feature:
>
> 272703: Need to negotiate users on session opening
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=272703
>
> Maybe it's interesting for you. More comments below...
>
This is not only interesting, it will be mandatory for CDO
authentication (as of HEAD).
With the new, more flexible design it's possible to authenticate on a
per session basis.
By default the userID from the underlying transport layer is *not* used
anymore!

>
>
> Anders Forsell schrieb:
>
>> Hi,
>>
>> I need to handle the case when a user does not want to persist a
>> (hashed) password, and have thus written a CDO UserManager which never
>> reads/writes to file.
>>
>> There is something I am missing on the server-side which makes the
>> connection fail with a timeout.
>>
> The exception traces could be interesting but I think I have an idea
> what happens, see below.
>
>> Here is the code:
>>
>> // Instead of: INegotiator negotiator = (INegotiator)
>> container.getElement(NegotiatorFactory.PRODUCT_GROUP, "challenge",
>> "/temp/users.db");
>>
>> UserManager userManager = getUserManager(); // This is my
>> "in-memory" user manager
>>
userManager.activate();
>> ChallengeNegotiator negotiator = new ChallengeNegotiator();
>> negotiator.setUserManager(userManager);
>>
Randomizer randomizer = new Randomizer();
randomizer.activate();
negotiator.setRandomizer(randomizer);

>> negotiator.setRandomizer(new Randomizer());
>>
> Please add:
> negotiator.activate();
>
Sorry, that was wrong. Fix the lifecycle as outlined above.

Cheers
/Eike

----
http://thegordian.blogspot.com



--------------040800050708010405080602
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Correction!<br>
<br>
Eike Stepper schrieb:
<blockquote cite="mid:gvc72b$eq$2@build.eclipse.org" type="cite">
<pre wrap="">Anders,

Funny, just the other minute I committed this new feature:

272703: Need to negotiate users on session opening
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=272703">https://bugs.eclipse.org/bugs/show_bug.cgi?id=272703</a>

Maybe it's interesting for you. More comments below...
</pre>
</blockquote>
This is not only interesting, it will be mandatory for CDO
authentication (as of HEAD).<br>
With the new, more flexible design it's possible to authenticate on a
per session basis.<br>
By default the userID from the underlying transport layer is *not* used
anymore!<br>
<br>
<blockquote cite="mid:gvc72b$eq$2@build.eclipse.org" type="cite">
<pre wrap="">


Anders Forsell schrieb:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,

I need to handle the case when a user does not want to persist a
(hashed) password, and have thus written a CDO UserManager which never
reads/writes to file.

There is something I am missing on the server-side which makes the
connection fail with a timeout.
</pre>
</blockquote>
<pre wrap=""><!---->The exception traces could be interesting but I think I have an idea
what happens, see below.
</pre>
<blockquote type="cite">
<pre wrap="">Here is the code:

// Instead of: INegotiator negotiator = (INegotiator)
container.getElement(NegotiatorFactory.PRODUCT_GROUP, "challenge",
"/temp/users.db");

UserManager userManager = getUserManager(); // This is my
"in-memory" user manager
</pre>
</blockquote>
</blockquote>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; userManager.activate();<br>
<blockquote cite="mid:gvc72b$eq$2@build.eclipse.org" type="cite">
<blockquote type="cite">
<pre wrap=""> ChallengeNegotiator negotiator = new ChallengeNegotiator();
negotiator.setUserManager(userManager);
</pre>
</blockquote>
</blockquote>
Randomizer randomizer = new Randomizer();<br>
randomizer.activate();<br>
negotiator.setRandomizer(randomizer);<br>
<br>
<blockquote cite="mid:gvc72b$eq$2@build.eclipse.org" type="cite">
<blockquote type="cite">
<pre wrap=""> negotiator.setRandomizer(new Randomizer());
</pre>
</blockquote>
<pre wrap=""><!---->Please add:
negotiator.activate();
</pre>
</blockquote>
Sorry, that was wrong. Fix the lifecycle as outlined above.<br>
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<br>
<br>
</body>
</html>

--------------040800050708010405080602--


Re: [CDO] Configure challenge/response negotiation with other UserManager [message #430491 is a reply to message #430488] Mon, 25 May 2009 06:29 Go to previous message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
It worked after activating the objects.

Thanks for the heads-up regarding the security change.

---
Anders

Eike Stepper wrote:
> Correction!
>
> Eike Stepper schrieb:
>> Anders,
>>
>> Funny, just the other minute I committed this new feature:
>>
>> 272703: Need to negotiate users on session opening
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=272703
>>
>> Maybe it's interesting for you. More comments below...
>>
> This is not only interesting, it will be mandatory for CDO
> authentication (as of HEAD).
> With the new, more flexible design it's possible to authenticate on a
> per session basis.
> By default the userID from the underlying transport layer is *not* used
> anymore!
>
>>
>>
>> Anders Forsell schrieb:
>>
>>> Hi,
>>>
>>> I need to handle the case when a user does not want to persist a
>>> (hashed) password, and have thus written a CDO UserManager which never
>>> reads/writes to file.
>>>
>>> There is something I am missing on the server-side which makes the
>>> connection fail with a timeout.
>>>
>> The exception traces could be interesting but I think I have an idea
>> what happens, see below.
>>
>>> Here is the code:
>>>
>>> // Instead of: INegotiator negotiator = (INegotiator)
>>> container.getElement(NegotiatorFactory.PRODUCT_GROUP, "challenge",
>>> "/temp/users.db");
>>>
>>> UserManager userManager = getUserManager(); // This is my
>>> "in-memory" user manager
>>>
> userManager.activate();
>>> ChallengeNegotiator negotiator = new ChallengeNegotiator();
>>> negotiator.setUserManager(userManager);
>>>
> Randomizer randomizer = new Randomizer();
> randomizer.activate();
> negotiator.setRandomizer(randomizer);
>
>>> negotiator.setRandomizer(new Randomizer());
>>>
>> Please add:
>> negotiator.activate();
>>
> Sorry, that was wrong. Fix the lifecycle as outlined above.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
Previous Topic:Feature maps
Next Topic:[CDO] CDOSavePoint and rollback question
Goto Forum:
  


Current Time: Fri Apr 26 17:57:34 GMT 2024

Powered by FUDForum. Page generated in 0.03321 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top