-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: Policy Cache mechanism improvements[staging] #2736
Conversation
…g users efficiently""
…g users efficiently""
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.
refresh the branch with master, i see few unrelated commits.
public List<UserRepresentation> getUsersMappings(int start, int size) throws AtlasBaseException { | ||
String[] columns = {"roles", "groups"}; | ||
List<HeraclesUserViewRepresentation> views = HERACLES.getUsersMappings(start, size, HeraclesUserViewRepresentation.sortBy, columns).body(); | ||
List<UserRepresentation> userRepresentations = views.stream().map(x -> { |
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.
nit: No need for assignment userRepresentations
, just return
protected List<String> roles; | ||
protected List<String> groups; | ||
|
||
public static String sortBy = "username"; |
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.
I dont see a usage for this variable sortBy
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.
protected List<String> roles; | ||
protected List<String> groups; | ||
|
||
public static String sortBy = "name"; |
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.
I dont see a usage for this variable sortBy
, and its referring to name
, missed deleting ?
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.
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.
Using it here ^
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.
rename to something like SORT_KEY_BY_NAME..
@@ -100,6 +100,11 @@ Config getProdConfig() throws AtlasException { | |||
.setClientName(ATLAS_METASTORE_SERVICE) | |||
.setReadMode(ReadMode.MASTER_SLAVE) | |||
.setCheckSentinelsList(false) | |||
.setKeepAlive(true) |
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.
refresh the branch with master, i see unrelated commits like these
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.
Done
protected List<String> roles; | ||
protected List<String> groups; | ||
|
||
public static String sortBy = "name"; |
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.
rename to something like SORT_KEY_BY_NAME..
@@ -108,7 +108,8 @@ public enum AtlasConfiguration { | |||
|
|||
PERSONA_POLICY_ASSET_MAX_LIMIT("atlas.persona.policy.asset.maxlimit", 1000), | |||
ENABLE_KEYCLOAK_TOKEN_INTROSPECTION("atlas.canary.keycloak.token-introspection", false), | |||
KEYCLOAK_ADMIN_CLIENT_PAGINATION_SIZE("atlas.keycloak.admin.resource-pagination-size", 1500); | |||
HERACLES_CLIENT_PAGINATION_SIZE("atlas.heracles.admin.resource-pagination-size", 100), | |||
HERACLES_API_SERVER_URL("atlas.heracles.api.server.url", "http://heracles-service.heracles.svc.cluster.local"); |
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.
rename to atlas.heracles.api.service.url
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.
Done
Policy Cache mechanism improvements
More details: https://www.notion.so/atlanhq/Policy-Cache-mechanism-improvements-028fe879ed2a4604ae880a263726b2fe?pvs=4
JIRA: https://atlanhq.atlassian.net/browse/PLT-524
Test Cases: https://atlanhq.atlassian.net/browse/PLT-524?focusedCommentId=50549
Type of change
Development
Security
Code review