11
votes
Accepted
How to prevent a login from 'listing' a table or view definition in PostgreSQL?
The documentation to the rescue:
UPDATE
[...]
For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially ...
2
votes
Accepted
Disallow superusers and single-user mode in POSTGRESQL
You will find that you need superuser access for certain tasks, e.g. CREATE EXTENSION.
Vieving database metadata is not a security problem. Just because you know that there is a column with credit ...
2
votes
Accepted
Operation level authorization in PostgreSQL
You can do this with views. The columns of the view must be given names, they can't be specified in the functional form.
create view employee_agg as select count(*), avg(salary) from employee;
grant ...
2
votes
Accepted
Postgres 13 - Grant to Active Directory Groups?
No. All roles have to be created with CREATE ROLE in the database.
The existence of the role in the database is necessary, because it is associated with permissions in the database (authorization). ...
1
vote
Create Sequence Permission for Postgres
From this answer, an example of how to do this with an event trigger is
CREATE OR REPLACE FUNCTION check_ddl_event_user()
RETURNS event_trigger
LANGUAGE plpgsql
AS $$
BEGIN
IF (SELECT current_user)...
1
vote
Permission for business logic layer & application
Database engines have no standardized access layer with enough resolution to allow direct use of the database from client apps.
The databases locking mechanism and indexing also have to be taken into ...
1
vote
Stored procedure runs fine when executed manually but fails in scheduled job
Please add more details.
I assume T-SQL job step type here. If you use something else (cmdexec, SSIS, Powershell), then let us know.
Agent service account is always sysadmin with the connection it ...
1
vote
Stored procedure runs fine when executed manually but fails in scheduled job
The probable reason I can think is when u execute manually it might be because you are executing with login with privileges or access to execute that proc.
However sql agent job might be using the ...
1
vote
How to access Multiple DB2 Relational Databases In A Single Query
One way you can achieve this is via federation. In short words, if you want to access db_b from db_a, you catalog db_b in instance of db_a. You then create nicknames in db_a for the tables in db_b ...
1
vote
Accepted
How to use mysql_plugin utility?
The .ini needs to contain the plugin followed by the components.
The document Authentication Plugin - Unix Socket hints that the component name is unix_socket.
So the correct contents of the file ...
1
vote
Authorization dbo maps to a user with an old machine name
It seems the database was created/restored/attached by a Windows account user that no longer exists. Change the database owner to a valid existing login using ALTER AUTHORIZATION
ALTER AUTHORIZATION ...
1
vote
Designing a database structure for a permissions system
"... the yellow tables are arrays so that every user can have multiple ..." -- Good.
Restricted access should be in the application layer. No user should be able to write arbitrary SQL.
Dates ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
authorization × 35postgresql × 12
mysql × 8
authentication × 8
sql-server × 7
permissions × 7
security × 7
db2 × 3
role × 3
join × 2
stored-procedures × 2
sql-server-2017 × 2
view × 2
users × 2
application-design × 2
row-level-security × 2
oracle × 1
performance × 1
database-design × 1
sql-server-2008 × 1
sql-server-2008-r2 × 1
backup × 1
mongodb × 1
sql-server-2005 × 1
restore × 1