Madhan Neethiraj created RANGER-502:
---------------------------------------
Summary: To support easier extension/enhancement, provide abstract
implementation for interfaces
ConditionEvaluator/ContextEnricher/ResourceMatcher; also should support
parameterless init
Key: RANGER-502
URL: https://issues.apache.org/jira/browse/RANGER-502
Project: Ranger
Issue Type: Bug
Components: plugins
Affects Versions: 0.5.0
Reporter: Madhan Neethiraj
Assignee: Madhan Neethiraj
To enable enhancements, without breaking existing implementations, an Abstract
implementation must be provided for the following interfaces. Concrete
implementations should extend from the Abstract class, instead of directly
implementing the interface.
- RangerConditionEvaluator
- RangerContextEnricher
- RangerResourceMatcher
Also, currently each of these interfaces require the implementation to provide
an init() method that takes few parameters - like conditionDef,
resourceDef+policyResource, etc. While implementing tag-based policies, it
became necessary to provide additional context (like serviceDef, serviceName)
to ContextEnricher. Instead of updating init() method, which could break
existing implementations, a better approach would be to set the context via
series of set() methods. After all set()s are done, a parameterless init() can
be called. This will model would enable extending the interface for new
requirements, without breaking existing implementations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)