Re: Help with Authentication and Authorization

2011-07-13 Thread Vlad K.
It's not just the problem of hardcoded groups. Default authn implementation with AuthTkt uses a groupfind callback which effectively defines the group per request, and that would be the right place to pull data from db (based on authenticated_userid). Not being happy with it, I rolled my

Help with Authentication and Authorization

2011-07-11 Thread gostones
Hi everyone, I am new to python and web development and is trying to learn through building an application through pyramid. I am currently trying to work on a basic to-do list application with user accounts, authentication and authorization using url dispatch and sqlalchemy I have read the

Re: Help with Authentication and Authorization

2011-07-11 Thread Chris McDonough
On Mon, 2011-07-11 at 12:09 -0700, gostones wrote: Hi everyone, I am new to python and web development and is trying to learn through building an application through pyramid. I am currently trying to work on a basic to-do list application with user accounts, authentication and authorization

Re: Help with Authentication and Authorization

2011-07-11 Thread Eric Rasmussen
In the Akhet documentation there's an extended example here: http://docs.pylonsproject.org/projects/akhet/dev/auth.html It makes it clear how to tie in your own model with the auth features, but it assumes you've already made Users and Groups objects in your models file. On Mon, Jul 11, 2011 at

Re: Help with Authentication and Authorization

2011-07-11 Thread Raoul Snyman
On 11 July 2011 21:54, Chris McDonough chr...@plope.com wrote: I don't really know if there's an example of actually storing permissions, users, and groups in a database somewhere TBH.  The tutorial code stores users and groups in a modle scope global.  The task would be to replace the code

Re: Help with Authentication and Authorization

2011-07-11 Thread Chris McDonough
On Mon, 2011-07-11 at 22:12 +0200, Raoul Snyman wrote: Not to moan at you guys, I love Pyramid, but it's a deficiency I see in the documentation, and not only in Pyramid. Yes, it would be great if someone were to contribute an example of using a database to store users and groups somewhere.

Re: Help with Authentication and Authorization

2011-07-11 Thread Benjamin Sims
I found that looking at the shootout example application: git clone git://github.com/Pylons/shootout.git was helpful for how you might set up a basic User model with password encryption and login etc. Ben On 11 July 2011 20:09, gostones gosto...@gmail.com wrote: Hi everyone, I am new to

Re: Help with Authentication and Authorization

2011-07-11 Thread Matt Feifarek
On Mon, Jul 11, 2011 at 3:12 PM, Raoul Snyman raoul.sny...@gmail.comwrote: I've just spent the better part of the weekend scouring the docs for some mention or example of how to do auth (both authentication and authorisation) from the database, and gave up and decided to roll my own, because

Re: Help with Authentication and Authorization

2011-07-11 Thread Eric Rasmussen
A while back I was working on a complete Pyramid + pyramid_sqla demo to show how you can use authorization with a SQLite database and SQLAlchemy. I just reworked it to use Pyramid + Akhet and it seems to run fine, although there are likely a lot of little inconsistencies or issues to be found

Re: Help with Authentication and Authorization

2011-07-11 Thread Chris McDonough
On Mon, 2011-07-11 at 18:26 -0700, Eric Rasmussen wrote: A while back I was working on a complete Pyramid + pyramid_sqla demo to show how you can use authorization with a SQLite database and SQLAlchemy. I just reworked it to use Pyramid + Akhet and it seems to run fine, although there are

Re: Help with Authentication and Authorization

2011-07-11 Thread Eric Rasmussen
Sure, linking is great. One day I'll get around to adding it in officially. Also, if anyone does try it out and has feedback, you're welcome to email me personally or respond here. On Mon, Jul 11, 2011 at 6:32 PM, Chris McDonough chr...@plope.com wrote: On Mon, 2011-07-11 at 18:26 -0700, Eric

Re: Help with Authentication and Authorization

2011-07-11 Thread Bruce Wade
I will need to implement authentication/authorization with mongodb. Is there already a tutorial for this? If not once I hammer it out I will write one :D On Mon, Jul 11, 2011 at 6:49 PM, Eric Rasmussen ericrasmus...@gmail.comwrote: Sure, linking is great. One day I'll get around to adding it in

Re: Help with Authentication and Authorization

2011-07-11 Thread Eric Rasmussen
I don't know if there's a tutorial for authorization with MongoDB specifically, but I do think the Akhet docs mentioned before would work: http://docs.pylonsproject.org/projects/akhet/dev/auth.html Most of it is focused on parts other than the model, so you can use it with almost any backend.

Re: Help with Authentication and Authorization

2011-07-11 Thread Carlos de la Guardia
FWIW, I have a simple example of authentication/authorization including user management with the ZODB. No groups, but at least users can sign up and only authenticated users can view the site. The application is under development, but that part works.