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.kerberos.KerberosPrincipal; import javax.security.auth.login.LoginContext; import net.jini.activation.ActivationExporter; import net.jini.constraint.BasicMethodConstraints; import net.jini.constraint.BasicMethodConstraints.MethodDesc; import net.jini.core.constraint.ConstraintAlternatives; 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.kerberos.KerberosServerEndpoint; import net.jini.jeri.ProxyTrustILFactory; import net.jini.security.AccessPermission; import net.jini.security.AuthenticationPermission; import net.jini.security.BasicProxyPreparer; import net.jini.security.GrantPermission; multicast { private ttl = 1; } principal { /* * JAAS principals */ private static outrigger = new KerberosPrincipal("${outrigger}"); private static mahalo = new KerberosPrincipal("${mahalo}"); private static mercury = new KerberosPrincipal("${mercury}"); private static phoenix = new KerberosPrincipal("${phoenix}"); private static reggie = new KerberosPrincipal("${reggie}"); private static tester = new KerberosPrincipal("${test}"); } com.sun.jini.outrigger { /* * Test or test harness specific entries */ locatorConstraints = net.jini.discovery.LookupDiscovery.discoveryConstraints; /* * JAAS login context */ loginContext = new LoginContext("com.sun.jini.Outrigger"); /* for impl/mercury/InterOpTest */ private phoenixAuthenticationPermission = new AuthenticationPermission( Collections.singleton(principal.outrigger), Collections.singleton(principal.phoenix), "connect"); private phoenixGrantPermission = new GrantPermission( phoenixAuthenticationPermission); listenerPreparer = new BasicProxyPreparer( true, new BasicMethodConstraints( new InvocationConstraints( new InvocationConstraint[] { Integrity.YES, ServerAuthentication.YES, new ConstraintAlternatives( new InvocationConstraint[] { new ServerMinPrincipal(principal.mercury), new ServerMinPrincipal(principal.tester) } ) }, null )), new Permission[] { new AuthenticationPermission( Collections.singleton(principal.outrigger), Collections.singleton(principal.tester), "connect"), new AuthenticationPermission( Collections.singleton(principal.outrigger), Collections.singleton(principal.mercury), "connect"), phoenixAuthenticationPermission, // for impl/mercury/InterOpTest phoenixGrantPermission // for impl/mercury/InterOpTest }); recoveredListenerPreparer = new BasicProxyPreparer( false, new Permission[] { new AuthenticationPermission( Collections.singleton(principal.outrigger), Collections.singleton(principal.tester), "connect"), new AuthenticationPermission( Collections.singleton(principal.outrigger), Collections.singleton(principal.mercury), "connect") }); transactionManagerPreparer = new BasicProxyPreparer( true, new BasicMethodConstraints( new InvocationConstraints( new InvocationConstraint[]{ Integrity.YES, ServerAuthentication.YES, new ServerMinPrincipal(principal.mahalo) }, null )), new Permission[] { new AuthenticationPermission( Collections.singleton(principal.outrigger), Collections.singleton(principal.mahalo), "connect") }); recoveredTransactionManagerPreparer = new BasicProxyPreparer( false, new Permission[] { new AuthenticationPermission( Collections.singleton(principal.outrigger), Collections.singleton(principal.mahalo), "connect") }); /* * Values for talking to the lookup service - lots missing */ private static reggieConstraints = new BasicMethodConstraints( new InvocationConstraints( new InvocationConstraint[] { Integrity.YES, ServerAuthentication.YES, new ServerMinPrincipal(principal.reggie) }, null )); private static reggiePermissions = new Permission[] { new AuthenticationPermission( Collections.singleton(principal.outrigger), Collections.singleton(principal.reggie), "connect") }; private reggiePreparer = new BasicProxyPreparer( true, reggieConstraints, reggiePermissions); lookupLocatorPreparer = reggiePreparer; recoveredLookupLocatorPreparer = new BasicProxyPreparer( false, reggiePermissions); /* * 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.outrigger), Collections.singleton(principal.phoenix), "connect") } ); activationIdPreparer = new BasicProxyPreparer( true, activationSystemConstraints, null); } // com.sun.jini.outrigger net.jini.lookup.JoinManager { registrarPreparer = com.sun.jini.outrigger.reggiePreparer; registrationPreparer = com.sun.jini.outrigger.reggiePreparer; serviceLeasePreparer = com.sun.jini.outrigger.reggiePreparer; } net.jini.discovery.LookupDiscovery { registrarPreparer = com.sun.jini.outrigger.reggiePreparer; discoveryConstraints = new BasicMethodConstraints( new MethodDesc[]{ new MethodDesc("unicastDiscovery", new InvocationConstraints( new InvocationConstraint[]{ ServerAuthentication.YES, Integrity.YES, new ServerMinPrincipal(principal.reggie), DiscoveryProtocolVersion.TWO, new MulticastMaxPacketSize(1024), new MulticastTimeToLive(multicast.ttl), new UnicastSocketTimeout(120000) // 2*60*1000 }, null )), new MethodDesc(new InvocationConstraints( new InvocationConstraint[]{ DiscoveryProtocolVersion.TWO, new MulticastMaxPacketSize(1024), new MulticastTimeToLive(multicast.ttl), new UnicastSocketTimeout(120000) // 2*60*1000 }, null )) } ); } // net.jini.discovery.LookupDiscovery net.jini.discovery.LookupLocatorDiscovery { registrarPreparer = com.sun.jini.outrigger.reggiePreparer; } exporter { name = "com.sun.jini.outrigger.serverExporter"; persistentExporter = new BasicJeriExporter( KerberosServerEndpoint.getInstance(0), new ProxyTrustILFactory( new BasicMethodConstraints( new InvocationConstraints( Integrity.YES, null)), AccessPermission.class)); transientExporter = persistentExporter; activatableExporter = new ActivationExporter( (ActivationID) $data, persistentExporter); }