You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Dave <sn...@gmail.com> on 2008/05/28 04:09:54 UTC
How authentication works in Roller
I just did this write-up for Tatyana to help her understand how auth
works in Roller:
http://docs.google.com/Doc?id=dg2cfnzw_11fcjbbgdz
The latest version of the OpenID proposal she is working on is here:
http://cwiki.apache.org/confluence/x/zVAB
As always, feedback is welcome.
- Dave
Re: How authentication works in Roller
Posted by Allen Gilliland <Al...@Sun.COM>.
Dave wrote:
>
>> What I meant by "beyond Acegi" is that Roller identifies users by using our
>> User pojo. Acegi doesn't know about our User pojo, it uses it's own classes
>> and objects. Somewhere in between there is a translation that happens,
>> which is the RollerSession. We basically take request.getUserPrincipal()
>> and translate that into a Roller User pojo so the rest of the Roller code
>> can know about the user.
>>
>> This is an extremely important part of the authentication process. And
>> truth be told I think we need to make some improvements here because we are
>> not entirely consistent in how this works.
>
> I'm curious. Where is the inconsistency?
The inconsistency I am talking about is that we don't use the
RollerSession as "the" way to lookup the authentic client in all
situations. I went through this when I implemented comment
authentication and the main place we need to fix this is in the
ParsedRequest object, which goes directly to the UserManager instead of
using the RollerSession.
It's a really simple and easy change, but important.
I'm basically done with my comment authentication work, so I'll find a
little time this week and write up how I did it, what changes were
necessary, and make it into a proposal to see if folks are interested in
it for 4.1.
It actually should fit into 4.1 even better than the 4.0 code which I
worked from.
-- Allen
>
> - Dave
Re: How authentication works in Roller
Posted by Dave <sn...@gmail.com>.
On Fri, May 30, 2008 at 8:29 PM, Allen Gilliland
<Al...@sun.com> wrote:
> Dave wrote:
>> Sure thing. Here it is on the wiki:
>> http://cwiki.apache.org/confluence/x/2lMB
>>> I spent a while learning Acegi stuff so that I could create a custom SSO
>>> integration with our identity system at Sun, so I could add quite a bit
>>> more detail about "Whats going on in security.xml".
>>
>> Please do, that would be great.
>
> k ... I added a more complete description of how the Acegi filterChain works
> along with a description of each of the filters.
Nice.
> I also noted that webservice authentication is completely separate, which is
> also an important thing to note for people trying to tie into other identity
> systems. Currently we don't do a good job with that :/
Yes, that needs to be fixed. I filed a but on it recently:
https://issues.apache.org/roller/browse/ROL-1718
For MetaWeblog API, which requires username/password in every call the
only fix is programmatic login, which I believe is supported by Acegi
(but not by CMA/Servlet Authentication).
For AtomPub, which can use HTTP Basic Authentication, we can probably
just ask Acegi (or CMA) to protect the AtomPub URL patterms via Basic
Auth. (and optionally HTTPS).
>>> There is also no mention of what happens beyond Acegi, which is an
>>> important
>>> part of understanding how authentication works in Roller. In particular
>>> you
>>> need to know about the RollerSession object and some of the other code in
>>> the ui.core.security package, such as auto provisioning. i.e. how an
>>> authentic user becomes a Roller User object the system can make use of.
>>
>> I didn't do anything to cover SSO or LDAP integration yet, which is
>> where auto-provision comes in, no?
>
> Yes and No. Auto provision only makes sense if you are integrating with a
> 3rd party identity system, but just because you are using ldap or SSO
> doesn't mean you have to do provisioning. This is effectively the heart of
> your External User Management proposal right?
Right.
If a user is logged in via SSO but there is no user in the User
Manager, then you'd want to do autoprovision.
If a there is a custom User Manager in place, then the fact that you
are logged in via SSO almost certainly means that you are already
registered that User Manager.
> What I meant by "beyond Acegi" is that Roller identifies users by using our
> User pojo. Acegi doesn't know about our User pojo, it uses it's own classes
> and objects. Somewhere in between there is a translation that happens,
> which is the RollerSession. We basically take request.getUserPrincipal()
> and translate that into a Roller User pojo so the rest of the Roller code
> can know about the user.
>
> This is an extremely important part of the authentication process. And
> truth be told I think we need to make some improvements here because we are
> not entirely consistent in how this works.
I'm curious. Where is the inconsistency?
- Dave
Re: How authentication works in Roller
Posted by Allen Gilliland <Al...@Sun.COM>.
Dave wrote:
> On Wed, May 28, 2008 at 8:03 PM, Allen Gilliland
> <Al...@sun.com> wrote:
>> I like Google Docs, but can we get that put into the wiki?
>
> Sure thing. Here it is on the wiki: http://cwiki.apache.org/confluence/x/2lMB
>
>
>> I spent a while learning Acegi stuff so that I could create a custom SSO
>> integration with our identity system at Sun, so I could add quite a bit more
>> detail about "Whats going on in security.xml".
>
> Please do, that would be great.
k ... I added a more complete description of how the Acegi filterChain
works along with a description of each of the filters.
I also noted that webservice authentication is completely separate,
which is also an important thing to note for people trying to tie into
other identity systems. Currently we don't do a good job with that :/
>
>
>> There is also no mention of what happens beyond Acegi, which is an important
>> part of understanding how authentication works in Roller. In particular you
>> need to know about the RollerSession object and some of the other code in
>> the ui.core.security package, such as auto provisioning. i.e. how an
>> authentic user becomes a Roller User object the system can make use of.
>
> I didn't do anything to cover SSO or LDAP integration yet, which is
> where auto-provision comes in, no?
Yes and No. Auto provision only makes sense if you are integrating with
a 3rd party identity system, but just because you are using ldap or SSO
doesn't mean you have to do provisioning. This is effectively the heart
of your External User Management proposal right?
What I meant by "beyond Acegi" is that Roller identifies users by using
our User pojo. Acegi doesn't know about our User pojo, it uses it's own
classes and objects. Somewhere in between there is a translation that
happens, which is the RollerSession. We basically take
request.getUserPrincipal() and translate that into a Roller User pojo so
the rest of the Roller code can know about the user.
This is an extremely important part of the authentication process. And
truth be told I think we need to make some improvements here because we
are not entirely consistent in how this works.
>
> I'd also like to add a section that explains how to setup CMA, since
> that's what we're using in our Social Software for Glassfish efforts.
>
>
>> As it turns out, we have had a fairly high priority request come in to add
>> comment authentication to our installation, so I am going to be working on
>> that very soon. So I should be able to help out with this proposal a bit.
>>
>> A few quick comments on the proposal ...
>>
>> * Adding columns to the db for "openid_*" seems a little hokey to me. Is it
>> not better to find a generic (meaning non-openid specific) way of
>> accomplishing this? We are bound to run into a situation like this again in
>> the future and I don't think messing with the schema every time is the best
>> solution.
>>
>> * Is it expected that openid users will get a local account provisioned? or
>> are we planning this such that these users would be managed externally,
>> similar to an ldap directotry scenario?
>>
>> * A tricky part that will need more consideration is the comment
>> authentication part. In particular, Roller currently does not allow a
>> situation where an authentic user is not also available via lookup in the
>> UserManager. This will need some revising.
>
> Very interesting. Are you going to do that via OpenID?
No, it's against our custom Sun Identity system. It could work against
OpenID, but that's not specifically what I'm doing.
-- Allen
>
> - Dave
Re: How authentication works in Roller
Posted by Dave <sn...@gmail.com>.
On Wed, May 28, 2008 at 8:03 PM, Allen Gilliland
<Al...@sun.com> wrote:
> I like Google Docs, but can we get that put into the wiki?
Sure thing. Here it is on the wiki: http://cwiki.apache.org/confluence/x/2lMB
> I spent a while learning Acegi stuff so that I could create a custom SSO
> integration with our identity system at Sun, so I could add quite a bit more
> detail about "Whats going on in security.xml".
Please do, that would be great.
> There is also no mention of what happens beyond Acegi, which is an important
> part of understanding how authentication works in Roller. In particular you
> need to know about the RollerSession object and some of the other code in
> the ui.core.security package, such as auto provisioning. i.e. how an
> authentic user becomes a Roller User object the system can make use of.
I didn't do anything to cover SSO or LDAP integration yet, which is
where auto-provision comes in, no?
I'd also like to add a section that explains how to setup CMA, since
that's what we're using in our Social Software for Glassfish efforts.
> As it turns out, we have had a fairly high priority request come in to add
> comment authentication to our installation, so I am going to be working on
> that very soon. So I should be able to help out with this proposal a bit.
>
> A few quick comments on the proposal ...
>
> * Adding columns to the db for "openid_*" seems a little hokey to me. Is it
> not better to find a generic (meaning non-openid specific) way of
> accomplishing this? We are bound to run into a situation like this again in
> the future and I don't think messing with the schema every time is the best
> solution.
>
> * Is it expected that openid users will get a local account provisioned? or
> are we planning this such that these users would be managed externally,
> similar to an ldap directotry scenario?
>
> * A tricky part that will need more consideration is the comment
> authentication part. In particular, Roller currently does not allow a
> situation where an authentic user is not also available via lookup in the
> UserManager. This will need some revising.
Very interesting. Are you going to do that via OpenID?
- Dave
Re: How authentication works in Roller
Posted by Allen Gilliland <Al...@Sun.COM>.
Tatyana wrote:
> Hello,
> Thanks for your comment upon proposal. I'll try to answer the
> questions that you've stated.
>
>> * Adding columns to the db for "openid_*" seems a little hokey to me.
>> Is it not better to find a generic (meaning non-openid specific) way of
>> accomplishing this? We are bound to run into a situation like this
>> again in the future and I don't think messing with the schema every time
>> is the best solution.
>
> If it is not recommended to modify database schema, then we can store
> that information on the xml file or any other type of file. If you
> can think of any other ways of accomplishing this, I'll take it into
> consideration.
> One of the issues to discuss in the proposal was the question whether
> the user can have one or more openid_urls mapped to his account. In
> the case when user can have multiple openid_urls, it's essential to
> create one more database table to store userids and corresponding
> openid_urls. If the user can have only one openid_url, it would be
> possible not to create one more table, just add column to the
> rolleruser table, or reuse any of the existing columns
I am not against extensions to the database schema at all, what I am
against are extensions to the schema which apply only to a non-standard
feature of the application. You could easily find 10+ other variants of
identity systems Roller users "might" want to integrate with, but I
don't want all of them to require schema changes to work. There are
various solutions to this ...
1. The extension to the db could be generic enough to fit all possible
uses. Such as adding a "user_attribute" table which keeps key/value
attributes which pertain to a user. This way you can associate any
extra data you want about a user.
2. Another alternative is to reuse the existing columns in new ways. I
don't know a lot about OpenID, but I thought that with OpenID your url
is effectively your id, so maybe that should go in the existing userName
column. Is there any real need for a "userName" when the user is
authenticating against OpenID?
As for the question about supporting multiple openid urls, I don't have
an answer for that. Why would someone want to do that? What would be
the purpose of authenticating against different systems? Is that even
secure?
>
>> * Is it expected that openid users will get a local account provisioned?
>> or are we planning this such that these users would be managed
>> externally, similar to an ldap directotry scenario?
>
> Yes, users with openid will have the same type of account as regular
> users. As far as existing users would have the opportunity to attach
> openid_url to their account. I guess, it'll increase usability, as far
> as compatibility and speed.
>
>> * A tricky part that will need more consideration is the comment
>> authentication part. In particular, Roller currently does not allow a
>> situation where an authentic user is not also available via lookup in
>> the UserManager. This will need some revising.
>
> I guess, openid authentication won't change any of the user lookup methods, so everything
> except the authentication process will be the same. The result of the
> authentication will be the User class instance, and all other methods
> will use its id, name, etc. the same way.
I was talking about this item in the proposal ...
4. If the user is not logged-in and wants to leave a comment, the system
will redirect him to the login page;
I am doing that exact thing right now and I know that there are code
changes required to make that work because Roller currently does not
allow a user to be considered "authentic" but not have their account
come from a call to UserManager.getUserByXXX().
-- Allen
>
> Tatyana
>
Re[2]: How authentication works in Roller
Posted by Tatyana <to...@cs.vsu.ru>.
Hello,
Thanks for your comment upon proposal. I'll try to answer the
questions that you've stated.
> * Adding columns to the db for "openid_*" seems a little hokey to me.
> Is it not better to find a generic (meaning non-openid specific) way of
> accomplishing this? We are bound to run into a situation like this
> again in the future and I don't think messing with the schema every time
> is the best solution.
If it is not recommended to modify database schema, then we can store
that information on the xml file or any other type of file. If you
can think of any other ways of accomplishing this, I'll take it into
consideration.
One of the issues to discuss in the proposal was the question whether
the user can have one or more openid_urls mapped to his account. In
the case when user can have multiple openid_urls, it's essential to
create one more database table to store userids and corresponding
openid_urls. If the user can have only one openid_url, it would be
possible not to create one more table, just add column to the
rolleruser table, or reuse any of the existing columns
> * Is it expected that openid users will get a local account provisioned?
> or are we planning this such that these users would be managed
> externally, similar to an ldap directotry scenario?
Yes, users with openid will have the same type of account as regular
users. As far as existing users would have the opportunity to attach
openid_url to their account. I guess, it'll increase usability, as far
as compatibility and speed.
> * A tricky part that will need more consideration is the comment
> authentication part. In particular, Roller currently does not allow a
> situation where an authentic user is not also available via lookup in
> the UserManager. This will need some revising.
I guess, openid authentication won't change any of the user lookup methods, so everything
except the authentication process will be the same. The result of the
authentication will be the User class instance, and all other methods
will use its id, name, etc. the same way.
Tatyana
Re: How authentication works in Roller
Posted by Gr...@ricoh.co.uk.
Hello,
I did some messing a while ago and managed to get spring-security to work
well using the below configuration. Seemed to remember it needed two
separate files for it to work, applicationContext-service.xml, and
applicationContext-security.xml below.
this may need tweeking also:
<form-login login-page="/login-redirect.action"
login-processing-url="/roller_j_security_check"
authentication-failure-url="/roller-ui/login.rol?error=true"
default-target-url="/" />
Did not know how to test the ldap stuff so did not add this.
Will need also to update some of the programs as the package names have
changed.
hope this helps.
####
Modified config loaded via the class path:
web.xml:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
WEB-INF/applicationContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<import resource="classpath:applicationContextClasspath.xml" />
</beans>
WEB-INF/classes/applicationContextClasspath.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<import resource="applicationContext-service.xml" />
<import resource="applicationContext-security.xml" />
</beans>
################
WEB-INF/classes/applicationContext-service.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<!-- Log failed authentication attempts to commons-logging -->
<bean id="loggerListener" class=
"org.springframework.security.event.authentication.LoggerListener"/>
<!-- ======================== AUTHENTICATION ======================= -->
<bean id="authenticationManager"
class="org.springframework.security.providers.ProviderManager">
<property name="providers">
<list>
<ref local="daoAuthenticationProvider"/>
<ref local="anonymousAuthenticationProvider"/>
<!-- rememberMeAuthenticationProvider added
programmatically -->
</list>
</property>
</bean>
<bean id="daoAuthenticationProvider"
class=
"org.springframework.security.providers.dao.DaoAuthenticationProvider">
<property name="userDetailsService" ref="jdbcAuthenticationDao" />
<property name="userCache" ref="userCache" />
</bean>
<bean id="jdbcAuthenticationDao" class="
org.apache.roller.weblogger.ui.core.security.RollerUserDetailsService" />
<bean id="userCache"
class=
"org.springframework.security.providers.dao.cache.EhCacheBasedUserCache">
<property name="cache">
<bean
class=
"org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name="cacheManager">
<bean class=
"org.springframework.cache.ehcache.EhCacheManagerFactoryBean" />
</property>
<property name="cacheName" value="userCache" />
</bean>
</property>
</bean>
<bean id="anonymousAuthenticationProvider"
class="org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider">
<property name="key" value="anonymous"/>
</bean>
<bean id="rememberMeAuthenticationProvider" class=
"org.springframework.security.providers.rememberme.RememberMeAuthenticationProvider"
>
<property name="key" value="rollerlovespringsecutity"/>
</bean>
<bean id="roleVoter" class="org.springframework.security.vote.RoleVoter">
<property name="rolePrefix" value=""/>
</bean>
<!-- Used to override the prefix ROLE_ in pattern/access check in <http/>
-->
<bean id="accessDecisionManager" class=
"org.springframework.security.vote.AffirmativeBased">
<property name="allowIfAllAbstainDecisions" value="false"/>
<property name="decisionVoters">
<list>
<ref local="roleVoter"/>
</list>
</property>
</bean>
</beans>
###############
WEB-INF/classes/applicationContext-security.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-2.0.xsd">
<http auto-config="true" lowercase-comparisons="false"
access-decision-manager-ref="accessDecisionManager">
<intercept-url pattern="/roller-ui/login-redirect**" access=
"admin,editor"/>
<intercept-url pattern="/roller-ui/profile**" access=
"admin,editor"/>
<intercept-url pattern="/roller-ui/createWeblog**" access=
"admin,editor"/>
<intercept-url pattern="/roller-ui/menu**" access="admin,editor"/>
<intercept-url pattern="/roller-ui/authoring/**"
access="admin,editor"/>
<intercept-url pattern="/roller-ui/admin/**" access="admin"/>
<intercept-url pattern="/rewrite-status*" access="admin"/>
<form-login login-page="/login-redirect.action"
login-processing-url="/roller_j_security_check"
authentication-failure-url="
/roller-ui/login.rol?error=true"
default-target-url="/" />
</http>
<authentication-provider user-service-ref="jdbcAuthenticationDao"/>
</beans:beans>
Cheers Greg
"Matt Raible" <mr...@gmail.com>
29/05/2008 03:49
Please respond to
dev@roller.apache.org
To
dev@roller.apache.org
cc
Subject
Re: How authentication works in Roller
I believe it's possible for me to upgrade Roller to use Spring
Security 2.0 in an hour or two, so if that should be done sooner than
later - please let me know.
Matt
On Wed, May 28, 2008 at 6:03 PM, Allen Gilliland
<Al...@sun.com> wrote:
> I like Google Docs, but can we get that put into the wiki?
>
> I spent a while learning Acegi stuff so that I could create a custom SSO
> integration with our identity system at Sun, so I could add quite a bit
more
> detail about "Whats going on in security.xml".
>
> There is also no mention of what happens beyond Acegi, which is an
important
> part of understanding how authentication works in Roller. In particular
you
> need to know about the RollerSession object and some of the other code
in
> the ui.core.security package, such as auto provisioning. i.e. how an
> authentic user becomes a Roller User object the system can make use of.
>
> As it turns out, we have had a fairly high priority request come in to
add
> comment authentication to our installation, so I am going to be working
on
> that very soon. So I should be able to help out with this proposal a
bit.
>
> A few quick comments on the proposal ...
>
> * Adding columns to the db for "openid_*" seems a little hokey to me. Is
it
> not better to find a generic (meaning non-openid specific) way of
> accomplishing this? We are bound to run into a situation like this
again in
> the future and I don't think messing with the schema every time is the
best
> solution.
>
> * Is it expected that openid users will get a local account provisioned?
or
> are we planning this such that these users would be managed externally,
> similar to an ldap directotry scenario?
>
> * A tricky part that will need more consideration is the comment
> authentication part. In particular, Roller currently does not allow a
> situation where an authentic user is not also available via lookup in
the
> UserManager. This will need some revising.
>
> -- Allen
>
>
> Dave wrote:
>>
>> I just did this write-up for Tatyana to help her understand how auth
>> works in Roller:
>> http://docs.google.com/Doc?id=dg2cfnzw_11fcjbbgdz
>>
>> The latest version of the OpenID proposal she is working on is here:
>> http://cwiki.apache.org/confluence/x/zVAB
>>
>> As always, feedback is welcome.
>>
>> - Dave
>
--
http://raibledesigns.com
Share our environment commitment - conserve resources and contribute to the reduction of CO2 emissions by not printing the email unless absolutely necessary to do so.
Any opinions expressed are those of the author, not Ricoh UK Ltd. This communication does not constitute either offer or acceptance of any contractually binding agreement. Such offer or acceptance must be communicated in writing. It is the responsibility of the recipient to ensure this email and attachments are free from computer viruses before use and the sender accepts no responsibility or liability for any such computer viruses.
Ricoh UK Ltd. may monitor the content of emails sent and received via its network for the purpose of ensuring compliance with its policies and procedures. This communication contains information, which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this communication in error, please notify the sender immediately by return email with a copy to postmaster@ricoh-uk.com . Please contact us on +44 (0) 208 261 4000 if you need assistance.
Registered in England No: 1505381
VAT No: GB 354 2816 54
Re: How authentication works in Roller
Posted by Matt Raible <mr...@gmail.com>.
I believe it's possible for me to upgrade Roller to use Spring
Security 2.0 in an hour or two, so if that should be done sooner than
later - please let me know.
Matt
On Wed, May 28, 2008 at 6:03 PM, Allen Gilliland
<Al...@sun.com> wrote:
> I like Google Docs, but can we get that put into the wiki?
>
> I spent a while learning Acegi stuff so that I could create a custom SSO
> integration with our identity system at Sun, so I could add quite a bit more
> detail about "Whats going on in security.xml".
>
> There is also no mention of what happens beyond Acegi, which is an important
> part of understanding how authentication works in Roller. In particular you
> need to know about the RollerSession object and some of the other code in
> the ui.core.security package, such as auto provisioning. i.e. how an
> authentic user becomes a Roller User object the system can make use of.
>
> As it turns out, we have had a fairly high priority request come in to add
> comment authentication to our installation, so I am going to be working on
> that very soon. So I should be able to help out with this proposal a bit.
>
> A few quick comments on the proposal ...
>
> * Adding columns to the db for "openid_*" seems a little hokey to me. Is it
> not better to find a generic (meaning non-openid specific) way of
> accomplishing this? We are bound to run into a situation like this again in
> the future and I don't think messing with the schema every time is the best
> solution.
>
> * Is it expected that openid users will get a local account provisioned? or
> are we planning this such that these users would be managed externally,
> similar to an ldap directotry scenario?
>
> * A tricky part that will need more consideration is the comment
> authentication part. In particular, Roller currently does not allow a
> situation where an authentic user is not also available via lookup in the
> UserManager. This will need some revising.
>
> -- Allen
>
>
> Dave wrote:
>>
>> I just did this write-up for Tatyana to help her understand how auth
>> works in Roller:
>> http://docs.google.com/Doc?id=dg2cfnzw_11fcjbbgdz
>>
>> The latest version of the OpenID proposal she is working on is here:
>> http://cwiki.apache.org/confluence/x/zVAB
>>
>> As always, feedback is welcome.
>>
>> - Dave
>
--
http://raibledesigns.com
Re: How authentication works in Roller
Posted by Allen Gilliland <Al...@Sun.COM>.
I like Google Docs, but can we get that put into the wiki?
I spent a while learning Acegi stuff so that I could create a custom SSO
integration with our identity system at Sun, so I could add quite a bit
more detail about "Whats going on in security.xml".
There is also no mention of what happens beyond Acegi, which is an
important part of understanding how authentication works in Roller. In
particular you need to know about the RollerSession object and some of
the other code in the ui.core.security package, such as auto
provisioning. i.e. how an authentic user becomes a Roller User object
the system can make use of.
As it turns out, we have had a fairly high priority request come in to
add comment authentication to our installation, so I am going to be
working on that very soon. So I should be able to help out with this
proposal a bit.
A few quick comments on the proposal ...
* Adding columns to the db for "openid_*" seems a little hokey to me.
Is it not better to find a generic (meaning non-openid specific) way of
accomplishing this? We are bound to run into a situation like this
again in the future and I don't think messing with the schema every time
is the best solution.
* Is it expected that openid users will get a local account provisioned?
or are we planning this such that these users would be managed
externally, similar to an ldap directotry scenario?
* A tricky part that will need more consideration is the comment
authentication part. In particular, Roller currently does not allow a
situation where an authentic user is not also available via lookup in
the UserManager. This will need some revising.
-- Allen
Dave wrote:
> I just did this write-up for Tatyana to help her understand how auth
> works in Roller:
> http://docs.google.com/Doc?id=dg2cfnzw_11fcjbbgdz
>
> The latest version of the OpenID proposal she is working on is here:
> http://cwiki.apache.org/confluence/x/zVAB
>
> As always, feedback is welcome.
>
> - Dave
Re: Re[6]: tomcat-deploy
Posted by Matt Raible <ma...@raibledesigns.com>.
Tatyana,
I made some pretty good progress this morning, but wasn't able to get
everything working.
I've attached a patch to the following issue:
https://issues.apache.org/roller/browse/ROL-1723
I've also uploaded the changes in a project to the following URL:
http://static.raibledesigns.com/downloads/roller-springsecurity2.tar.gz
If you're able to get it working, you should be able to create a new
patch against trunk by using "svn diff > springsecurity2.patch".
Hope this helps,
Matt
cc: Developers list in case anyone else has time to take a stab at this.
On Tue, Jun 3, 2008 at 12:03 AM, Matt Raible <ma...@raibledesigns.com> wrote:
> Unfortunately, I didn't get this completed tonight. I hope to spend
> some time on it tomorrow. Here's some instructions I recently wrote
> up.
>
> http://raibledesigns.com/rd/entry/upgrading_to_spring_security_2
>
> Let me know if you end up upgrading w/o me. If I don't hear from you,
> I'll assume you're waiting on me. ;-)
>
> Matt
>
> On Mon, Jun 2, 2008 at 2:28 PM, Tatyana <to...@cs.vsu.ru> wrote:
>>
>> Hello Matt,
>>
>>> I can do the upgrade tonight.
>> That would be great, thank you.
>>
>>> Is that too late? If so, I can point you
>>> to some diffs that I've done for previous upgrades.
>>
>> Best regards,
>> Tatyana
>>
>>
>>
>
Re: Re[2]: tomcat-deploy
Posted by Matt Raible <ma...@raibledesigns.com>.
On Fri, May 30, 2008 at 5:19 PM, Dave <sn...@gmail.com> wrote:
> On Fri, May 30, 2008 at 9:59 AM, Tatyana V. Tokareva <to...@cs.vsu.ru> wrote:
>> Thanks for the roller.ml example, it worked. But I still can't attach
>> a debugger in netbeans. By the way, I've installed Netbeans 6.1. I run
>> catalina.bat jpda start, then in
>> netbeans I choose attach jpda debugger, connector: socket attach,
>> transport: dt_socket. It tries to connect for some time, and then
>> writes the following error:
>> Attaching to localhost:8000
>> handshake failed - connection prematurally closed
>> I've no idea how to fix it. I've tried everything I can think of.
>
> I don't know what to suggest here, sounds like you have things
> configured properly for Tomcat. When Tomcat starts, does it indicate
> that it is listening on port 8000?
>
>
>> One more question concerning the possibility of upgrading Roller to Spring
>> Acegi 2.0. You said that it will be preferable, but I'm not really sure about
>> how many changes will the whole Roller system need. If you think that
>> upgrading to the 2.0 version will be better, then I'll have to investigate
>> this topic. But if it's not critical, then I'll follow the plan that already
>> exists. If you're going to have some time during this weekend, then I'll be
>> glad to discuss this issue with you via IM.
>
> The reason I suggested that is because I believe Acegi 2.0 includes
> OpenID support.
>
> I added Matt Raible on the CC line...
>
> Matt, can you comment on the difficulty of a move from Acegi 1.2 to Acegi 2.0?
I don't believe it will be difficult at all. I did it for AppFuse in a
few hours and AppFuse Light in under an hour. I could probably do it
for Roller in under an hour. I'll make an attempt this weekend and let
you know how it goes.
Matt
>
> - Dave
>
Re: Re[2]: tomcat-deploy
Posted by Dave <sn...@gmail.com>.
On Fri, May 30, 2008 at 9:59 AM, Tatyana V. Tokareva <to...@cs.vsu.ru> wrote:
> Thanks for the roller.ml example, it worked. But I still can't attach
> a debugger in netbeans. By the way, I've installed Netbeans 6.1. I run
> catalina.bat jpda start, then in
> netbeans I choose attach jpda debugger, connector: socket attach,
> transport: dt_socket. It tries to connect for some time, and then
> writes the following error:
> Attaching to localhost:8000
> handshake failed - connection prematurally closed
> I've no idea how to fix it. I've tried everything I can think of.
I don't know what to suggest here, sounds like you have things
configured properly for Tomcat. When Tomcat starts, does it indicate
that it is listening on port 8000?
> One more question concerning the possibility of upgrading Roller to Spring
> Acegi 2.0. You said that it will be preferable, but I'm not really sure about
> how many changes will the whole Roller system need. If you think that
> upgrading to the 2.0 version will be better, then I'll have to investigate
> this topic. But if it's not critical, then I'll follow the plan that already
> exists. If you're going to have some time during this weekend, then I'll be
> glad to discuss this issue with you via IM.
The reason I suggested that is because I believe Acegi 2.0 includes
OpenID support.
I added Matt Raible on the CC line...
Matt, can you comment on the difficulty of a move from Acegi 1.2 to Acegi 2.0?
- Dave
Re[2]: tomcat-deploy
Posted by "Tatyana V. Tokareva" <to...@cs.vsu.ru>.
Hello Dave,
Thanks for the roller.ml example, it worked. But I still can't attach
a debugger in netbeans. By the way, I've installed Netbeans 6.1. I run
catalina.bat jpda start, then in
netbeans I choose attach jpda debugger, connector: socket attach,
transport: dt_socket. It tries to connect for some time, and then
writes the following error:
Attaching to localhost:8000
handshake failed - connection prematurally closed
I've no idea how to fix it. I've tried everything I can think of.
One more question concerning the possibility of upgrading Roller to Spring
Acegi 2.0. You said that it will be preferable, but I'm not really sure about
how many changes will the whole Roller system need. If you think that
upgrading to the 2.0 version will be better, then I'll have to investigate
this topic. But if it's not critical, then I'll follow the plan that already
exists. If you're going to have some time during this weekend, then I'll be
glad to discuss this issue with you via IM.
Thanks in advance,
Tatyana
> I'm using Tomcat 6.0.13. I put my roller.xml file in the directory
> tomcat/conf/Catalina/localhost/roller.xml
> Here are the contents of the file:
> <?xml version="1.0" encoding="UTF-8"?>
> <Context path="/roller" debug="1000"
> docBase="/Users/dave/src/roller/apps/weblogger/build/webapp">
> </Context>
> Hope that works for you too.
> - Dave