You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/02/26 10:28:55 UTC
[GitHub] [ignite] ascherbakoff commented on a change in pull request #7375:
PoC security context spread
ascherbakoff commented on a change in pull request #7375: PoC security context spread
URL: https://github.com/apache/ignite/pull/7375#discussion_r384403072
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/security/IgniteSecurityProcessor.java
##########
@@ -125,10 +120,25 @@ public IgniteSecurityProcessor(GridKernalContext ctx, GridSecurityProcessor secP
return res;
}
+ /** {@inheritDoc} */
+ @Override public SecurityContext securityContext(UUID subjId) {
+ return secPrc.securityContext(subjId);
+ }
+
/** {@inheritDoc} */
@Override public SecurityContext authenticateNode(ClusterNode node, SecurityCredentials cred)
throws IgniteCheckedException {
- return secPrc.authenticateNode(node, cred);
+ SecurityContext res = secPrc.authenticateNode(node, cred);
+
+ if (res != null) {
+ Map<String, Object> attrs = new HashMap<>(node.attributes());
+
+ attrs.put(ATTR_SECURITY_SUBJECT_ID, res.subject().id());
+
+ ((TcpDiscoveryNode)node).setAttributes(attrs);
Review comment:
The approach looks wrong.
What if we have ZK discovery SPI ?
This will trigger class cast exception.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services