Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute system identifier to all services #925

Closed
Tracked by #860
nscuro opened this issue Nov 23, 2023 · 0 comments · Fixed by #1165
Closed
Tracked by #860

Distribute system identifier to all services #925

nscuro opened this issue Nov 23, 2023 · 0 comments · Fixed by #1165
Assignees
Labels
architecture enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/L High effort
Milestone

Comments

@nscuro
Copy link
Member

nscuro commented Nov 23, 2023

Each API server instance generates a ~/.dependency-track/id.system file when it first starts up. The file contains a random UUID that is included in the User-Agent header of outgoing requests.

Now, with multiple services and service instances, storing this identifier on disk does not work anymore. Instead, it needs to be distributed to all services that are part of the system.

Storing it in the database is an option, however not all services have or require a database connection at the moment (e.g. mirror service doesn't). Perhaps there is a way to distribute the identifier via Kafka topic instead.

@nscuro nscuro added enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk architecture size/L High effort labels Nov 23, 2023
@nscuro nscuro mentioned this issue Nov 23, 2023
34 tasks
nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this issue Mar 29, 2024
This makes the cluster ID (previously system UUID) available to other instances and services.

Instead of `Config.getInstance().getSystemUuid()`, `ClusterInfo.getClusterId()` must be used from now on.

As the cluster ID is only generated once and then never updated, it will only be loaded upon first invocation of `ClusterInfo.getClusterId()`.

Updating of the cluster ID via API or UI is prevented by marking it as read-only.

Relates to DependencyTrack/hyades#925

Signed-off-by: nscuro <[email protected]>
nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this issue Mar 29, 2024
This makes the cluster ID (previously system UUID) available to other instances and services.

Instead of `Config.getInstance().getSystemUuid()`, `ClusterInfo.getClusterId()` must be used from now on.

As the cluster ID is only generated once and then never updated, it will only be loaded upon first invocation of `ClusterInfo.getClusterId()`.

Updating of the cluster ID via API or UI is prevented by marking it as read-only.

Relates to DependencyTrack/hyades#925

Signed-off-by: nscuro <[email protected]>
nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this issue Mar 29, 2024
This makes the cluster ID (previously system UUID) available to other instances and services.

Instead of `Config.getInstance().getSystemUuid()`, `ClusterInfo.getClusterId()` must be used from now on.

As the cluster ID is only generated once and then never updated, it will only be loaded upon first invocation of `ClusterInfo.getClusterId()`.

Updating of the cluster ID via API or UI is prevented by marking it as read-only.

Relates to DependencyTrack/hyades#925

Signed-off-by: nscuro <[email protected]>
@nscuro nscuro self-assigned this Mar 29, 2024
@nscuro nscuro added this to the 0.5.0 milestone Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/L High effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant