Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [role]

A set of permissions.

0
votes
0answers
30 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 ...
0
votes
2answers
30 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
18 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
31 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
1answer
68 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
32 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 ...
0
votes
0answers
13 views

postgresql 9.6 & pgadmin4 different roles

I can't figure out why I have 2 different role windows and what it means. Above all, I have no idea how it happened... Some users have 2 tabs : others 7 : And as far as I know, they belong to the ...
1
vote
1answer
33 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
88 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
37 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 ...
0
votes
0answers
49 views

How to get environmental properties during a row security policies?

I am developing a REST AOI backed by PostgreSQL. Users of the API must pass a session token in the Authorization header. For example: Authorization: Bearer fcda6eca-71c4-456c-a4df-4e398b11fa00 This ...
1
vote
1answer
43 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
481 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
294 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
21 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
296 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
82 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 ...
1
vote
1answer
39 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
0answers
31 views

How to write complex expressions while creating a row-level security policy in Postgresql

I've got a table structure where A has records with an owner ID, B links to A, and C links to B. I want to restrict access to rows in C by the ownerId, which is set as a setting on the session in the ...
0
votes
0answers
23 views

How to create a user in postgres that has a access to particular schema

I want to create a user in the postgres database which has read access to a particular schema in the database. how can I create that? eg:- if in case a database has 3 schemas public, test and test2. ...
0
votes
1answer
119 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
43 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
859 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
114 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
87 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
70 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
173 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
27 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
38 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
2answers
118 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
112 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
71 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
43 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
242 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
203 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
585 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
240 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
374 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 ...
0
votes
0answers
48 views

How to define a role in T-SQL

My goal is to create a user-defined database-level role for a contained database. I want that role to have the same permissions as db_owner, but without the ability to do anything with a single ...
0
votes
0answers
60 views

Should the DBA role be used?

In accordance with least privilege, is it considered best practice for DBAs to utilize the default Oracle DBA role, or should a custom DBA role be created that doesn't have 202 system privileges? I ...
1
vote
1answer
109 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
135 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
80 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
457 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
55 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
1k 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
1k 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 ...
2
votes
1answer
139 views

Unable to add db_datawriter to user defined role

I want to grant a user defined role, read and write permissions to the entire database and add users to it. I was unable to do this using GUI. So I tried the solution given at the link - https://www....
0
votes
1answer
316 views

Obvious reason Postgres Users can't read a table?

Situation: a PG user (non superuser, inherits from parent role) that is a member of a Role/Group cannot read from specific tables even though these Object Privileges have been specified: DBName - ...