Android SQL Database without Firebase - database

i want to make login method without Firebase.
i read about greenrobot database instead of Firebase database.
my question is that greendao online or it's local database?
For example two users using the app and entered the same email so the application show email already in use.
Can i do it in greenrobot database?

Related

Where should be database credentials be saved?

I created a web app and i want it to go live so my question is: Where should the sensitive credentials be stored? I mean like database username (user) and password and other admin data?
Should I store them in env variables and if yes, if someone get access to the server whouldn't my data be compromised?

Can I get tables of mssql in admin site of django

I am using MSSQL, where I have already defined some table so I didn't define anything under models.py file, Is there any way that I get to see all my table in the admin site. ( i successfully connected Django application to MSSQL)
Connect your App with the sql admin account is not secure but if you want the command is
SHOW TABLES;

Per user database authentication in Django

Good afternoon,
I am writing a front-end for a research database that holds sensitive health information. My institution has a policy that user actions be logged by the SQL server so that they can perform audits on the server log files in the event of a breach.
Because of this policy, I cannot connect Django to the db as a system user (otherwise, all users of the front-end actions would be logged by the server as the Django system user instead as the actual user individually).
Is there a way to connect to the DB using per user credentials so that actions performed on the front end will be logged as that user on the db server? I have been able to find a lot of information about using multiple databases, but nothing about per user authentication of those databases.
Thank you in advanced!
I don't think you can do that, the user that connect to the database need to have access to all the tables.
I had a similar issue when I wanted to use Django models outside Django and restrict access to certain models for certain users.
I ended up using SQLAlchemy and its automap feature on the existing Django database. Then you can connect to the database using your SQL users.
However, if you don't mind all the users accessing all the tables and are only concerned about the logs, maybe you can use a different settings.py or at least a different DATABASES configuration for each user?
I was able to accomplish this by giving the SQL user the IMPERSONATE permission and performing EXECUTE AS prior to the DB queries that I needed to have logged in models.py.
cursor = self.connection.cursor()
try:
cursor.execute("EXECUTE AS " + get_current_user()
except DatabaseError as e:
cursor.close()
raise e

Sails.js Dynamically Switching Database based on users

I am currently building a project that requires switching between different databases according to the user logged in.
Every registered user has it's own database however the tables (the structure) within the databases are the same.
e.g. user login by authenticating at the default database, if true then get the databaseName from the default database accordingly and then connect to that database from then on.
Is there any way to achieve this?
Thanks!

MVC 4 Login and Policy on different DataBase

I'm trying to find a tutorial or help for solve this scenario.
In my MVC 4 application I want to have a Database where I store login information (username, password, connection strings ).
When User Login success, I want to open database with connection string stored in User Table, and get the policy from specific database (this database also contains the application data).
This means that a user can access to multiple database, and have different policy on every database.
Administrator can create a new user on Login Database, associate user with databases, and set policies for every Database.
Someone can help me or know a tutorial for doing that.
Thanks

Resources