Skip to content

RANGER-5592: [GDS] Validity Period is not working for dataset policy#945

Open
maheshbandal15 wants to merge 2 commits into
masterfrom
mb-ranger-5592
Open

RANGER-5592: [GDS] Validity Period is not working for dataset policy#945
maheshbandal15 wants to merge 2 commits into
masterfrom
mb-ranger-5592

Conversation

@maheshbandal15
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fixed an issue where the GDS validity period was not enforced for dataset policies. Previously, when a dataset was configured with a validity end date set before the current date, users were still allowed to execute queries (e.g., SELECT) instead of being denied access. The validity period expiration is now correctly evaluated, ensuring that access through dataset policies is denied once the validity period has expired.

How was this patch tested?

Manual testing is done.
build successful with "mvn clean install"


policyEvaluators.forEach(e -> e.evaluate(datasetRequest, datasetResult));
policyEvaluators.forEach(e -> {
if (!e.isApplicable(accessTime)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For better readability, consider reversing the conition:

policyEvaluators.forEach(e -> {
    if (e.isApplicable(accessTime)) {
        e.evaluate(datasetRequest, datasetResult);
    }
});

Also, this fix will be needed in GdsProjectEvaluator.evaluate() as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing. I have addressed the review comment. Kindly review the updated patch.

RANGER-5597 is created to track required fix in GdsProjectEvaluator.evaluate(). Refer #946

@maheshbandal15 maheshbandal15 requested a review from mneethiraj May 14, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants