multiple auth instances for one app

70 views
Skip to first unread message

Mark Graves

unread,
Dec 19, 2015, 4:03:45 AM12/19/15
to web2py-users
Hey everyone.

Interesting question here.

Has anyone ever used two instances of auth in the same app, on two separate databases:

eg.

db1 = DAL()
db2 = DAL()

auth1 = Auth(db1)
auth2 = Auth(db2)

Would that run into any thread safety issues?

-Mark

Massimo Di Pierro

unread,
Dec 21, 2015, 1:11:10 PM12/21/15
to web2py-users
I cannot think of a reasonable use case for this. Tell us more.

Mark Graves

unread,
Dec 21, 2015, 5:37:20 PM12/21/15
to web...@googlegroups.com
I never said I was reasonable =)

I'll come up with a description this evening.

-Mark

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/rXjJZZ4ZKDw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Graves

unread,
Dec 22, 2015, 4:36:38 AM12/22/15
to web...@googlegroups.com
The basic use case is as such:

2 databases, 1 encrypted, 1 not

2 separate sets of users, 1 of which acts on the other set of users

Some users from the unencrypted database have access to the encrypted database some do not.

I'm aware that someone getting access to the app side could decrypt the encrypted database if i were to keep the encryption key(s) available.

Its more from application logic security, than low level security, where two sets of users need to keep their data separate, but have access to similar functions and some shared tables.


Anthony

unread,
Dec 22, 2015, 6:30:30 PM12/22/15
to web2py-users

Mark Graves

unread,
Dec 22, 2015, 7:12:50 PM12/22/15
to web...@googlegroups.com
Thanks Anthony.

Those are the considerations I was looking for.

Did you successfully implement this?

-Mark

--
Reply all
Reply to author
Forward
0 new messages