/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Configuration source file for Kerberos Phoenix */ import com.sun.jini.phoenix.*; import javax.security.auth.kerberos.KerberosPrincipal; import javax.security.auth.login.LoginContext; import net.jini.constraint.BasicMethodConstraints; import net.jini.core.constraint.ClientAuthentication; import net.jini.core.constraint.Integrity; import net.jini.core.constraint.InvocationConstraint; import net.jini.core.constraint.InvocationConstraints; import net.jini.core.constraint.ServerMinPrincipal; import net.jini.core.constraint.ServerAuthentication; import net.jini.jeri.kerberos.KerberosServerEndpoint; import net.jini.jeri.BasicJeriExporter; import net.jini.jeri.ProxyTrustILFactory; import net.jini.security.BasicProxyPreparer; com.sun.jini.phoenix { registryExporter = new RegistrySunExporter(); private kerberosPort = 2000; // pick one, cannot be 1098 private daemonEndpoint = KerberosServerEndpoint.getInstance(kerberosPort); private integrity = new BasicMethodConstraints( new InvocationConstraints(Integrity.YES, null)); systemExporter = new BasicJeriExporter(daemonEndpoint, new SystemAccessProxyTrustILFactory(integrity), false, true, PhoenixConstants.ACTIVATION_SYSTEM_UUID); activatorExporter = new BasicJeriExporter(daemonEndpoint, new ProxyTrustILFactory(integrity, null), false, true, PhoenixConstants.ACTIVATOR_UUID); monitorExporter = new BasicJeriExporter(daemonEndpoint, new ProxyTrustILFactory( integrity, MonitorPermission.class)); private groupEndpoint = KerberosServerEndpoint.getInstance(0); private static phoenix = new KerberosPrincipal("${phoenixPrincipal}"); private static mutualAuth = new BasicMethodConstraints(new InvocationConstraints( new InvocationConstraint[]{ Integrity.YES, ClientAuthentication.YES, ServerAuthentication.YES, new ServerMinPrincipal(phoenix)}, null)); instantiatorPreparer = new BasicProxyPreparer(true, mutualAuth, null); monitorPreparer = instantiatorPreparer; systemPreparer = instantiatorPreparer; loginContext = new LoginContext("com.sun.jini.Phoenix"); persistenceDirectory = "lib${/}phoenix-log"; groupConfig = new String[] { "config${/}krb-phoenix-group.config" }; }// end com.sun.jini.phoenix