DependencyTrack / DependencyTrack/dependency-track

Sync Frontend and APIserver docker variables

Open
#7,261 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

Deploying Dependency Track using the Frontend and APIserver via docker I need to set some variables twice with different names.
Due to [LegacyConfigPropertyValidator](https://github.com/DependencyTrack/dependency-track/blob/dc76b567c5f24e46139450aba1da968055d45252/apiserver/src/main/java/org/dependencytrack/common/LegacyConfigPropertyValidator.java#L45) docker deployment with a shared env file keeps boot-looping. The co-existance of the old ` OIDC_CLIENT_ID` and the new ` DT_OIDC_CLIENT_ID` since v5.x is the cause of this.

The Frontend still requires the old ` OIDC_CLIENT_ID` variable and it needs to be identical for both services anyway.

### Proposed Behavior

I propose a simple fix in the Frontend Repo.
A simple change in [docker/docker-entrypoint.d/30-oidc-configuration.sh](https://github.com/DependencyTrack/frontend/blob/48a7b37253b9145a95dee81133434fbb68f43264/docker/docker-entrypoint.d/30-oidc-configuration.sh) should migrate the Frontend to the new `DT_` prefixed variable names too.

I also suggest migrating ` OIDC_ISSUER` to `DT_OIDC_ISSUER` at the same time.

---

Please Note: it needs to be reflected **in the docs too**.
[rendered docs](https://dependencytrack.github.io/docs/next/guides/administration/configuring-oidc/) and [link to repo](https://github.com/DependencyTrack/docs/blob/main/docs/guides/administration/configuring-oidc.md). There's also a link to the "app properties" on that page that only show the new variable names. THIS actually caused a lot of trouble for me when deploying it.
[Rendered](https://dependencytrack.github.io/docs/next/reference/configuration/properties/#openid-connect) and [Repo Link](https://github.com/DependencyTrack/docs/blob/05a39c8c9738c8a90fed9d2a7f550cf99da53f22/docs/reference/configuration/properties.md?plain=1#L1509) for this too.

Summary: There's variables in the frontend and apiserver that could be the same name for easier docker deployment.
Benefit: Updating/Fixing the docs for this would've saved me about 1.5 hours today.

### 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 enhancement was already requested

Contributor guide

Open the contributing guide

Research direction

Start with docker/docker-entrypoint.d/30-oidc-configuration.sh in the Frontend repository and trace how OIDC_CLIENT_ID and OIDC_ISSUER are read. Then update docs/guides/administration/configuring-oidc.md and docs/reference/configuration/properties.md; done means the frontend and API server use the DT_ variable names consistently and the documentation reflects them.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops, documentation, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.