Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [role]

A set of permissions.

0
votes
0answers
6 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
43 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
25 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 ...
0
votes
1answer
70 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
248 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
110 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
154 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
38 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
0answers
253 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
172 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
119 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
34 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
252 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
33 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
279 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
44 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
91 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
541 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
644 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
24 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
362 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 ...
1
vote
1answer
259 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
73 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
362 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
56 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
950 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
199 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
149 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
104 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
275 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
54 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
143 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 ...
0
votes
1answer
139 views

How to create role “read” in MongoDB?

Hy everyone, I'm trying to create user which can just read from database but when I try to do that and insert something into the database I succeed:
2
votes
2answers
88 views

How should I be using Users and Access Roles in MongoDB?

The documents are confusing me a little bit and I'm not finding any answers on here or google. I'm using my own auth via passport-local-mongoose, so I don't need to use mongo's auth at all. The docs ...
1
vote
1answer
23 views

Granting Roles on Group Of People

Is there anyway to grant specific roles on group of people such as : Grant SELECT ON Jsmith To (SELECT user_name FROM dba_users); However, this doesn't work. Thanks in advance,
1
vote
2answers
59 views

Is it possible to grant role privileges to a user by document (not collection) in MongoDB?

I am working on a database for investigation purposes. I want to make some of that information public but other pieces of information are highly confidential. I want to create a user and grant ...
0
votes
1answer
355 views

created a user with clusterMonitor and dbOwner role, but db.getRoles() shows enableSharding role

I created a user with full privileges in it's own database (dbOwner) and read-only access to administrative commands (clusterMonitor) use customerdb (mongod-3.4.7) customerdb> db....
1
vote
0answers
275 views

Problem with creating SSAS Roles using Powershell

I'm using powershell to (mass) delete and create roles in SSAS. Deleting is done like this : $rolecount = $db.Roles.count for ($i = 0; $i -lt $rolecount; $i++) { Write-host ($db.Roles....
4
votes
1answer
764 views

Postgres 10. Hide users/roles from other users

I have a postgresql 10 installed and I want to hide the name of users/roles to other users. I searched through other posts and somebody suggested this: REVOKE SELECT ON pg_catalog.pg_authid FROM ...
0
votes
1answer
293 views

Sybase Database : least permission/roles to extract ddl

I am currently using Sybase Central 15.x. In which I have a database, a login and a User. Here I need to give permission(s)/role(s) to a user by which it able to extract ddl of database. There I found ...
0
votes
1answer
468 views

PostgreSQL Role Inheritance behavior in AWS RDS [duplicate]

I was familiarizing myself with how PostgreSQL (9.6) role management works and ran into a case that seemed to go against my understanding of the documentation. I have an RDS instance and a master ...
1
vote
1answer
122 views

How can I create postgres users for employees that have limited access?

I want to create postgres users for our staging + production databases that allow the users limited access to the tables. I want the users to have read only access to ALL tables except messages &...
0
votes
3answers
166 views

Prevent Privileged User from Denying Access to SA

I have to set up a system where UserA has almost full control over a database (not the server), except for one table that's used by sa, and so sa will always need access to this table. So far I have: ...
1
vote
2answers
83 views

Database Roles Security: In SQL Server architecture where does permissions are evaluated in RE or SE or Access methods

I got a question if i create a login and database user for a database named TEST, and i have given permissions to user as db_datareader only. 1) Where does this permission evaluated when a user ...
6
votes
1answer
538 views

How to GRANT object permission to a user defined server role?

I want to create logins that are granted permission to access all user databases view all definitions select all records of all tables To me it seems to be too much overhead to assign the login to ...
0
votes
1answer
64 views

Row-based Permission in SQL Server Newbie Question

I am relatively new to this( Database, general security issues) , so I may be over-complicating this. I have a database containing student grades . I want to design a view in which I restrict access ...
0
votes
1answer
2k views

Change owner of all schema objects

I want to change the owner of all objects in a schema. To do this I use the following function: CREATE OR REPLACE FUNCTION chown(in_schema VARCHAR, new_owner VARCHAR) RETURNS void AS $$ DECLARE ...
0
votes
3answers
2k views

Grant a database role in current database with permission to execute a SP in msdb

I have created a role in my current SQL Server 2012 database with db_datareader, db_datawriter, and execute permissions. A procedure in the current db calls sp_start_job in msdb. How can I grant ...