Skip to content

Conversation

@nscuro
Copy link
Member

@nscuro nscuro commented Nov 14, 2025

Description

Fixes redirect loop when authenticated user is lacking permissions.

After successful login, users are redirected to the dashboard. The dashboard requires the VIEW_PORTFOLIO permission, and redirects back to the login page if that permission is not present. This could lead to redirect loops for users who lack the permission.

Display a popup instead that informs the user about the lack of permissions to proceed.

Addressed Issue

Relates to DependencyTrack/dependency-track#5098
Backports DependencyTrack/hyades-frontend#308

Additional Details

image

Checklist

After successful login, users are redirected to the dashboard. The dashboard requires the `VIEW_PORTFOLIO` permission, and redirects back to the login page if that permission is not present. This could lead to redirect loops for users who lack the permission.

Display a popup instead that informs the user about the lack of permissions to proceed.

Relates to DependencyTrack/dependency-track#5098
Backports DependencyTrack/hyades-frontend#308

Co-authored-by: Sahiba Mittal <sahiba.mittal@citi.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro added this to the 4.14.0 milestone Nov 14, 2025
Copilot AI review requested due to automatic review settings November 14, 2025 11:24
@nscuro nscuro added defect Something isn't working backport/4.13.6 PRs to be backported to version 4.13.6 labels Nov 14, 2025
@owasp-dt-bot
Copy link

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a redirect loop that occurred when authenticated users lacked the VIEW_PORTFOLIO permission. Previously, after successful login, users were redirected to the dashboard which required this permission, causing a redirect back to login and creating an infinite loop.

  • Adds permission check immediately after successful authentication
  • Displays an informational modal when users lack required permissions
  • Prevents token storage and redirection for users without proper permissions

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/views/pages/Login.vue Adds VIEW_PORTFOLIO permission checks in both standard and OIDC login flows to prevent redirect loops
src/i18n/locales/en.json Adds English error message for insufficient permissions
src/i18n/locales/de.json Adds German translation for insufficient permissions message
src/i18n/locales/es.json Adds Spanish translation for insufficient permissions message
src/i18n/locales/fr.json Adds French translation for insufficient permissions message
src/i18n/locales/hi.json Adds Hindi translation for insufficient permissions message
src/i18n/locales/it.json Adds Italian translation for insufficient permissions message
src/i18n/locales/ja.json Adds Japanese translation for insufficient permissions message
src/i18n/locales/pl.json Adds Polish translation for insufficient permissions message
src/i18n/locales/pt-BR.json Adds Brazilian Portuguese translation for insufficient permissions message
src/i18n/locales/pt.json Adds Portuguese translation for insufficient permissions message
src/i18n/locales/ru.json Adds Russian translation for insufficient permissions message
src/i18n/locales/uk-UA.json Adds Ukrainian translation for insufficient permissions message
src/i18n/locales/zh.json Adds Chinese translation for insufficient permissions message

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nscuro nscuro mentioned this pull request Nov 14, 2025
1 task
@nscuro nscuro merged commit e4571b2 into DependencyTrack:master Nov 14, 2025
16 checks passed
@nscuro nscuro deleted the backport-login-permission-check branch November 14, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/4.13.6 PRs to be backported to version 4.13.6 defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants