Skip to content

Commit 9166dee

Browse files
Merge pull request #443 from srosenthal-dd/stephen.rosenthal/cloud-aws-gcp-oauth-scopes
Add OAuth support for {aws, gcp} integrations
2 parents 245c90e + c7671c4 commit 9166dee

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/auth/types.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ pub fn read_only_scopes() -> Vec<&'static str> {
5151
"apm_read",
5252
"apm_service_catalog_read",
5353
"audit_logs_read",
54+
"aws_configuration_read",
5455
"azure_configuration_read",
5556
"bits_investigations_read",
5657
"cases_read",
@@ -62,6 +63,7 @@ pub fn read_only_scopes() -> Vec<&'static str> {
6263
"data_scanner_read",
6364
"error_tracking_read",
6465
"events_read",
66+
"gcp_configuration_read",
6567
"disaster_recovery_status_read",
6668
"hosts_read",
6769
"incident_read",
@@ -105,6 +107,8 @@ pub fn default_scopes() -> Vec<&'static str> {
105107
"apm_service_catalog_read",
106108
// Audit
107109
"audit_logs_read",
110+
// AWS
111+
"aws_configuration_read",
108112
// Azure
109113
"azure_configuration_read",
110114
// BITS
@@ -137,6 +141,8 @@ pub fn default_scopes() -> Vec<&'static str> {
137141
"error_tracking_read",
138142
// Events
139143
"events_read",
144+
// GCP
145+
"gcp_configuration_read",
140146
// HAMR (disaster recovery)
141147
"disaster_recovery_status_read",
142148
"disaster_recovery_status_write",
@@ -264,7 +270,7 @@ mod tests {
264270
#[test]
265271
fn test_default_scopes() {
266272
let scopes = default_scopes();
267-
assert_eq!(scopes.len(), 82);
273+
assert_eq!(scopes.len(), 84);
268274
assert!(scopes.contains(&"dashboards_read"));
269275
assert!(scopes.contains(&"monitors_read"));
270276
assert!(scopes.contains(&"logs_read_data"));
@@ -280,6 +286,8 @@ mod tests {
280286
assert!(scopes.contains(&"status_pages_settings_read"));
281287
assert!(scopes.contains(&"on_call_read"));
282288
assert!(scopes.contains(&"on_call_write"));
289+
assert!(scopes.contains(&"aws_configuration_read"));
290+
assert!(scopes.contains(&"gcp_configuration_read"));
283291
}
284292

285293
#[test]

0 commit comments

Comments
 (0)