-
Notifications
You must be signed in to change notification settings - Fork 14
Changing policy does not invalidate ACS decision cache when connector is configured #149
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
Conversation
irinaepshteyn
left a comment
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 reviewing. Please review my comments. Let me know if you would like me to make these changes and merge.
|
|
||
| PolicyEvaluationResult result = mockPermitResult(); | ||
| spiedCache.set(key, result); | ||
| spiedCache.get(key); |
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.
@FrankGasparovic, need to validate if get() correctly returned a cached result or null.
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.
@FrankGasparovic, also connectorsNotConfigured() test case should return:
new Object[] { null, null, DateTime.now(), false };
| private static PolicyEvaluationResult mockPermitResult() { | ||
| PolicyEvaluationResult result = new PolicyEvaluationResult(Effect.PERMIT); | ||
| result.setResolvedResourceUris(new HashSet<>(Arrays.asList(new String[] { XFILES_ID }))); | ||
| result.setResolvedResourceUris(new HashSet<>(Collections.singletonList(XFILES_ID))); |
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 Collections.singleton(..) instead of new HashSet<>(Collections.singletonList(..))
|
|
||
| Thread.sleep(1); | ||
| this.cache.resetForSubjectsByIds(ZONE_NAME, new HashSet<>(Arrays.asList(AGENT_MULDER))); | ||
| this.cache.resetForSubjectsByIds(ZONE_NAME, new HashSet<>(Collections.singletonList(AGENT_MULDER))); |
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 Collections.singleton(..) instead of new HashSet<>(Collections.singletonList(..))
|
|
||
| Thread.sleep(1); | ||
| this.cache.resetForResourcesByIds(ZONE_NAME, new HashSet<>(Arrays.asList(XFILES_ID))); | ||
| this.cache.resetForResourcesByIds(ZONE_NAME, new HashSet<>(Collections.singletonList(XFILES_ID))); |
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 Collections.singleton(..) instead of new HashSet<>(Collections.singletonList(..))
779338a to
d0ca2c7
Compare
| } | ||
|
|
||
| private Object[] connectorsNotConfigured() { | ||
| AttributeConnector resourceConnector = new AttributeConnector(); |
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.
Remove this statement and the one below since they're unused
d0ca2c7 to
ed8a2a2
Compare
No description provided.