Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data restriction and attribute masking #528

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

ankitmashu
Copy link
Collaborator

This PR includes changes for [Data access restriction]

  1. Quota Limit Enforcement:

    Limits data access based on daily API call count and data consumption.[For consumer role]

  2. Attribute Masking Setup:

    Controls access to specific data attributes.

Note: Attribute masking feature yet to be implemented for Redis(latest search)

@ankitmashu
Copy link
Collaborator Author

ankitmashu commented Aug 13, 2024

TO DO:

  • Docs
  • Sql script
  • Data Update Python Script

@gopal-mahajan gopal-mahajan added the enhancement New feature or request label Aug 19, 2024
@gopal-mahajan gopal-mahajan linked an issue Aug 19, 2024 that may be closed by this pull request

int consumedData = quotaConsumed.getInteger("consumed_data");
int apiCount = quotaConsumed.getInteger("api_count");

Copy link
Collaborator

Choose a reason for hiding this comment

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

will consumedData apiCount always be int or should it be float? @Gokul-KG

handler.handle(Future.failedFuture(responseBuilder.getResponse().toString()));
return;
}
if (!isUsageWithinLimits(authInfo, answer.getLong("size"))) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

In this scenario, if a user has a search ID that has already been audited, and they have a usage limit of 500 MB which has been fully consumed for that search ID, what happens if they attempt to access the resource again? Since their remaining limit is now zero, should we allow them to access the resource that has already been audited, or should access be denied? @Gokul-KG @swaminathanvasanth

Copy link
Collaborator

@gopal-mahajan gopal-mahajan left a comment

Choose a reason for hiding this comment

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

Please check the comments and do the required changes

Comment on lines 440 to 445
jsonResponse.put("access", access);
jsonResponse.put("meteringData", meteringData);
jsonResponse.put("accessPolicy", accessPolicy);
jsonResponse.put("accessType", ACCESS_MAP.get(endPoint));
jsonResponse.put("resourceId", resourceId);
jsonResponse.put("enableLimits", isLimitsEnabled); // for async status auditing
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use constant strings here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement of Data Access Limits
4 participants