DependencyTrack / DependencyTrack/dependency-track

v5: Index USR_USERNAME_IDX should include column type

Open
#6,312 4 comments 0 reactions 0 assignees View on GitHub
defect p3 size/M
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

With V5, the OIDCUSER and MANAGEDUSER tables were consolidated into the USER table and discriminated by the `type` column. However, the current index USER_USERNAME_IDX does not include the `type` column, making a collision possible between two unrelated object types.

### Steps to Reproduce

1. Create a blank v5 database
2. Create an OIDC username `admin`
3. Attempt to login with OIDC username `admin`

### Expected Behavior

Unique index should include columns `username` and `type`.

### Dependency-Track Version

5.x

### Browser

Google Chrome

### Checklist

- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/main/CONTRIBUTING.md#filing-issues)
- [x] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.