Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to use Apache Ignite as in-memory database.
To enable the security, I created own security plugin by following link http://smartkey.co.uk/development/securing-an-apache-ignite-cluster/

Below are my implementation details

public class IgniteSecurityConfiguration implements PluginConfiguration{
        public class<? extends PluginProvider> providerClass(){
          return IgniteSecurityProvider.class;
        }
    }
public class IgniteSecurityProvider implements PluginProvider{
    @Override
    public IgnitePlugin plugin(){
      return new CASCachePlugin();
    }
} 

    public Object createComponent(PluginContext pluginContext, Class aClass){
       if(aClass.isAssignableFrom(GridSecuriytProcessor.class)){
       return new PasswordSecurityProcessor();
    } else {return null;}
   }

public class PasswordSecurityProcessor implements GridSecurityProcessor,IgnitePlugin
{
@Override
public SecurityContext authenticateNode(ClusterNode clusterNode, SecurityCredentials securityCredentials){
   return new SecurityContext(){
         public SecuritySubject subject(){
           return new SecuritySubjext(){
             //implement methods
           };
         }
        //other implementation methods
    };
}

getting exception when I am starting ignite using examples/config/example-ignite.xml

Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start SPI: TcpDiscoverySpi
at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi (GridManagerAdapter.java:300)
...
...
Caused by: class org.apache.ignite.spi.IgniteSpiException: Failed to authenticate local node( will shutdown local node).
at org.apache.ignite.spi.discovery.tcp.ServerImpl.localAuthentication(ServerImpl.java:975)
at org.apache.ignite.spi.discovery.tcp.ServerImpl.joinTopology(ServerImpl.java:863)
.....
Cuased by class org.apache.ignite.IgniteCheckedException: Failed to serialize objext: com.x.x.x.PasswordSecurityProcessor
at org.apache.ignite.marshaller.jdk.JdkMarshller.marshl0(JDkMarahsller.java:85)

Any idea on what I am missing? Tried the PasswordSecurityProcessor class to implement Serializable but still it did not help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
332 views
Welcome To Ask or Share your Answers For Others

1 Answer

Ignite does not provide security capabilities out of the box, you need to implement a plugin for this. Here is a good blog about this that you can use as an example: http://smartkey.co.uk/development/securing-an-apache-ignite-cluster/

To get the security support you need to look at commercial products built on top of Ignite: https://docs.gridgain.com/docs/security-and-audit


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...