mneethiraj commented on code in PR #1327:
URL: https://github.com/apache/ranger/pull/1327#discussion_r4356658239
##########
agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefValidator.java:
##########
@@ -50,7 +52,8 @@
public class RangerServiceDefValidator extends RangerValidator {
private static final Logger LOG =
LoggerFactory.getLogger(RangerServiceDefValidator.class);
- private static final Set<String> VALID_CONFIG_TYPES =
ImmutableSet.of("bool", "enum", "int", "string", "password", "path");
+ private static final Set<String> VALID_CONFIG_TYPES =
ImmutableSet.of("bool", "enum", "int", "string", "password", "path");
+ private static final Set<String> VALID_CONSTRAINT_PARAM_TYPES =
ImmutableSet.of("string", "int", "bool", "enum", "user", "group", "role");
Review Comment:
"user", "group", "role" - these types don't seem to be relevant as
constraint parameter. I suggest removing these.
##########
security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java:
##########
@@ -698,6 +700,8 @@ public RangerServiceDef createServiceDef(RangerServiceDef
serviceDef) throws Exc
}
}
+ updateServiceDefText(createdSvcDef, constraintDefs);
Review Comment:
Instead of sending `constraintDefs` as an argument, consider the following:
```
createdSvcDef.setContraintDefs(serviceDef.getConstraintDefs());
updateServiceDefText(createdSvcDef);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]