FairCom provides basic and advanced security models for authorization. This document describes the advanced authorization model (RBAC), which is used by all FairCom servers starting with the 26.10 release. See the Basic Authorization Model topic for details on FairCom's security model prior to the 16.10 release.
FairCom's implementation of the Role Based Access Control (RBAC) Security model constrains authorization based on accounts, roles, privileges, privilege hierarchy, and separation of duties. By default, roles have no privileges. Object privileges must be assigned to roles which are then assigned to individual accounts so that the role regulates which actions the account can take. Privileges include being able to select, insert, update, and delete records in a table as well as being able to create, alter, and delete an object. Privileges apply to all objects including accounts, groups, databases, tables, indexes, views, sequences, synonyms, procedures, functions, triggers, and jobs.
In addition to allowing privileges to be granted to accounts, FairCom's implementation of RBAC allows privileges to be denied to accounts as well. Denying a privilege guarantees that an account cannot receive a permission even if you assign a role to an account that would normally grant that permission.
Privileges granted to administrator accounts at the highest layers also grant full access to the privileges at lower layers. Privileges granted at lower layers provide finer access control than the higher layers.
Database security is implemented in the following layers:
Privileges
RBAC follows the least privilege principle, meaning an account can do nothing until it has been assigned to at least one role with at least one privilege. Privileges grant accounts access to certain objects or actions. A privilege can be permissive or restrictive. A permissive privilege is a permission. A restrictive privilege is a denial. To authorize an operation, the server combines all privileges and then overrides them with all denials to ensure the least privilege principle is followed. The privileges have been purposefully named so that their function can be understood intuitively. For a more detailed explanation of a privilege's function, refer to the privilege hierarchy.
Note A permission that includes no privileges does not permit anything and a restriction that includes all privileges does not restrict anything.

Permission
A permission allows an account to perform specified operations on a specific type of object, such as read a record or execute a procedure. Permissions are cumulative, meaning that an account can have multiple permissions assigned to it and each one grants an additional ability using Boolean OR logic. A server contains many types of objects and each object has predefined privileges. Some objects are hierarchical and have child objects. For example, a database object contains table objects and tables contain records. Each privilege has a predefined scope that applies to an object and its descendants. For example, the manageTable privilege applies to the table object and all its children, including its indexes, triggers, and records. The deleteAnyRecordInOneTable privilege applies only to a table's records.
Denials
A denial denies an account from performing specific operations on a specific type of object, such as denying all access to records or denying all but read access. Restrictions override permissions. Restrictions are cumulatively restrictive using Boolean AND logic and are applied after permissions have been accumulated. For example, an account with a read-only restriction on a table cannot insert, update, or delete records in that table even when insert, updated, and delete privileges have also been granted to that account. Restrictions also eliminate non-overlapping privileges. For example, assigning the read-only and read-insert-only privileges to an account eliminates the insert privilege and result in the read-only privilege. Assigning completely non-overlapping privileges to an account results in no privileges.
Restrictions can also be recursive or shallow.
Recursive - A recursive restriction denies a manage-level privilege and its descendants, meaning it denies all privileges below it in the privilege hierarchy.
Shallow - A shallow restriction denies only the specified privilege.
Removal
A removal unassigns a privilege from a role. If a privilege permits an action, it removes the permission. If the privilege denies an action, it removes the denial. When a privilege is removed from a role, the role becomes neutral about the privilege. It does not permit or deny it.
Assigning roles to accounts
Privileges are granted to accounts by assigning roles to them. Administrators assign specific privileges to roles and then assign those roles to accounts. An account can be assigned many roles, and one role may be assigned to many accounts.

Built-in roles and accounts
Account roles
Each account is automatically assigned a role named after the account at the time of its creation. This role cannot be renamed or removed except by deleting the account. Assigning privileges to this personal role is the standard way to grant permissions exclusively to a specific user. When an account creates an object, it is not given ownership of the object. Rather, the server automatically assigns the object's "manage" permission to the account's built-in role, allowing it to perform all non-security actions on the object.
Because this role is automatically named after the account name, you cannot create a role that matches an existing account or an account that matches an existing role.
"all_accounts" role
Every account is automatically assigned the built-in role named all_accounts. When a privilege is assigned to this role, all accounts receive those privileges. This means the all_accounts role sets the baseline permissions and denials for all accounts. By default, the all_accounts role contains the connectToAnyServer permission. To revoke this permission, remove the connectToAnyServer permission from the all_accounts role.
"guest" account
The built-in "guest" account allows password-free access to the server. It is always assigned to the all_accounts and guest role. To ensure it cannot perform any actions, the guest role is recursively denied the "manageServer" and "manageServerSecurity" privileges by default.
Reading Security Metadata
An application may have rules that are too complex to be managed completely by the database. It may also need to manage security for data that comes from data sources that cannot provide TLS, RLS, and CLS.
An application account can have privileges to be able to read the metadata for SLS, TLS, RLS, and CLS. It can use this information to help it manage security for its users. Thus, the database can be used as a metadata store for security information.
Storing and retrieving security information from an ordinary database is fundamentally insecure. Security information must be encrypted at rest and in transit. It also must be protected by strong authentication and authorization controls. A database that is specifically designed to store and process TLS, RLS, and CLS metadata becomes a great location to store and retrieve this security information.
RBAC Security Administration Scenarios
FairCom security administration is based on the separation of duties principle. Security administration is separated from database administration. Security administration can be subdivided into account and role management. Account and role management can be further subdivided to manage specific accounts or roles. Specialized security manager roles can also be created, such as help desk operators who can only reset passwords, account stewards who manage specific accounts, account cleaners who delete unused accounts, and role stewards who manage the privileges assigned to specific roles.
The following roles can be created and assigned to accounts for specific users and applications.
Security Administrator
A Security Administrator can manage all aspects of the server's security, which includes managing all accounts, roles, privileges assigned to roles, and roles assigned to accounts.
The security administrator role has the manageTheSecurityOfAnyServer privilege.
Account manager
An account manager fully manages all accounts, but not their roles and privileges. An account identifies a user or application and controls how it authenticates.
The account manager role has the manageAnyAccount privilege.
Users and applications with this role can:
- Create, modify, delete, and describe accounts
- Reset the password on all accounts
Users and applications with this role cannot:
- Manage the roles assigned to accounts
- Manage the privileges assigned to each account's built-in role
Role manager
A role manager fully manages all roles, privileges, and their assignment to accounts. Roles control what users and applications are authorized to do. A role manager is limited to using existing accounts and cannot modify or delete accounts.
The role manager role has the manageAnyRole and describeAnyAccount permissions.
Users and applications with this role can:
- Create, modify, delete, and describe roles
- Assign privileges to roles
- Assign roles to accounts
- Describe all accounts
Users and applications with this role cannot:
- Create, modify, and delete accounts
Account Steward
An account steward manages specified accounts, but not their roles and privileges.
The account steward role has the manageOneAccount permission for one or more specified accounts.
Users and applications with this role can:
- Create, modify, delete, and describe specified accounts
- Reset the password on the specified accounts
Users and applications with this role cannot:
- Manage the roles assigned to accounts
- Manage the privileges assigned to each account's built-in role
Account cleaner
An account cleaner deletes unused accounts, such as the accounts of a user who is no longer employed by the company. This role may be assigned to help desk personnel or to an HR application account that deletes accounts.
The account cleaner role is prevented from deleting highly privileged accounts, such as administrators, to prevent an attack that locks out all users except for the attacker.
This role has the dropAnyAccount and describeAnyAccount permissions.
- Users and applications with this role can both describe any account to determine if it should be deleted and can delete it.
This role has been denied the dropOneAccount and describeOneAccount privileges for each protected account.
- Users and applications with this role cannot reset the password for denied accounts.
Role Steward
A role steward manages the permissions assigned to specified roles and assigns them to any account.
The role steward role has the manageOneRole and describeAnyAccount permissions for one or more specified roles.
Users and applications with this role can:
- Create, modify, delete, and describe the specified roles
- Assign privileges to the specified roles
- Assign the specified roles to accounts
- Describe all accounts
Users and applications with this role cannot:
- Create, modify, and delete accounts
Role Builder
A role builder manages specified roles and their privileges, but they cannot assign roles to accounts.
The role builder role has the manageOneRole permission for one or more specified roles.
Users and applications with this role can:
- Create, modify, delete, and describe the specified roles
- Assign privileges to the specified roles
Users and applications with this role cannot:
- Assign roles to accounts
- Create, modify, delete, and describe accounts
Password Resetter
A password resetter can reset the password on all accounts except for specifically excluded administrator accounts. This role may be assigned to help desk personnel or an HR application account that automatically resets passwords.
The passoword resetter role has the resetThePasswordOfAnyAccount permission.
- Users and applications with this role can reset the password for any account.
The passoword resetter role has been denied the resetThePasswordOfOneAccount privilege for each protected account.
- Users and applications with this role cannot reset the password for denied accounts.
Help Desk Operator
A help desk operator may have the roles of an account cleaner and password resetter.
Security Specialist
A security specialist manages a subset of accounts or roles with a specific set of actions tailored to meet a security management use case.
If the security specialist has limited permissions, you may assign the role any combination of the following permissions:
alterOneAccountdescribeOneAccountdropOneAccountresetThePasswordOfOneAccountcreateAnyRolealterOneRoledescribeOneRoledropOneRolelinkOneRoleWithAnyAccountlinkOneRoleWithAnyPrivilege
If the security specialist has many permissions, you may assign the role any combination of security management privileges to give them a broad set of abilities and the deny them the few specific privileges they cannot have:
Permit some combination of security management privileges:
manageAnyAccountmanageAnyRolelinkAnyRoleWithAnyAccountlinkAnyRoleWithAnyPrivilege
Deny some combination of specific security privileges:
alterOneAccountdescribeOneAccountdropOneAccountresetThePasswordOfOneAccountcreateAnyRolealterOneRoledescribeOneRoledropOneRolelinkOneRoleWithAnyAccountlinkOneRoleWithAnyPrivilege