hashicorp / hashicorp/nomad

expired / missing tokens in the UI should fall back to `anonymous` permissions

Open
#23,938 1 comment 3 reactions 0 assignees View on GitHub
theme/ui type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Nomad version
Nomad 1.8.3

### Operating system and Environment details
Linux (server), Mac OS/Chrome (client)

### Issue
When using the UI, after a token expires, all permission-checking requests return a 403 Forbidden error due to an expired or missing token, and cannot use the UI until they log in again. When the `anonymous` ACL policy grants at least read access, this means that a user with an expired token in their browser cookies has fewer permissions than a user with no token.

This leads to general annoyance, since a user must log in again to see anything in the UI after their token expires. It also can cause deeper issues, as someone who has their login access removed cannot get a new token, but is instead stuck with a token that blocks all access (and there's no way to clear the bad token from the UI, it has to be deleted from browser settings).

Ideally, a user with an expired token would have the same permissions as a user with no token (i.e. the anonymous ACL policy), or their token would be automatically cleared from the browser after expiration.

### Screenshots
![Screenshot 2024-09-09 at 8 17 05 AM](https://github.com/user-attachments/assets/2187f727-9788-4dc8-879d-88f4ace23774)
![Screenshot 2024-09-09 at 8 17 15 AM](https://github.com/user-attachments/assets/2eac1b82-1995-4452-b69b-4dde1501e143)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the UI requests that return 403 when a token is expired or missing; the issue does not identify files or tests. Done means an expired or missing token receives the same permissions as the anonymous ACL policy, or the expired browser token is cleared automatically, while preserving the reported login and access behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, authorization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.