Skip to content

fix: [UIE-9062] - IAM RBAC: IP Addresses permission fix#12689

Merged
jaalah-akamai merged 3 commits intolinode:developfrom
mpolotsk-akamai:UIE-9062-ip-addresses-permission
Aug 15, 2025
Merged

fix: [UIE-9062] - IAM RBAC: IP Addresses permission fix#12689
jaalah-akamai merged 3 commits intolinode:developfrom
mpolotsk-akamai:UIE-9062-ip-addresses-permission

Conversation

@mpolotsk-akamai
Copy link
Contributor

Description 📝

IAM RBAC: IP Addresses permission fix.
The old logic used the Grants API’s read_write grant, which doesn’t work for the account_linode_admin role. For now, we’re using the update_linode permission to control IP Addresses actions until the new detailed permissions are ready.

Changes 🔄

List any change(s) relevant to the reviewer.

  • Replace read_write grant check with a check for the update_linode permission to enable/disable IP Addresses actions
  • Add unit tests

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Target release date 🗓️

August 26th

How to test 🧪

Prerequisites

(How to setup test environment)

  • devcloud IAM account or local devenv setup or mock data (use the User Permissions presets)
  • Note: The unrestricted account has full access — permission checks are skipped.

To test permissions using presets:

Enable MSW and use Legacy MSW Handlers.

  • Use the Custom Profile preset with the restricted option selected.
  • For account-related permissions (e.g. const { permissions } = usePermissions('account', ['update_linode']) ), use the Custom User Account Permissions preset.
  • For entity-related permissions, use the Custom User Entity Permissions preset.
  • Add the required permissions to the Custom User Account Permissions preset in the following format:
[
  "update_linode",
]

Verification steps

(How to verify changes)

  • Login using a user with account_linode_admin and account_viewer roles
  • Go to Linodes -> [Linode] -> Networking and confirm the following are enabled: IP Sharing, IP Transfer, Edit RDNS, Delete, Add an IP Address
  • Login using a user with linode_viewer role only, confirm the same controls are disabled
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@mpolotsk-akamai mpolotsk-akamai self-assigned this Aug 13, 2025
@mpolotsk-akamai mpolotsk-akamai marked this pull request as ready for review August 13, 2025 14:58
@mpolotsk-akamai mpolotsk-akamai requested a review from a team as a code owner August 13, 2025 14:58
@mpolotsk-akamai mpolotsk-akamai requested review from aaleksee-akamai, bnussman-akamai and dwiley-akamai and removed request for a team August 13, 2025 14:58
@kwojtowiakamai
Copy link

✅ The elements is the IP Addresses section are correctly enabled/disabled based on the grants/permissions for both the IAM and non-IAM users.

@jaalah-akamai jaalah-akamai requested review from coliu-akamai and jaalah-akamai and removed request for bnussman-akamai and dwiley-akamai August 14, 2025 15:09
@coliu-akamai
Copy link
Contributor

merging develop into this branch to gauge e2e test failures, will be reviewing shortly!

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #3 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing717 Passing4 Skipped128m 17s

Details

Failing Tests
SpecTest
linode-storage.spec.tsCloud Manager Cypress Tests→linode storage tab » delete disk

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/linodes/linode-storage.spec.ts"

Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Confirmed changed
✅ Code changes look good
✅ Thanks for TODOs - only comment would maybe to put the ticket number that should address it, i.e.: TODO: [UIE-1000] - Description

@jaalah-akamai jaalah-akamai added the Add'tl Approval Needed Waiting on another approval! label Aug 14, 2025
Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ confirmed changes
✅ reviewed code

thanks @mpolotsk-akamai!

note: right now for a linode_viewer IAM account, seeing that Linode Interface stuff isn't disabled (but I do get an unauthorized error when trying to update stuff)

image

I can look into getting a PR up to try and integrate this with IAM/grants!

update: see #12708 - lmk if this makes sense, otherwise I can close it

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Aug 14, 2025
@coliu-akamai coliu-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Aug 14, 2025
@jaalah-akamai jaalah-akamai merged commit cd332cf into linode:develop Aug 15, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge! IAM (Identity & Access Management)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants