Grants vs RBAC model comparison: Linodes example (Limited availability)

The document depicts how legacy grants and RBAC roles and permissions are defined and applied to the Linode API endpoints for Linodes and how their behavior contrasts with one another.

🚧

Identity and Access in Limited Availability

The enablement of Identity and Access to all Cloud users will be done in stages. If you don't see Identity and Access (Beta) in Cloud Manager, it means that the feature is not enabled on your account and you should continue using the Grant-based access control to authorize operations on entities.

In this example, you'll see how the jsmith user access changes:

  1. The user can view a specific Linode.
  2. The user can modify the Linode.
  3. The user becomes the administrator for the Linode.
  4. The user can create new Linodes.
  5. The user can manage the whole account.

1. A user needs access to view a Linode

Objective

  • A restricted user jsmith in an account needs to have the read access to view a single linode123 Linode; no modifications allowed.
  • jsmith can't have any billing permission
  • jsmith can't be allowed to add entities.
  • jsmith can modify their own profile.

Prerequsites

  • The jsmithuser is created in the account.
  • Upon provisioning, jsmith is assigned the following RBAC roles by default:
    • account_oauth_client_admin
    • account_event_viewer
    • account_notification_viewer
    • account_maintenance_viewer

Caveats:

The following endpoints are Internet facing and require no access token; therefore there is no access control:

Setup comparison

Grant setupRBAC setup
  1. An unrestricted user or a user with the Add Linode permission creates the linode123 Linode.

  2. The user grants jsmith Read Only access to the linode123 Linode. Now, jsmith has only Read Only access to the linode123 Linode.

  1. A user with account_admin or account_linode_creator role creates the linode123 Linode.

  2. A user with the account_admin role assigns jsmith the linode_viewer role on the linode123 Linode. Now, jsmith has the following roles assigned:

    • account_oauth_client_admin

    • account_event_viewer

    • account_notification_viewer

    • account_maintenance_viewer

    • linode_viewer for linode123 Linode.

Permission comparison for Linode API

Allowed Linode API operationsGrant system: Triggered grantRBAC system: Triggered permission
Current Linode access settingsRead Only access to the linode123 Linode.linode_viewer role for the linode123 Linode.
List LinodesRead Only on the linode123 Linode (linode123 is the only Linode jsmith gets)view_linode for the linode123 Linode (linode123 is the only Linode jsmith gets)
Get a LinodeRead Only on Linodeview_linode
Additional activityAn unrestricted user triggers a backup or snapshot of the linode123 Linode. This makes
jsmith able to view the Linode backup data.
A user with account_admin,linode_admin, or linode_contributor role triggers a backup or snapshot of the linode123 Linode. This makes jsmith able to view the Linode backup data.
List backups Read Only on Linode- view_linode
- view_linode_backup
Get a backup Read Only on Linode- view_linode
- view_linode_backup
Additional activityjsmith can view configuration profile data.jsmith can view configuration profile data.
List configuration profiles Read Only on Linode- view_linode
- view_linode_config_profile
Get a configuration profile Read Only on Linode- view_linode
- view_linode_config_profile
Additional activityjsmith can view interfaces in the configuration profile.jsmith can view interfaces in the configuration profile.
List configuration profile interfaces Read Only on Linode- view_linode
- view_linode_config_profile_interface
Get a configuration profile interface Read Only on Linode- view_linode
- view_linode_config_profile_interface
Additional activityjsmith can view disks on the linode123 Linode.jsmith can view disks on the linode123 Linode.
List disks Read Only on Linode- view_linode
- view_linode_disk
Get a disk Read Only on Linode- view_linode
- view_linode_disk
Additional activityjsmith can view stats and network transfer stats on the linode123 Linode.jsmith can view stats and network transfer stats on the linode123 Linode.
Get Linode statistics Read Only on Linodeview_linode_stats
Get monthly statistics Read Only on Linodeview_linode_stats
Get a network transfer Read Only on Linodeview_linode_network_transfer
Get monthly network transfer stats Read Only on Linodeview_linode_monthly_network_transfer_stats
Additional activity- An unrestricted user attaches a volume1 volume to the Linode.
- The unrestricted user grants jsmith Read Only access to the volume1 volume.
- A user with account_admin, account_volume_admin, volume_admin, or volume_contributor role attaches a volume1 volume to the linode123 Linode.
- A user with the account_admin role assigns jsmith the volume_viewer role on the volume1 volume.
List a Linode's volumes - Read Only on Linode
- Read Only on the Volume.
*Only linode123 and volume1 are returned.
- list_linode_volumes
- view_volume
*Only linode123 and volume1 are returned.
Additional activity- An unrestricted user attaches the firewall2 firewall to the linode123 Linode.
- The unrestricted user grants jsmith Read Only access to the firewall2 firewall.
- A user with firewall_contributor, firewall_admin, account_firewall_admin, account_admin, or linode_viewer role attaches the firewall2 firewall to the linode123 Linode.

- A user with the account_admin role assigns jsmith the firewall_viewer role on the firewall2 volume.
List a Linode's firewalls - Read Only on Linode
- Read Only on Firewall.
*Only linode123 and firewall2 are returned.
- list_linode_firewalls
- view_firewall
*Only linode123 and firewall2 are returned.

2. The user needs access to modify the Linode

Objective

  • The restricted user jsmith needs to be able to modify the linode123 Linode; but not to delete it.
  • jsmith can't have any billing permission.
  • jsmith can't be allowed to add entities.
  • jsmith can modify their own profile.

Setup comparison

Grant setupRBAC setup

The grant system doesn't have specific permissions that control modification of Linode instances.

Instead of linode_viewer, a user with the account_admin role assigns jsmith the linode_contributor role on the linode123 Linode.

At this point, jsmith has the following role assignments:

  • account_oauth_client_admin

  • account_event_viewer

  • account_notification_viewer

  • account_maintenance_viewer

  • linode_contributor on linode123 Linode

  • volume_viewer on the volume1 volume

  • firewall_viewer on the firewall2 firewall

📘

The linode_contributor role includes all linode_viewer permissions.

Permission comparison for Linode API

Allowed Linode API operationsGrant system: Triggered grantRBAC system: Triggered permission
New Linode access settingsN/Alinode_contributor role for the linode123 Linode.
Update a LinodeN/Aupdate_linode
Boot a LinodeN/Aboot_linode
Clone a LinodeN/Aclone_linode
Launch a DC migration/pending host migrationN/Amigrate_linode
Upgrade a LinodeN/Aupgrade_linode
Reset a Linode's root passwordN/Apassword_reset_linode
Reboot a LinodeN/Areboot_linode
Rebuild a LinodeN/Arebuild_linode
Boot a Linode into rescue modeN/Arescue_linode
Resize a LinodeN/Aresize_linode
Shut down a LinodeN/Ashutdown_linode
Create a snapshotN/Acreate_linode_backup_snapshot
Enable backupsN/Aenable_linode_backups
Restore a backupN/A- restore_linode_backup
- view_linode
- update_linode for the destination Linode
Create a configuration profileN/Acreate_linode_config_profile
Update a configuration profileN/A- update_linode_config_profile
- view_linode
Add a configuration profile interfaceN/A- create_linode_config_profile_interface
- view_linode
Reorder configuration profile interfacesN/A- reorder_linode_config_profile_interfaces
- view_linode
Update a configuration profile interfaceN/A- update_linode_config_profile_interface
- view_linode_config_profile
- view_linode
Create a diskN/Acreate_linode_disk
Update a diskN/A- update_linode_disk
- view_linode
Clone a diskN/A- clone_linode_disk
- view_linode
Reset a disk root passwordN/A- reset_linode_disk_root_password
- view_linode
Resize a diskN/A- resize_linode_disk
- view_linode
Update a Linode's firewallsN/A- update_linode_firewalls
- view_firewall
Apply a Linode's firewallsN/Aapply_linode_firewalls

3. The user needs full access to the Linode

Objective

  • The restricted user jsmith needs to have full access to the linode123 Linode.
  • jsmith can't have any billing permission.
  • jsmith can't be allowed to add entities.
  • jsmith can modify their own profile.

Setup comparison

Grant setupRBAC setup

An unrestricted user grants Read Write access on the linode123.

At this point, jsmith has the following grants:

  • Read-Write on the linode123 Linode

  • Read Only on the volume1 volume

  • Read Only on the firewall2 firewall.

Instead of linode_contributor, a user with the account_admin role assigns jsmith the linode_admin role on the linode123 Linode. At this point, jsmith has the following role assignment:

  • account_oauth_client_admin

  • account_event_viewer

  • account_notification_viewer

  • account_maintenance_viewer

  • linode_admin on linode123 Linode

  • volume_viewer on the volume1 volume

  • firewall_viewer on the firewall2 firewall.

📘

The linode_admin role includes all linode_contributor permissions.

Permission comparison for Linode API

Allowed Linode API operationsGrant system: Triggered grantRBAC system: Triggered permission
New Linode access settingsN/Alinode_admin role for the linode123 Linode.
Delete a LinodeRead-Writedelete_linode
Cancel backupsRead-Writecancel_linode_backups
Delete a configuration profileRead-Write- delete_linode_config_profile
- view_linode
Delete a configuration profile interfaceRead-Write-delete_linode_config_profile_interface
- view_linode_config_profile
- view_linode
Delete a diskRead-Write- delete_linode_disk
- view_linode

4. The user needs administrative access to the whole account

Objective

  • The restricted user jsmith have administrative access to the whole account.
  • jsmith any entity including Linode.
  • jsmith has all billing permissions.
  • jsmith can modify their own profile.

Setup comparison

Grant setupRBAC setup

An unrestricted user grants jsmith unrestricted access at the account level.

  • jsmith has full account access

A user with the account_admin role assigns jsmith the account_admin role. At this point, jsmith has the following role assignment:

  • account_admin
  • account_oauth_client_admin
  • account_event_viewer
  • account_notification_viewer
  • account_maintenance_viewer
  • linode_admin on linode123 Linode
  • volume_viewer on the volume1 volume
  • firewall_viewer on the firewall2 firewall.

Permission comparison for Linode API

Allowed Linode API operationsGrant system: Triggered grantRBAC system: Triggered permission
New access settingsFull account accessAll permissions at both the account level and with individual entities
List eventsN/Alist_events
Get an eventN/Aview_event
Mark an event as seenN/Amark_event_seen
List available servicesN/Alist_available_services
List service transfersN/Alist_service_transfers
Get a region's service availabilityN/Aview_region_available_service
List maintenancesN/Alist_maintenances
Get network usageN/Aview_network_usage
List enrolled Beta programsN/Aview_enrolled_beta_program
List notificationsN/Alist_notifications
List authorized appsN/Alist_profile_apps
Get an authorized appN/Aview_profile_app
List agreementsN/Alist_account_agreements
Get account settingsN/Aview_account_settings
Get a profileN/Aview_profile
Get your accountN/Aview_account
Get a userN/Aview_user
Get user preferencesN/Aview_user_preferences
List grantsN/Alist_profile_grants
List a user's grantsN/Alist_user_grants
List user loginsN/Alist_account_logins
List security questionsN/Alist_profile_security_questions
List trusted devicesN/Alist_profile_devices
Get a trusted deviceN/Aview_profile_device
Get a profile's loginN/Aview_profile_login
List loginsN/Alist_profile_logins
Get an account loginN/Aview_account_login
List SSH keysN/Alist_profile_ssh_keys
Get an SSH keyN/Aview_profile_ssh_key
List OAuth clientsN/Alist_oauth_clients
Get an OAuth clientN/Aview_oauth_client
List Linode NodeBalancersRead Only on Linodeslist_linode_nodebalancers
Get monthly statisticsRead Only on Linodesview_linode_monthly_stats
List invoicesRead Only billing accesslist_billing_invoices
Get an invoiceRead Only billing accessview_billing_invoice
Get a payment methodRead Only billing accessview_payment_method
List payment methodsRead Only billing accesslist_payment_methods
Get a paymentRead Only billing accessview_billing_payment
List invoice itemsRead Only billing accesslist_invoice_items
List paymentsRead Only billing accesslist_billing_payments
List firewall devicesRead Only on Firewallslist_firewall_devices
Get a firewallRead Only on Firewallsview_firewall
Get a firewall deviceRead Only on Firewallsview_firewall_device
List firewall rule versionsRead Only on Firewallslist_firewall_rule_versions
List default firewallsRead Only on Firewallslist_default_firewalls
List firewall rulesRead Only on Firewallslist_firewall_rules
Get a firewall rule versionRead Only on Firewallsview_firewall_rule_version