-
Notifications
You must be signed in to change notification settings - Fork 28
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
base: master
Are you sure you want to change the base?
data restriction and attribute masking #528
Conversation
TO DO:
|
src/main/java/iudx/resource/server/apiserver/ApiServerVerticle.java
Outdated
Show resolved
Hide resolved
src/main/java/iudx/resource/server/apiserver/handlers/AuthHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/iudx/resource/server/authenticator/authorization/ConsumerAuthStrategy.java
Show resolved
Hide resolved
|
||
int consumedData = quotaConsumed.getInteger("consumed_data"); | ||
int apiCount = quotaConsumed.getInteger("api_count"); | ||
|
There was a problem hiding this comment.
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"))) { |
There was a problem hiding this comment.
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
There was a problem hiding this 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
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constant strings here
src/test/java/iudx/resource/server/authenticator/JwtAuthServiceImplTest.java
Show resolved
Hide resolved
src/test/java/iudx/resource/server/authenticator/JwtAuthServiceImplTest.java
Show resolved
Hide resolved
src/test/java/iudx/resource/server/authenticator/JwtAuthServiceImplTest.java
Show resolved
Hide resolved
…g-service Refactor/metering service
Redis Service Added
jwt leeway time added
This PR includes changes for [Data access restriction]
Quota Limit Enforcement:
Limits data access based on daily API call count and data consumption.[For consumer role]
Attribute Masking Setup:
Controls access to specific data attributes.
Note: Attribute masking feature yet to be implemented for Redis(latest search)