Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions docs/architecture/decisions/009-auth-and-roles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
| Status | Date | Author(s) |
| :------- | :--------- | :----------------------------------------- |
| Proposed | 2025-05-14 | [@jmayer-lm](https://github.com/jmayer-lm) |

## Context

The Dependency Track system currently faces challenges with its permission structure, lacking clear role definitions and appropriate access controls. To address these issues, a comprehensive overhaul of the permission system is proposed. This initiative aims to refine and fix the existing permissions, introduce roles, and enhance the overall access management within Dependency Track.

## Decision

We decide to implement a comprehensive overhaul of the Dependency Track permission system, incorporating the following key elements:

- Introducing "roles" means assigning groups of permissions to specific types of users (e.g., Admin, Auditor, etc). This allows for more granular control over what actions different types of users can perform within the system.
- Implement Query Manager changes to enforce permissions at the project level. This will ensure that users can only view and modify projects they have access to.
- Split the current permission set into global and team/project-based permission sets, adding any potentially missing ones to ensure comprehensive coverage of access scenarios. Global permissions are applied universally across the system and are not specific to any project or team. Team/Project-based permissions are specific to individual teams or projects, allowing for more customized access control within those contexts.
- Add custom roles, the abilitiy to create tailored sets of permssions specifc to the type of user, to Dependency Track with a field to link to external services, enhancing integration capabilities and allowing for more seamless interactions with other tools and platforms.
- Separate Team administration from system administration, clarifying roles and responsibilities to prevent confusion and minimize the risk of unintended system-wide changes.

## Data Model
Comment thread
jmayer-lm marked this conversation as resolved.

```mermaid

erDiagram
%% Table Definitions
ROLE {
bigint ID PK
text NAME
uuid UUID
}

USER {
bigint ID PK
}

PERMISSION {
bigint ID PK
text DESCRIPTION
text NAME
}

ROLES_PERMISSIONS {
bigint ROLE_ID FK "References ROLE(ID)"
bigint PERMISSION_ID FK "References PERMISSION(ID)"
}

USERS_ROLES {
bigint USER_ID FK "References USER(ID)"
bigint ROLE_ID FK "References ROLE(ID)"
}

%% Relationships for USERS_ROLES: This table associates a USER and a ROLE.
USER ||--o{ USERS_ROLES : "assigned"
ROLE ||--o{ USERS_ROLES : "applied to"

%% Relationships between ROLE and PERMISSION via ROLES_PERMISSIONS
ROLE ||--o{ ROLES_PERMISSIONS : "has"
PERMISSION ||--o{ ROLES_PERMISSIONS : "assigned via"
```

## Consequences

The implementation of the new permission system and roles in Dependency Track is expected to have the following consequences:

- Improved Security: The introduction of more granular permission controls and the separation of team administration from system administration will reduce the risk of unauthorized access to sensitive features and data, enhancing the overall security posture of the platform.
- Enhanced Usability: By providing more tailored and flexible access controls, users will have a more streamlined experience, with access to the features and resources they need to perform their tasks, without being overwhelmed by unnecessary permissions or complexity.
- Reduced Administrative Burden: The clarification of roles and responsibilities, particularly the distinction between team and system administration, will simplify the management of the platform, reducing the administrative workload and making it easier to maintain and evolve the system over time.
- Better Scalability: The introduction of custom roles and the ability to link to external services will make it easier for Dependency Track to integrate with other tools and platforms, improving its scalability and adaptability to different use cases and environments.
- Increased Complexity for Small Teams: For very small teams or individual users, the introduction of more granular permission controls might add complexity, potentially making it more challenging to manage permissions and access. Guidance and documentation will be crucial in mitigating this impact.

74 changes: 37 additions & 37 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ markdown_extensions:
- pymdownx.snippets
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- tables
- toc:
permalink: true
Expand All @@ -77,42 +77,42 @@ plugins:

nav:
- Getting Started:
- Overview: index.md
- Changes over v4: getting-started/changes-over-v4.md
- Migrating from v4: getting-started/migrating-from-v4.md
- Upgrading: getting-started/upgrading.md
- Overview: index.md
- Changes over v4: getting-started/changes-over-v4.md
- Migrating from v4: getting-started/migrating-from-v4.md
- Upgrading: getting-started/upgrading.md
- Usage:
- Policy Compliance:
- Overview: usage/policy-compliance/overview.md
- Expressions: usage/policy-compliance/expressions.md
- Policy Compliance:
- Overview: usage/policy-compliance/overview.md
- Expressions: usage/policy-compliance/expressions.md
- Architecture:
- Overview: architecture/index.md
- Decisions:
- Overview: architecture/decisions/000-index.md
- "ADR-001: Drop Kafka Dependency": architecture/decisions/001-drop-kafka-dependency.md
- "ADR-002: Workflow Orchestration": architecture/decisions/002-workflow-orchestration.md
- "ADR-003: Notification Publishing": architecture/decisions/003-notification-publishing.md
- "ADR-004: File Storage Plugin": architecture/decisions/004-file-storage-plugin.md
- "ADR-005: Materialize Project Hierarchies": architecture/decisions/005-materialize-project-hierarchies.md
- "ADR-006: Consolidate User Tables": architecture/decisions/006-consolidate-user-tables.md
- "ADR-007: Spec-First REST API v2": architecture/decisions/007-spec-first-rest-api-v2.md
- Design:
- Workflow State Tracking: architecture/design/workflow-state-tracking.md
- Overview: architecture/index.md
- Decisions:
- Overview: architecture/decisions/000-index.md
- "ADR-001: Drop Kafka Dependency": architecture/decisions/001-drop-kafka-dependency.md
- "ADR-002: Workflow Orchestration": architecture/decisions/002-workflow-orchestration.md
- "ADR-003: Notification Publishing": architecture/decisions/003-notification-publishing.md
- "ADR-004: File Storage Plugin": architecture/decisions/004-file-storage-plugin.md
- "ADR-005: Materialize Project Hierarchies": architecture/decisions/005-materialize-project-hierarchies.md
- "ADR-006: Consolidate User Tables": architecture/decisions/006-consolidate-user-tables.md
- "ADR-009: Auth And Roles": architecture/decisions/009-auth-and-roles.md
- Design:
- Workflow State Tracking: architecture/design/workflow-state-tracking.md
- Operations:
- Database: operations/database.md
- Database: operations/database.md
- Development:
- Overview: development/overview.md
- Building: development/building.md
- Testing: development/testing.md
- Database Migrations: development/database-migrations.md
- Documentation: development/documentation.md
- Overview: development/overview.md
- Building: development/building.md
- Testing: development/testing.md
- Database Migrations: development/database-migrations.md
- Documentation: development/documentation.md
- Reference:
- Configuration:
- Overview: reference/configuration/overview.md
- API Server: reference/configuration/api-server.md
- Mirror Service: reference/configuration/mirror-service.md
- Repository Metadata Analyzer: reference/configuration/repo-meta-analyzer.md
- Schemas:
- Notification: reference/schemas/notification.md
- Policy: reference/schemas/policy.md
- Topics: reference/topics.md
- Configuration:
- Overview: reference/configuration/overview.md
- API Server: reference/configuration/api-server.md
- Mirror Service: reference/configuration/mirror-service.md
- Repository Metadata Analyzer: reference/configuration/repo-meta-analyzer.md
- Schemas:
- Notification: reference/schemas/notification.md
- Policy: reference/schemas/policy.md
- Topics: reference/topics.md