Questions tagged [database-permissions]

238 questions
4
votes
1 answer

SQL Server: EXECUTE AS clause of stored procedure not granting sysadmin permissions

I developped a stored procedure in order to restore a database from a backup file and add an application user to it. This stored procedure belongs to the master database. The issue is that my IT department does not allow me to use an admin user,…
4
votes
1 answer

Read-only user able to create table

I created a read-only user in PostgreSQL and it is still able to create tables: I created a test DB and then created a readonly2 user. Gave it only select privileges on 2 tables. When I log into this DB as readonly2 user I am still able to create…
WinSupp
  • 361
  • 2
  • 6
  • 20
4
votes
1 answer

Postgresql permissions keep failing

I am running PostgreSQL 9.3.2 on Linux. I have a group role 'data_scientist' and permissions to a particular (already populated) schema like so grant usage on schema schemaname to data_scientist; grant select, references, trigger on all tables…
4
votes
2 answers

SQL Server 2005 - Granting permission to create stored procedures (but no other objects)

I want to grant a user permission to create, alter, and execute stored procedures, but without the ability to create other database objects. I excluded them from the role db_ddladmin, but explicitly granted the permissions "Create procedure" and…
4
votes
4 answers

Django REST Framework: restrict data records access to the users created them

I'm trying to figure out, what is the best way to manage model access permissions with Django. I have a table of items which belong to the users created them. All the items a managed via a RESTful API. When using this API I want to limit access to…
4
votes
3 answers

Limit Database List to Ones With Permission SQL Server

By default if you connect to a remote SQL Server via an account that has access to say 1 of the 10 databases. You will still see in the Object Explorer all other databases, obviously due to permissions you cannot actually query them, but you can…
Mitchel Sellers
  • 62,228
  • 14
  • 110
  • 173
4
votes
2 answers

Copy permissions from another table

Is it possible to copy the user permissions from one table in a PostgreSQL database to another table? Is it just a matter of updating the pg_class.relacl column value for the target table to the value for the source table, as in: UPDATE pg_class SET…
E Brown
  • 692
  • 1
  • 8
  • 18
4
votes
2 answers

What permissions should SQL Server User be granted for LinqToSql?

I am using LinqToSQL and a trusted connection to handle database selects/updates/inserts/deletes. In the past I have always used stored procedures and only granted execute permission to the Application Pool identity for the particular sproc in the…
Jeff Widmer
  • 4,746
  • 6
  • 37
  • 51
4
votes
2 answers

Can't alter MySql routine

I am logging in with my main DB user, into Phpmyadmin page/ workbench remote access application and I have permissions issues. It all started when I tried to alter routines that I have stored in the DB. when trying to alter those routines from the…
user1870247
  • 41
  • 1
  • 2
4
votes
2 answers

django-guardian example source code

Can anyone suggest a good open source app that uses django-guardian? I'm not having trouble understanding the API, but I'd love to see an example to get a feel for implementation best practice (database design, etc.)
3
votes
3 answers

Grant permission to only a view

I have one user in my database, and I want to grant to him permission to read only one view, nothing more, no tables, nothing. How can I do this? Thanks a lot. P.S.: I am using MS SQL Server 2005
rpf
  • 3,612
  • 10
  • 38
  • 47
3
votes
1 answer

How to clone a Snowflake database and own all of its child objects?

I love Snowflake's zero-copy cloning feature, but it has a property that seems to seriously reduce its convenience: The clone creator gets ownership only of the top-level cloned object. The child objects remain owned by the owner of the original…
3
votes
1 answer

Grant access to a specific future table in Snowflake

I'm currently using Fivetran to pipe data into Snowflake. Once the data has landed, every 6 hours DBT runs some simple saved queries, which appear as tables in a schema. However, the permissions for various roles keep being reset and they can no…
3
votes
3 answers

Applying least privilege to database connections

I've noticed that most FOSS applications (Wordpress, for example) only uses a single set of database credentials that have been granted all permissions. This seems like it violates the principle of least privilege. In writing such an application,…
Matty
  • 33,203
  • 13
  • 65
  • 93
3
votes
2 answers

Cannot find the symmetric key in SQL Server 2008

I have a permissions issue with regard to using a symmetric key under a specific user name when a stored procedure is executed. Despite running GRANT CONTROL ON CERTIFICATE::myCert TO myUser GRANT VIEW DEFINITION ON SYMMETRIC KEY::myKey TO myUser I…
ComfortablyNumb
  • 1,448
  • 10
  • 37
  • 64