Skip to content

f-ui: Improve ACL permission error message to prompt sign-in check#27904

Open
sreekanthkk96 wants to merge 2 commits intomainfrom
NMD-1050-nomad-GH-Issue
Open

f-ui: Improve ACL permission error message to prompt sign-in check#27904
sreekanthkk96 wants to merge 2 commits intomainfrom
NMD-1050-nomad-GH-Issue

Conversation

@sreekanthkk96
Copy link
Copy Markdown

@sreekanthkk96 sreekanthkk96 commented May 6, 2026

Description

This PR updates the error message for ACL permission failures to be more actionable by suggesting that users verify they are signed in. Previously, when users encountered a 403 Forbidden error, the message only stated that their ACL token didn't grant permission, which could be confusing for users who weren't logged in at all.

The updated error message now reads: Your ACL token does not grant permission to ${actionMessage}. Please ensure you are signed in.

This change improves the user experience by providing a clear next step when encountering permission errors.

Testing & Reproduction steps

Manual Testing:

  1. Open the Nomad UI without being logged in
  2. Attempt to perform an action that requires ACL permissions (e.g., accessing jobs, allocations, or other protected resources)
  3. Verify that the error message now includes "Please ensure you are signed in."
  4. Log in with valid credentials and verify the action works as expected

To reproduce this error message:

  1. Use read-only token in the UI
  2. Navigate to Jobs and select any job
  3. Click "Definition" tab
  4. Click "Edit" button
  5. Make a change
  6. Click "Plan" button
    🐛 YOU SHOULD SEE THE ERROR

Links

Before

image

After

image

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

No changes to security controls. This PR only modifies the error message text to be more user-friendly by suggesting users verify they are signed in when encountering ACL permission errors. The underlying authentication and authorization mechanisms remain unchanged.

@sreekanthkk96 sreekanthkk96 requested review from a team as code owners May 6, 2026 05:06
@hashicorp-cla-app
Copy link
Copy Markdown

hashicorp-cla-app Bot commented May 6, 2026

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

@sreekanthkk96 sreekanthkk96 changed the title updated error message ui: Improve ACL permission error message to prompt sign-in check May 6, 2026
@sreekanthkk96 sreekanthkk96 changed the title ui: Improve ACL permission error message to prompt sign-in check f-ui: Improve ACL permission error message to prompt sign-in check May 6, 2026
@jrasell jrasell self-assigned this May 6, 2026
@jrasell jrasell added the backport/2.0.x backport to 2.0.x release line label May 6, 2026
Copy link
Copy Markdown
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

Hi @sreekanthkk96 and thanks for raising this PR.

It solves the direct user issue but I wonder if we can improve upon this by passing an isAuthenticated option to messageFromAdapterError which would allow us to show two distinct messages:

  • Not signed in: "You are not signed in. Please sign in to perform this action."
  • Signed in, insufficient token → `"Your ACL token does not grant permission to ${actionMessage}."

Curious of your thoughts here on UX and implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.0.x backport to 2.0.x release line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants