import com.sun.jini.config.KeyStores; import com.sun.jini.discovery.DiscoveryProtocolVersion; import com.sun.jini.discovery.MulticastMaxPacketSize; import com.sun.jini.discovery.MulticastTimeToLive; import com.sun.jini.discovery.UnicastSocketTimeout; import java.util.Collections; import java.security.Permission; import java.rmi.activation.ActivationID; import javax.security.auth.login.LoginContext; import net.jini.activation.ActivationExporter; import net.jini.constraint.BasicMethodConstraints; import net.jini.core.constraint.Integrity; import net.jini.core.constraint.InvocationConstraint; import net.jini.core.constraint.InvocationConstraints; import net.jini.core.constraint.ServerAuthentication; import net.jini.core.constraint.ServerMinPrincipal; import net.jini.core.discovery.LookupLocator; import net.jini.discovery.ConstrainableLookupLocator; import net.jini.jeri.BasicILFactory; import net.jini.jeri.BasicJeriExporter; import net.jini.jeri.ProxyTrustILFactory; import net.jini.jeri.ssl.SslServerEndpoint; import net.jini.security.AccessPermission; import net.jini.security.AuthenticationPermission; import net.jini.security.BasicProxyPreparer; principal { /* * JAAS principals */ private static keystore = KeyStores.getKeyStore( "file:${com.sun.jini.qa.home}/harness/trust/truststore", null); private static phoenix = KeyStores.getX500Principal("phoenix", keystore); private static tester = KeyStores.getX500Principal("tester", keystore); } // principal com.sun.jini.start { /* * JAAS login context */ loginContext = new LoginContext("com.sun.jini.Test"); /* * Values for talking to the activation system */ private static activationSystemConstraints = new BasicMethodConstraints( new InvocationConstraints( new InvocationConstraint[] { Integrity.YES, ServerAuthentication.YES, new ServerMinPrincipal(principal.phoenix) }, null )); activationSystemPreparer = new BasicProxyPreparer( true, activationSystemConstraints, new Permission[]{ new AuthenticationPermission( Collections.singleton(principal.tester), Collections.singleton(principal.phoenix), "connect") } ); activationIDPreparer = new BasicProxyPreparer( true, activationSystemConstraints, null); } // com.sun.jini.start