You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Grégory ROMÉ <gr...@gmail.com> on 2009/04/19 12:24:02 UTC

Author name modification on the fly

Hi,

I deployed a subversion server using apache and kerberos to authenticate the
users. The problem with kerberos is that the username is long, it includes
the kerberos realm. It's also a problem because I plan to deploy a slave
server wich will use another authentication scheme and I would like to keep
the log homogeneous.
Is it possible to modify the author name (by removing the realm) with a
hook?

Thanks,
Grégory

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1807076

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Author name modification on the fly

Posted by Grégory ROMÉ <gr...@gmail.com>.
Thanks,

I attached the script I wrote using your suggestions.

Cheers!
Grégory


2009/4/19 Mark Phippard <ma...@gmail.com>

> On Sun, Apr 19, 2009 at 8:24 AM, Grégory ROMÉ <gr...@gmail.com>
> wrote:
>
> > I deployed a subversion server using apache and kerberos to authenticate
> the
> > users. The problem with kerberos is that the username is long, it
> includes
> > the kerberos realm. It's also a problem because I plan to deploy a slave
> > server wich will use another authentication scheme and I would like to
> keep
> > the log homogeneous.
> > Is it possible to modify the author name (by removing the realm) with a
> > hook?
>
> You can either use a pre-commit hook to change the author name in the
> TXN for the commit or a post-commit hook to change the revprop after
> the commit finishes.  The pre-revprop-change hook would have to be
> enabled and allow you to do the latter.
>
> Using the post-commit hook would be the easiest way and would be how I did
> it.
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1809047

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Author name modification on the fly

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, Mark Phippard!

>> I deployed a subversion server using apache and kerberos to authenticate the
>> users. The problem with kerberos is that the username is long, it includes
>> the kerberos realm. It's also a problem because I plan to deploy a slave
>> server wich will use another authentication scheme and I would like to keep
>> the log homogeneous.
>> Is it possible to modify the author name (by removing the realm) with a
>> hook?

> You can either use a pre-commit hook to change the author name in the
> TXN for the commit or a post-commit hook to change the revprop after
> the commit finishes.  The pre-revprop-change hook would have to be
> enabled and allow you to do the latter.

> Using the post-commit hook would be the easiest way and would be how I did it.

Just a question.
Could the authentication engine do this work for you?
I.e., mod_auth_sspi can strip domain part and provide only username to the
demanding application. (However, it's still only stripped from result, after
the user has been verified)


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 19.04.2009, <22:01>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1809997

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Author name modification on the fly

Posted by Mark Phippard <ma...@gmail.com>.
On Sun, Apr 19, 2009 at 8:24 AM, Grégory ROMÉ <gr...@gmail.com> wrote:

> I deployed a subversion server using apache and kerberos to authenticate the
> users. The problem with kerberos is that the username is long, it includes
> the kerberos realm. It's also a problem because I plan to deploy a slave
> server wich will use another authentication scheme and I would like to keep
> the log homogeneous.
> Is it possible to modify the author name (by removing the realm) with a
> hook?

You can either use a pre-commit hook to change the author name in the
TXN for the commit or a post-commit hook to change the revprop after
the commit finishes.  The pre-revprop-change hook would have to be
enabled and allow you to do the latter.

Using the post-commit hook would be the easiest way and would be how I did it.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1808156

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].