Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
12 changes: 12 additions & 0 deletions docs/OAUTH2.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,18 @@ Pup requests the following OAuth scopes based on PR #84:
### Usage
- `usage_read` - Read usage data

### CI Visibility
- `ci_visibility_read` - Read CI pipelines, tests, code coverage, and flaky tests
- `ci_visibility_pipelines_write` - Send CI pipeline events

### Service Catalog
- `apm_service_catalog_read` - Read service definitions
- `apm_service_catalog_write` - Create/update/delete service definitions

### Teams
- `teams_read` - Read teams and team memberships
- `teams_manage` - Create/update/delete teams and memberships

## Token Management

### Automatic Refresh
Expand Down
14 changes: 14 additions & 0 deletions src/auth/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ pub fn default_scopes() -> Vec<&'static str> {
"oci_configurations_manage",
"timeseries_query",
"usage_read",
// CI Visibility (pipelines, tests, code coverage, flaky tests)
"ci_visibility_read",
"ci_visibility_pipelines_write",
// Service Catalog
"apm_service_catalog_read",
"apm_service_catalog_write",
// Teams (on-call)
"teams_read",
"teams_manage",
]
}

Expand Down Expand Up @@ -141,6 +150,11 @@ mod tests {
assert!(scopes.contains(&"dashboards_read"));
assert!(scopes.contains(&"monitors_read"));
assert!(scopes.contains(&"logs_read_data"));
// CI Visibility, Service Catalog, Teams
assert!(scopes.contains(&"ci_visibility_read"));
assert!(scopes.contains(&"apm_service_catalog_read"));
assert!(scopes.contains(&"teams_read"));
assert!(scopes.contains(&"teams_manage"));
}

#[test]
Expand Down