Skip to content

Commit a5c22ec

Browse files
committed
Adding OpaRolesCache with 10 minutes default
1 parent a92dac5 commit a5c22ec

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

rust/crd/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub enum SupersetConfigOptions {
9090
StackableOpaBaseUrl,
9191
StackableOpaPackage,
9292
StackableOpaRule,
93+
OpaRolesCache,
9394
}
9495

9596
impl SupersetConfigOptions {
@@ -143,6 +144,7 @@ impl FlaskAppConfigOptions for SupersetConfigOptions {
143144
SupersetConfigOptions::StackableOpaBaseUrl => PythonType::StringLiteral,
144145
SupersetConfigOptions::StackableOpaPackage => PythonType::StringLiteral,
145146
SupersetConfigOptions::StackableOpaRule => PythonType::Expression,
147+
SupersetConfigOptions::OpaRolesCache => PythonType::Expression,
146148
}
147149
}
148150
}

rust/operator-binary/src/authorization/opa.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ impl SupersetOpaConfig {
6565
"STACKABLE_OPA_PACKAGE".to_string(),
6666
self.opa_package.clone(),
6767
),
68+
(
69+
"OPA_ROLES_CACHE".to_string(),
70+
Some("os.getenv('OPA_ROLES_CACHE', '10')".to_string()),
71+
),
6872
])
6973
}
7074
}

0 commit comments

Comments
 (0)