Re: Connecting to a database with logged in user credentials
Thank you Melvyn. For now it's the best option we've found. W dniu czwartek, 23 lutego 2017 18:38:14 UTC+1 użytkownik Melvyn Sopacua napisał: > > Hi Konrad, > > On Thursday 23 February 2017 02:54:22 konrad@uni.lodz.pl > wrote: > > > > After starting the project, we've realised that db routing is limited > > to the set of db connections that are statically described in django > > settings. > > Just a few minutes before your post, a link was posted: > https://github.com/ambitioninc/django-dynamic-db-router > > So no, they're not static. This package may not suit your needs, but > it's mechanism with a custom router should help you along. > > -- > Melvyn Sopacua > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fcd96dc2-5fbf-41f0-8d92-b35cf4626132%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Connecting to a database with logged in user credentials
Is it possible to create database ENGINE that would be able to pass credentials of logged in user to DatabaseWrapper.connect() method? We want to build rest api with Django that would base on a legacy Postgresql database. We've got permissions to objects ensured on database level, so a user logged in to database cannot see/modify anything he should not to. We have a very strong need not to destroy this mechanism. This means that every application user is at the same time a database user. After starting the project, we've realised that db routing is limited to the set of db connections that are statically described in django settings. Is there a way to create database connection dynamically based on the currently logged in user? In ideal we would like to pass kerberos credentials from the frontend throug api to the database. Thanks in advance for any clues, Konrad Perzyna -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/75ae1155-f2b2-43d6-a616-839f0c886bcb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.