SomeFire commented on a change in pull request #7375: PoC security context
spread
URL: https://github.com/apache/ignite/pull/7375#discussion_r376275593
##########
File path:
modules/core/src/test/java/org/apache/ignite/internal/processors/security/impl/TestSecurityProcessor.java
##########
@@ -89,6 +101,38 @@ public TestSecurityProcessor(GridKernalContext ctx,
TestSecurityData nodeSecData
.setPerms(PERMS.get(cred))
.sandboxPermissions(SANDBOX_PERMS.get(cred))
);
+
+ try {
+ Map<String, Object> attrs = new HashMap<>(node.attributes());
+
+ attrs.put(ATTR_SECURITY_CONTEXT,
U.marshal(ctx.marshallerContext().jdkMarshaller(), res));
+
+ ((TcpDiscoveryNode)node).setAttributes(attrs);
+
+ return res;
+ }
+ catch (IgniteCheckedException e) {
+ throw new IgniteException(e);
+ }
+ }
+
+ @Override public SecurityContext securityContext(UUID subjId) {
+ ClusterNode node =
ctx.discovery().getInjectedDiscoverySpi().getNode(subjId);
+
+ if(node == null)
Review comment:
Missed space after `if`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services