We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [role]

A set of permissions.

Filter by
Sorted by
Tagged with
1
vote
1answer
27 views

User is in multiple Active Directory groups with multiple roles in database

I have a user that is a member of multiple Active Directory (AD) groups. Within SQL Server 2012, these AD groups have been assigned to different database roles. This user is not getting the correct ...
0
votes
0answers
9 views

How to grant a group to another group in Redshift

I am trying to build a matrix of roles to dynamically change priorities for our users. In other database I would be doing something like: create role role1; create role role2; grant role role1 to ...
2
votes
1answer
86 views

Is it safe to delete the default “postgres” role?

I'm trying to understand if it's okay for me drop the "postgres" role, or at the least, remove it as the superuser. Thanks!
0
votes
0answers
33 views

What are all the privileges granted to the ddl_admin role? [on hold]

If I wanted to GRANT permissions that mimic the ddl_admin role, which permissions would I need to GRANT?
2
votes
0answers
37 views

Error in ALTER DEFAULT PRIVILEGES

I'm trying to create a new user in AWS Aurora Postgres DB. Create user worked fine and I can login to the DB using that account. granting permissions to it isn't. First: GRANT ALL on ALL tables in ...
1
vote
0answers
33 views

If a Login is not granted the db_ddladmin role on a database, but is individually granted CREATE VIEW on it, will they still be denied?

Since SQL Server permissions work as "deny first", I was wondering if that applies downward to individual permissions that are granted, if the parent permission isn't granted e.g. db_ddladmin is not ...
0
votes
0answers
30 views

Listener on database creation for PostgreSQL

I'm trying to achieve a set of functions/triggers to define database (catalog) level read-only role for every database created. The way I thought of doing this is to create a listener (trigger/event ...
0
votes
1answer
29 views

Why is MongoDB user with the only privilege as “find” able to insert and update collection?

I want my user to have only find action privilege on a specific collection. However, when I create the user with the privilege, restart the mongod server and run the mongo shell again with -u -p and --...
0
votes
0answers
39 views

Verify if user has replication permissions in Postgres

I am working on streaming changes in my Postgres database using Debezium using the Postgres connector offered by Postgres. However, for the connector to work, the user must have REPLICATION and LOGIN ...
0
votes
0answers
14 views

Created an admin super user on Postgres, but logging in tells me I need an admin database [duplicate]

I'm running Postgres 9.6 on Mac High Sierra. I ran these commands to create an admin super user ... psql -d postgres -c "CREATE USER admin WITH PASSWORD 'password';" psql -d postgres -c "ALTER ...
3
votes
2answers
41 views

How can I determine which permissions needs to be assigned to the newly created login?

We have 4 databases which contain different procedures and functions. Till now the actual application can access the database using only the sa account, now I would like to change the app to use ...
0
votes
2answers
22 views

Postgresql - roles without linux accounts?

Basic question: what I'm reading describes how to create linux users in parallel with postgresql roles. However, I don't see the value in creating any of these users in linux - I just want to create ...
2
votes
2answers
51 views

How to find out all the permissions that belong to a specific server/ database role in SQL Server? [duplicate]

I can separately query all the server or database level permissions, but I want to know other thing. What server role do the given permissions exactly belong to? For example I want to see all the ...
0
votes
0answers
56 views

Can I get pg_dump to simplify the ACL commands?

When using pg_dump with a database with non-default schema foo like so: pg_dump --schema-only --schema='foo' -U myuser -d mydb -h myhost -W > mydb.sql The SQL dump file is full of these seemingly ...
0
votes
1answer
28 views

MySQL 8 roles - I'm probably missing something obvious

I'm trying to use roles in MySQL 8, and failing. I have read the documentation and as far as I can tell, I'm doing it right. Since this is a 'hello world' level attempt, I assume I'm missing something ...
1
vote
0answers
24 views

SQL Server Permissions for Intellisense for an Active Directory User? [duplicate]

I have created an Active Directory Group and created it as a user, we'll call it "AD SQL", in my DB. I can successfully login in using Active Directory Authentication and read/write. However, ...
0
votes
0answers
8 views

Details about existing roles and users in azure sql database

I would like to get details of all users existing in a sql server DB and the respective roles they are part of and the permissions granted/denied for the a role/user. what is the best way to get this ...
0
votes
1answer
79 views

How to grant permissions to database but restrict to certain schemas?

I am new to database administration and work within a small team of data analysts trying to modernise. We have recently set up an Azure SQL DB server we are accessing using SQL Server Management ...
0
votes
0answers
28 views

PostgreSQL: allow user to list only the owned tables

I want to disable users from seeing the names of tables that he doesn't have access to. So the goal is to have several tables and several users that can make \dt and see only tables they have access ...
1
vote
1answer
271 views

Naming Convention for Login, User and Roles? [closed]

What are the Naming Conventions for a Login, A database User and a Database role? Is there any best practice to follow?
0
votes
1answer
614 views

How to grant Unmask permission to a user at table level and column level in sql server?

How to grant unmask permission to a user for one particular table and to one particular column within a table? For example, if in table1 if column1 and column2 is masked and in table2 if column3 and ...
0
votes
5answers
518 views

Create Role or Create user

PostgreSQL version : 11.2 OS platform : RHEL 7.6 I am new to PostgreSQL. I have a CRM application whose data I want to store in my 11.2 PostgreSQL Database. The Database name will be : crm_db The ...
0
votes
1answer
858 views

SQL Server: Remove public role privileges from login account

I've got a SQL Server (2012) and I need to create a read-only user. At first, I was just going to create a user, and then give them the db_datareader role. But while looking around, I saw the public ...
1
vote
0answers
48 views

How to switch session role securely?

I'd like to setup a service through which my users can submit SQL queries to a database wherein I store some data. Users are assigned to organizations, and I've setup views that provide read access ...
0
votes
1answer
558 views

Cannot revoke permissions or drop user in PgSQL AWS RDS

I want to drop the user asd from the DB. So, I've got two DBs: foo and bar and the user apparently has dependencies in both. The DBs have been created from the root user postgres, but all tables and ...
1
vote
2answers
2k views

SQL Server database level roles for creating tables

Is there a way to create or change a special role for creating tables? Our software developer team has db_datareader and db_datawriter roles but they can not create new tables. I read this article ...
0
votes
1answer
339 views

Postgresql createrole permission for user

I created a role with createrole flag, but users in this role trying to create users fail with permissions denied. Do I need to assign the createrole to each user instead of just the role (group)? my ...
-1
votes
1answer
37 views

MongoDb User with readWrite can create database

I dont understand why my user can create data base. The user "toto" with role "readwrite" on DB1 can create a DataBase (db2). And with the same account "toto" I can create a user and affect this user ...
1
vote
2answers
592 views

Is it best practice to revoke server permissions to the server “public” role on SQL Server instances?

We have evaluated the Microsoft "best practice" policies (located at C:\Program Files (x86)\Microsoft SQL Server\number\Tools\Policies\DatabaseEngine\1033) on each of our SQL Server instances (example ...
1
vote
1answer
34 views

Database Reader Role with the ability to Create, View and execute stored procedure's and view's in sql server

I will need to allow report writers on the Subscription database to be able to view the table, create alter and delete stored procedure and views. Since it is a transactional replication they cannot ...
1
vote
1answer
35 views

How can you create a ROLE which isn't allowed to do anything?

I want to create a role which by default isn't allowed to do anything. It has basically zero permissions. Starting from such role, I want to grant the minimal set of permissions. How can you make a ...
1
vote
1answer
730 views

what is the difference between db_datareader and db_denydatawriter?

I am trying to assign a SQL Server database role to a user who just needs to be able to see data across all tables. I was wondering what is the difference between db_datareader and db_denydatawriter? ...
2
votes
1answer
62 views

Only allow access to a table via a function, not directly via queries

I have a table t and some functions which access t. For example: create function list_t() returns setof t as $$ select * from t; $$ language sql stable; Is it possible to define role permissions ...
1
vote
1answer
128 views

Implement row-level security as a user table or millions of roles? [closed]

PostgresSQL 10.4 is our backend database for a consumer-facing app with millions of users. When implementing row-level security so each user can only access their own data, is it best practice to use ...
9
votes
1answer
604 views

Grant deny permission stacking

For the role db_denycustomer, I want only the column code of the customer table to be SELECTable, and none of the others. So I did this: DENY SELECT ON dbo.customer TO db_denycustomer GRANT SELECT ON ...
4
votes
1answer
2k views

Purpose of SQL Server Application Roles

I've been reading up on application roles in Microsoft SQL server. It seems an application role is like any other role in that permissions on securables can be granted to an application role, however, ...
-1
votes
1answer
28 views

Mongodb restriction on update to only allow “$push” operator

Mongodb V 4.0 I want to restrict a user's role by only allowing new inserts to the collection. Either as a new document, or as an append to the document. I don't want the user to be able to update(...
5
votes
2answers
451 views

Why public is not mentioned as a fixed role in system database in SQL Server?

While running select * from sys.server_principals for public role, in the column is_fixed_role is shown 0 But the documentation states that it is a fixed server role. Documentation Link Although ...
0
votes
1answer
388 views

MySQL privileges for roles aren't applying to users?

I've done what I consider to be sufficient research with no answers to justify posting this question here. I am attempting to grant users permission to execute certain stored procedures. And because ...
2
votes
1answer
183 views

Automatically invoke `SET ROLE` when connecting to PostgreSQL

The short version first: Is it possible to have a new PostgreSQL database connection automatically invoke SET ROLE with a specific role, whether by configurations on the connecting role (using ALTER ...
0
votes
1answer
868 views

Reset password expiration date to NULL in PostgreSQL

We are cleaning out/standardising DB user/application accounts on the system that has a mix of accounts that were created using different commands at different times by different individuals. We have ...
1
vote
1answer
116 views

Roles and Schduled jobs

I have some instances were some of the BI teams can create their own schduled jobs in the sql agent. However i also have a couple house keeping jobs i don't want them to interfere with. Can I create ...
7
votes
1answer
1k views

How to GRANT permission to execute stored procedure?

I have an AD group that is setup as a Windows Authenticated SQL Login on my SQL Server. On DatabaseA it has the db_datareader and public roles. So the users of this AD group only have read access to ...
2
votes
1answer
331 views

What is the equivalent of SQL Server's db_datareader/db_datawriter in PostgreSQL?

I'm porting an application from SQL Server to PostgreSQL. Most of this is simple as the application only really does simple selects, inserts and updates. However I need to create a user to access the ...
2
votes
3answers
333 views

Why shouldn't user-defined database roles be members of fixed roles?

I'm redesigning security setup in our database. I was in process of defining certain user-defined roles and - as I find it handy - on the other monitor I was browsing documentation to make sure I don'...
1
vote
1answer
176 views

Object Level Security

I have a database that will be shared across multiple related types of applications for different users. I want to be able to restrict each database user to essentially have full control over their ...
1
vote
2answers
413 views

how to use is_srvrolemember to list all server roles of a user

For dealing with server permissions I am currently using a procedure called sp_SrvPermissions V6.0 by Kenneth Fisher thank you Kenneth, however, while running a profile trace I often see the ...
2
votes
1answer
29 views

Enforce conditions on queries

Currently I have a simple schema, a sites table and an items table. Sites own many items, items has a siteId column to store the reference of the site which owns it. I'd like to be able to enforce a ...
1
vote
2answers
87 views

How do I Configure Per Database Roles for PostgreSQL?

The default for PostgreSQL is that roles are created per cluster not per database. I would like to have per database roles. I could have sworn I once read about a way to set that up but now I can't ...
0
votes
3answers
169 views

Setting up a simple “permissions architecture” in PostgreSQL

I host the databases of several clients. For each database dbname, I currently have a dbnameusers role that I grant to the users of that client. I would now like to have read only "sub roles". I ...