admin@glassfish.java.net

Re: Code review

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Tue, 30 Jan 2007 15:03:19 -0800

Nandini,

Context is unclear to me, can you summarize what caused the problem
and how the fix addresses it?

Lloyd

On Jan 30, 2007, at 2:36 PM, Nandini Ektare wrote:

> Please review.
>
> Following were the changes that should have been done for JKS
> changes for GF v2. This broke the NodeAgent and Instance sync when
> master password was other than changeit.
> I will create a bug and add the checkins log after review.
>
> QLs pass.
>
> Thanks,
> Nandini
>
> $ cvs diff -u NodeAgent.java
> Index: NodeAgent.java
> ===================================================================
> RCS file: /cvs/glassfish/admin-ee/nodeagent/src/java/com/sun/
> enterprise/ee/nodeagent/NodeAgent.java,v
> retrieving revision 1.6
> diff -u -r1.6 NodeAgent.java
> --- NodeAgent.java 23 Jan 2007 04:33:03 -0000 1.6
> +++ NodeAgent.java 30 Jan 2007 22:16:57 -0000
> @@ -1712,7 +1712,12 @@
> private void setPasswords(final AgentConfig ac) {
> ac.put(AgentConfig.K_DAS_USER, IdentityManager.getUser());
> ac.put(AgentConfig.K_DAS_PASSWORD,
> IdentityManager.getPassword());
> - ac.put(AgentConfig.K_MASTER_PASSWORD,
> IdentityManager.getMasterPassword());
> + String mp = IdentityManager.getMasterPassword();
> + ac.put(AgentConfig.K_MASTER_PASSWORD, mp);
> + // Also make sure to have the system properties new JKS
> loading will
> + // require in the NodeAgent VM. This was missed during
> JKS changes
> + System.setProperty("javax.net.ssl.keyStorePassword", mp);
> + System.setProperty("javax.net.ssl.trustStorePassword", mp);
> }
>
> private ClientPluggableFeatureFactory getFeatureFactory() {
> @@ -1761,6 +1766,10 @@
> System.getProperty("javax.net.ssl.keyStore"));
> ar.add("-D" + "javax.net.ssl.trustStore" + "=" +
> System.getProperty("javax.net.ssl.trustStore"));
> + ar.add("-D" + "javax.net.ssl.keyStorePassword" +
> "=" +
> + System.getProperty
> ("javax.net.ssl.keyStorePassword"));
> + ar.add("-D" + "javax.net.ssl.trustStorePassword" +
> "=" +
> + System.getProperty
> ("javax.net.ssl.trustStorePassword"));
> }
> } else {
> ar.add("-D" + SystemPropertyConstants.NSS_ROOT_PROPERTY
> + "=" +
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>