Skip to content

Commit a92dac5

Browse files
committed
Removing some ToDo's. Better comments
1 parent 40c5cd1 commit a92dac5

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

rust/crd/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ impl FlaskAppConfigOptions for SupersetConfigOptions {
138138
SupersetConfigOptions::AuthLdapTlsCertfile => PythonType::StringLiteral,
139139
SupersetConfigOptions::AuthLdapTlsKeyfile => PythonType::StringLiteral,
140140
SupersetConfigOptions::AuthLdapTlsCacertfile => PythonType::StringLiteral,
141+
// Configuration options used by CustomOpaSecurityManager
141142
SupersetConfigOptions::CustomSecurityManager => PythonType::Expression,
142143
SupersetConfigOptions::StackableOpaBaseUrl => PythonType::StringLiteral,
143144
SupersetConfigOptions::StackableOpaPackage => PythonType::StringLiteral,
144145
SupersetConfigOptions::StackableOpaRule => PythonType::Expression,
145-
// TODO: Set new options for OpaSecurityManager like:
146146
}
147147
}
148148
}

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl SupersetOpaConfig {
2222
.full_document_url_from_config_map(client, superset, None, OpaApiVersion::V1)
2323
.await?;
2424

25-
// striping package path from base url. Needed by CustomOpaSecurityManager. TODO: <Path/to/manager.py>
25+
// striping package path from base url. Needed by CustomOpaSecurityManager.
2626
let opa_base_url = match opa_config.package.clone() {
2727
Some(opa_package_name) => {
2828
let opa_path = format!("/v1/data/{opa_package_name}");
@@ -38,24 +38,20 @@ impl SupersetOpaConfig {
3838
}
3939

4040
// Adding necessary configurations. Imports are solved in config.rs
41-
// TODO: Currently: .unwrap_or_default() which ends in e.g. :
42-
// CUSTOM_SECURITY_MANAGER = None => CUSTOM_SECURITY_MANAGER = ""
43-
// Could be better if not set.
4441
pub fn as_config(&self) -> BTreeMap<String, Option<String>> {
4542
BTreeMap::from([
4643
(
4744
"CUSTOM_SECURITY_MANAGER".to_string(),
4845
Some("OpaSupersetSecurityManager".to_string()),
4946
),
5047
// This is now a PythonType::Expression. Makes it easy to find a default.
51-
// only necessary when opa role mapping is activated, as the user
52-
// has to have a role to be valid.
48+
// EnvOverrides are supported.
5349
(
5450
"AUTH_USER_REGISTRATION_ROLE".to_string(),
5551
Some("os.getenv('AUTH_USER_REGISTRATION_ROLE', 'Public')".to_string()),
5652
),
5753
// There is no proper way to interfere this without changing e.g. CRD's.
58-
// Thus, we go for an default and make it accessible through envOverrides.
54+
// EnvOverrides are supported.
5955
// TODO: Documentation
6056
(
6157
"STACKABLE_OPA_RULE".to_string(),

0 commit comments

Comments
 (0)