AD and user provisioning

View: New views
5 Messages — Rating Filter:   Alert me  

AD and user provisioning

by A-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,
 
I got user provisioning to work with AD in 4.0.
 
Note that I had to change the class named
org.apache.roller.weblogger.ui.core.security.BasicUserAutoProvision because the
org.apache.roller.weblogger.ui.core.security.CustomUserRegistry class was setting the new user's id to null.
The db schema doesn't allow that, so I just recompiled the BasicUserAutoProvision class with a small fix and placed it
back in the jar, andit worked great.
 
I know, talk about a hack beyond description.
 
I attached the source and the class file as well.
 
A


Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest for free today!

BasicUserAutoProvision.class (2K) Download Attachment

Re: AD and user provisioning

by Alex Coles :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Adriano,

Looks like you forgot to attach the source!

Cheers,

Alex

On Jun 25, 2008, at 11:52 PM, A wrote:

> Hi,
>
> I got user provisioning to work with AD in 4.0.
>
> Note that I had to change the class named
> org.apache.roller.weblogger.ui.core.security.BasicUserAutoProvision  
> because the
> org.apache.roller.weblogger.ui.core.security.CustomUserRegistry  
> class was setting the new user's id to null.
> The db schema doesn't allow that, so I just recompiled the  
> BasicUserAutoProvision class with a small fix and placed it
> back in the jar, andit worked great.
>
> I know, talk about a hack beyond description.
>
> I attached the source and the class file as well.
>
> A
>
> Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest  
> for free today! <BasicUserAutoProvision.class>


RE: AD and user provisioning

by A-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,
 
I though I attached a zip file with it.
Anyway, here it is:
 
public class BasicUserAutoProvision implements AutoProvision {    private static Log log = LogFactory.getFactory().getInstance(BasicUserAutoProvision.class);
 
  public boolean execute() {    User ud = CustomUserRegistry.getUserDetailsFromAuthentication();    if(ud != null) {      UserManager mgr;      ud.setId(org.apache.roller.util.UUIDGenerator.generateUUID());      try {        mgr = WebloggerFactory.getWeblogger().getUserManager();        mgr.addUser(ud);        WebloggerFactory.getWeblogger().flush();      } catch (WebloggerException e) {        log.warn("Error while auto-provisioning user from SSO.", e);      }    }
    return true;  }
}
 
 
> CC: adrianoferraro@...> From: alex.coles@...> To: user@...> Subject: Re: AD and user provisioning> Date: Thu, 26 Jun 2008 12:27:49 +0200> > Hi Adriano,> > Looks like you forgot to attach the source!> > Cheers,> > Alex> > On Jun 25, 2008, at 11:52 PM, A wrote:> > > Hi,> >> > I got user provisioning to work with AD in 4.0.> >> > Note that I had to change the class named> > org.apache.roller.weblogger.ui.core.security.BasicUserAutoProvision > > because the> > org.apache.roller.weblogger.ui.core.security.CustomUserRegistry > > class was setting the new user's id to null.> > The db schema doesn't allow that, so I just recompiled the > > BasicUserAutoProvision class with a small fix and placed it> > back in the jar, andit worked great.> >> > I know, talk about a hack beyond description.> >> > I attached the source and the class file as well.> >> > A> >> > Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest > > for free today! <BasicUserAutoProvision.class>>
_________________________________________________________________
R U Ready for Windows Live Messenger Beta 8.5? Try it today!
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger

Re: AD and user provisioning

by Matt Raible-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Apache mailing lists don't accept attachments so the best way to
submit code is to create a JIRA ticket and attach it there.

Matt

On Thu, Jun 26, 2008 at 10:54 AM, A <agiatic@...> wrote:

>
> Hi,
>
> I though I attached a zip file with it.
> Anyway, here it is:
>
> public class BasicUserAutoProvision implements AutoProvision {    private static Log log = LogFactory.getFactory().getInstance(BasicUserAutoProvision.class);
>
>  public boolean execute() {    User ud = CustomUserRegistry.getUserDetailsFromAuthentication();    if(ud != null) {      UserManager mgr;      ud.setId(org.apache.roller.util.UUIDGenerator.generateUUID());      try {        mgr = WebloggerFactory.getWeblogger().getUserManager();        mgr.addUser(ud);        WebloggerFactory.getWeblogger().flush();      } catch (WebloggerException e) {        log.warn("Error while auto-provisioning user from SSO.", e);      }    }
>    return true;  }
> }
>
>
>> CC: adrianoferraro@...> From: alex.coles@...> To: user@...> Subject: Re: AD and user provisioning> Date: Thu, 26 Jun 2008 12:27:49 +0200> > Hi Adriano,> > Looks like you forgot to attach the source!> > Cheers,> > Alex> > On Jun 25, 2008, at 11:52 PM, A wrote:> > > Hi,> >> > I got user provisioning to work with AD in 4.0.> >> > Note that I had to change the class named> > org.apache.roller.weblogger.ui.core.security.BasicUserAutoProvision > > because the> > org.apache.roller.weblogger.ui.core.security.CustomUserRegistry > > class was setting the new user's id to null.> > The db schema doesn't allow that, so I just recompiled the > > BasicUserAutoProvision class with a small fix and placed it> > back in the jar, andit worked great.> >> > I know, talk about a hack beyond description.> >> > I attached the source and the class file as well.> >> > A> >> > Are you ready for Windows Live Messenger Beta 8.5 ? Get the latest > > for free today! <BasicUserAutoProvision.class>>
> _________________________________________________________________
> R U Ready for Windows Live Messenger Beta 8.5? Try it today!
> http://entertainment.sympatico.msn.ca/WindowsLiveMessenger



--
http://raibledesigns.com

Re: AD and user provisioning

by Alex Coles :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jun 26, 2008, at 6:59 PM, Matt Raible wrote:

> Apache mailing lists don't accept attachments so the best way to
> submit code is to create a JIRA ticket and attach it there.
>
> Matt

Also, if you just want to add some code for the world to look at - but  
it doesn't warrant creating a ticket, you can try http://pastie.org/ 
or http://pastebin.com/.

Alex
LightInTheBox - Buy quality products at wholesale price