Questions tagged [role]

A set of permissions.

Filter by
Sorted by
Tagged with
0 votes
2 answers
46 views

Cannot alter created role

I am fairly new to SQL. I use microsoft sql server management studio. I used Master database. Created a server role. But when I try to add members to the role or grant it permissions it says it doesn'...
0 votes
0 answers
214 views

"no schema has been selected to create in" even after opening up postgres permissions

diesel migration list Failed with: no schema has been selected to create in This is the error I'm trying to solve. I recently made some changes to roles and permissions in Postgres, and now my diesel ...
  • 307
0 votes
1 answer
33 views

Restrict access to certain tables for users who have DBA roles?

I have an Oracle Database which includes many users and some of them have DBA roles. The thing is, DBA's shouldn't delete any records from SYS.AUD$ table. Is there a way that i can achieve this?
0 votes
1 answer
16 views

Make all users within group role inherit permissions

I have a group role that consists of around 1,000 users. Those users do not inherit group role permissions, and I would like to make them all inherit them instead. What would be the way to do it ...
0 votes
1 answer
58 views

Azure SQL Vulnerability assessment error

In our SQL Managed Instance database, we created a user-defined database role and added 20 users to it. Now, during scanning by Microsoft Defender for Cloud, we are getting the following error/warning:...
  • 181
1 vote
1 answer
57 views

Flattened view for multi-role permission system

I'm currently working on a multi-role permission system for one of my projects, my database (postgres) tables are setup like this: user id username email … user_role id user_id role_id role id ...
0 votes
0 answers
30 views

RBAC Data Model Design

I'm trying to implement roles and permissions for an application I'm working on, from my understanding its an RBAC system. There are Users, Sites, and for each site a user can have different ...
0 votes
2 answers
37 views

Grouping user into Role to access FDW table

Recently I setup Forward Data Wrapper. Here is what I do: CREATE SERVER foreign_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host '192.168.125.1', port '5432', dbname 'template1 '); IMPORT ...
  • 77
1 vote
2 answers
53 views

setting search_path to role doesn't seem to work in postgres

I've created a backend api that connects to postgres and performs various queries. I've created a specific user (role + can login privilege) for that backend api: backend_api_user I've also dropped ...
0 votes
0 answers
437 views

pg_dump permission denied for relation error for owner user

I am attempting to dump out a PostgreSQL database with pg_dump: /usr/bin/pg_dump -f /home/crmpicco/rfc_754622.sql -F c -x -E UTF8 -b --disable-triggers -U root -h tillman.ff1lvb.us-west-2.rds....
  • 145
0 votes
1 answer
129 views

How to give Read_write users access to foreign tables imported through foreign data wrapper?

I had a question regarding the extension postgres_fdw. I am trying to use postgres_fdw to import foreign tables from DB A to DB B. These databases are on the same host. In Database B, I have a set of ...
0 votes
1 answer
26 views

Do Postgres Roles carry over from Databases if Databases are in the same server?

If I am creating a new Database on the same hostname/server, Will the roles/users carry over? Or will I have to create them again with new names and passwords? I see roles/users listed as server ...
0 votes
1 answer
471 views

How to grant read-write access to a user within the whole database cluster?

I got a database cluster with 1300 databases. I created a role and a user and granted access using the command GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO myuser, so myuser ...
  • 1
2 votes
1 answer
114 views

Error trying to add a login to Azure SQL Special Role 'dbmanager'

Upon running these commands on an Azure SQL instance: CREATE LOGIN test WITH PASSWORD=N'Passw0rd' GO ALTER ROLE dbmanager ADD MEMBER test GO ... I'm getting an error: Cannot add the server principal ...
  • 449
1 vote
1 answer
148 views

Is rdstopmgr an AWS RDS user?

I am running postgres on AWS RDS. RDS creates some users on its own, such as rdsadmin and rdsrepladmin. I am familiar with these However, I also see rdstopmgr, when I query postgres for roles. Google ...
0 votes
0 answers
66 views

Unable to drop a user in AWS Redshift

I want to drop user foo from an AWS Redshift db DROP USER foo; ERROR: user "foo" cannot be dropped because some objects depend on it DETAIL: 1 object in database bar 1 object in database ...
  • 181
1 vote
0 answers
60 views

Default roles ticked when creating new login through SSMS GUI

When creating a new login via the GUI: In the User Mapping section, certain databases will have some roles pre-ticked in the Database Role Membership section. What controls this behavior? It's ...
1 vote
2 answers
355 views

unable to drop user in PostgreSQL 12.4

I am unable to drop user as I am getting default privileges error. postgres=# drop user xyz; ERROR: role "xyz" cannot be dropped because some objects depend on it DETAIL: owner of default ...
4 votes
1 answer
416 views

How to revoke SA permissions that seem to be "stuck" to a login?

Apologies in advance if I don't use some terminology correctly here. I'm not a DBA but I've been temporarily forced into the role. I've inherited an application that runs on SQL Server 2016 ...
0 votes
1 answer
323 views

Proper roles for a backup-only user on PostgreSQL

I am working on new processes and policies for my PostgreSQL databases when they are first created, and I am trying to define what role attributes are necessary for a role specifically used for ...
  • 37
0 votes
1 answer
2k views

Create readonly user in postgresql

Using pg 13.4, created a readonly user reader for database abc, via: CREATE ROLE reader WITH LOGIN PASSWORD 'psssswwwd' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL 'infinity'...
  • 183
-1 votes
1 answer
100 views

What is the benefit of application roles instead of SQL Server authentication in SQL Server?

I have a database that is used by an application. This application implements all the business logic and control what a user can do according at its privileges. I want to avoid users can access to ...
0 votes
1 answer
195 views

ALTER permission on database allows creation of security principals

It appears the ALTER permission granted at the database level allows the principal to which it is granted, to create security principals in the database. Consider the below example: /* setup database *...
  • 1,581
0 votes
1 answer
464 views

SQL Server User permissions-Hide all tables and give/show access to some views

I am using SQL Server 2019. I have gone through some questions here and not found an answer. I am trying to not to show some tables (with a certain Schema e.g. Structure) for a SPECIFIC user in the ...
0 votes
0 answers
46 views

Creating sql server custom database role that only allows reading some columns and nothing else

I want to create an sql server Custom Database Role which only allows reading some columns of some tables, and nothing else. this is my attempt. CREATE ROLE CustomDatabaseRole01 GO GRANT ...
  • 1
0 votes
1 answer
173 views

How do I give my non-Azure app access to Azure SQL Server without whitelisting an ip address?

I have an app that is deployed to Vercel. It is registered in Azure AD and uses AAD for authentication. I added my personal ip to the whitelist, and when I run it locally, everything works as it ...
0 votes
1 answer
42 views

Dropping everything in a database owned by a certain role -- not working

I want to delete everything in a certain database owned by a certain role. I've tried to do and nothing has been deleted. sudo -u postgres psql postgres=# \l List ...
1 vote
1 answer
252 views

Give a user access to restore a database that they are owner on without the server role dbcreator

A outside vendor has a SQL user with db_owner rights on two databases, live and training. From time to time they would like to be able to backup live and restore on top of training. The easiest ...
  • 13
1 vote
0 answers
27 views

"Friendly" role name since Azure PostgreSQL connection via AD security group role requires the AD group name as the username@pgservername?

With PostgreSQL's use of the rolename@pgservername and AD auth requiring the security group name as the role name, any user connecting via AD must know their AD security group name. I'd like to user ...
0 votes
1 answer
2k views

How to add a login to the dbcreator role?

Using SSMS, I'm having trouble adding a new login to the server dbcreator role on my Azure SQL instance. Here's the syntax I'm using: CREATE LOGIN test WITH PASSWORD = 'SuperSecret!' ALTER SERVER ROLE ...
  • 449
1 vote
1 answer
545 views

row level security using roles in SQL Server

I would like to implement row level security on all of my tables. Each table has a column named data_classification that has a list of values. Ideally I would like to create database roles which are ...
1 vote
0 answers
962 views

Create multi-user database schema with roles, permissions, and services

I am in the process of designing a user administration database and I am stuck in the creation of the tables and their relationships, in order to explain myself below I expose the requirements of the ...
1 vote
0 answers
32 views

Azure SQL custom backup role

We are currently running an Elastic Pool within azure to host all our databases. We need to back up these to on-premise as well in case of an emergency, and for it we are trying to use sqlpackage. Now ...
1 vote
0 answers
51 views

Create a specific role in a replicated AZURE SQL database, which is in read mode

Can you give me some help with my Azure Sql, I am having a difficulty with assigning a new role to a database with "geo-redundancy". My current structure is: BD1 in zone_A replicated to ...
  • 11
0 votes
2 answers
311 views

ALTER ROLE on replica

I have a primary server, with a secondary replicating it. I want to change a role from LOGIN to NOLOGIN. I can do this easily on the primary, but the change doesn't replicate to the secondary, and I ...
0 votes
1 answer
596 views

Drop role postgresql

I just inherited an AWS RDS PostgreSQL 12.5 instance (so, no superuser access) and I'm required to do some cleanup and delete a bunch of groups/roles/users. I'm executing the following commands with ...
0 votes
1 answer
991 views

Can't create schema for a db with PostgreSQL

Use psql -U postgres to login. postgres=> CREATE DATABASE mydb; postgres=> \c mydb; You are now connected to database "mydb" as user "postgres". When create schema, got ...
  • 167
1 vote
2 answers
108 views

Create a view in a user database that can access selected system database tables

Using the principle of least privilege, what access should I give to a Role "Checklist_role" that has read permission to a view "MaintenanceJobs_view" in a user database "...
0 votes
1 answer
581 views

Postgres 13 - Grant to Active Directory Groups?

Is it possible to grant an AD group in PG 13 without sorting to creating the group in the database? Similar to how AD groups can be granted directly in SQL Server. The PG server is on a Windows server ...
  • 301
0 votes
0 answers
69 views

Create non-sysdba user that can grant tablespace to other users

I am creating an Oracle role with Admin option Grants so that user with this role assigned, will not be a full sysdba but will be able to create other users and grant them permissions. What I ...
  • 186
2 votes
1 answer
772 views

Adding AD Security group to a SQL linked server

I have a question about adding permissions for a user group on a linked server in SQL Server. I am not a security specialist, so I appeal to everyone. Here is the topo: I have private software that I'...
0 votes
2 answers
511 views

Possible to disable THE postgres role?

Postgresql 9.6, if it matters. We have an audit finding which says that the "postgres" role must not be used at all. After creating a new SUPERUSER role, is it possible to disable role "...
  • 520
1 vote
2 answers
3k views

Can I GRANT SELECT on all schemas in a database?

I need to create role users of which can only read (select) data. I can do it for a particular schema. But I need it to work with all existing and future schemas (existing at least). How can I do it? ...
  • 125
1 vote
0 answers
267 views

Cannot use the special principal 'dbo' when addressing SQLMI risk VA2108

We've just set up a new SQL Managed Instance on Azure, and have restored a database to it for testing. After running an initial Azure Vulnerability Assessment, the results include this: VA2108 - ...
  • 778
0 votes
1 answer
451 views

Postgres view role permissions

I am trying to work out how database roles work. Here is my user case... create role user1 login password 'user1'; create schema authorization user1; CREATE ROLE DEV_ROLE; grant connect, temporary ...
  • 7
0 votes
1 answer
161 views

User cannot select from table when having SELECT permissions if CONTROL is denied

I'm setting up my database on an Azure SQL Server instance. (I know the principal names are terrible, it's just a dry run test) I created a login ("Test"), a user ("Test"), a ...
-1 votes
1 answer
39 views

Allow users to restore prior days DB to view [closed]

Our application backs up DB at end of day to save End Of Day picture. We need to allow users ( Windows domain users) to restore these prior days backups using our app. This needs to done through a ...
  • 1
2 votes
1 answer
298 views

Should roles without login have the connect permission on a database?

I want to create a read-only role in PostgreSQL and use it to assign it to multiple new users, who should have read-only access. It makes sense to me to also grant the read-only permissions to the ...
2 votes
1 answer
121 views

Allow user to GRANT certain permissions to others

I have tried googling this but may well be using the wrong terms... permissions and the like aren't my strong point. What I want to do is first create a role - eg 'Snr_Analyst' - with certain ...
  • 278
0 votes
1 answer
39 views

How to structure MySQL database tables for users and how to handle adding/removing permissions?

I am making a database structure for users, who can become part of a group, and within that group the admin of the group can assign as many permissions to a user as they would like. This part seems ...

1
2 3 4 5 6