<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Sean Mullan&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/" />
<modified>2008-03-21T20:45:17Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/mullan/263</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2008, mullan</copyright>
<entry>
<title>Apache XML Security 1.4.2 Beta 1 available for testing</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2008/03/apache_xml_secu_3.html" />
<modified>2008-03-21T20:45:17Z</modified>
<issued>2008-03-21T20:45:09Z</issued>
<id>tag:weblogs.java.net,2008:/blog/mullan/263.9401</id>
<created>2008-03-21T20:45:09Z</created>
<summary type="text/plain">I just posted the initial beta release of Apache XML Security 1.4.2. This release contains many bug fixes and a few enhancements, such as an implementation of Canonicalization 1.1.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>I just posted the <a href="http://people.apache.org/~mullan/dist/xmlsec-1.4.2beta1.jar ">initial beta release</a> of <a href="http://santuario.apache.org">Apache XML Security</a> 1.4.2. This release contains many bug fixes and a few enhancements, such as an implementation of <a href="http://www.w3.org/TR/xml-c14n11/">Canonical XML 1.1</a>.</p>

<p>If you use Apache XML Security or JSR 105 in your applications and products, please download it and test it and report any bugs or issues that you find on the <a href="http://santuario.apache.org/mail-lists.html">Apache XML Security mailing list</a>.</p>]]>

</content>
</entry>
<entry>
<title>Configuring the logging properties for JSR 105 and Apache XML Signature applications.</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2008/03/configuring_the.html" />
<modified>2008-03-13T20:29:35Z</modified>
<issued>2008-03-13T20:29:29Z</issued>
<id>tag:weblogs.java.net,2008:/blog/mullan/263.9359</id>
<created>2008-03-13T20:29:29Z</created>
<summary type="text/plain">A tip on how to configure the logging properties to help debug your JSR 105 and Apache XML Signature applications.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>A while ago, I blogged about <a href="http://weblogs.java.net/blog/mullan/archive/2006/02/more_xml_signat_1.html">XML Signature debugging</a> and how to configure the logging mechanism to emit debug information.</p>

<p>This configuration works if you are using the JSR 105 bundled with JDK 6. However, if you are using JSR 105 as bundled with <a href="http://santuario.apache.org/">Apache XML Security</a>, you need to make a tweak to the configuration file because some of the packages are named differently. Here are the diffs you should apply:<br />
<pre></p>

<p>< com.sun.org.apache.xml.internal.security.level = FINER<br />
---<br />
> org.apache.xml.security.level = FINER</p>

</pre> ]]>

</content>
</entry>
<entry>
<title>Using JSR 105 with JDK 1.4 or 1.5</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2008/02/using_jsr_105_w_1.html" />
<modified>2008-02-27T16:20:13Z</modified>
<issued>2008-02-27T16:20:09Z</issued>
<id>tag:weblogs.java.net,2008:/blog/mullan/263.9276</id>
<created>2008-02-27T16:20:09Z</created>
<summary type="text/plain">JSR 105 (XML Digital Signature API) is included with JDK 6, but is also available separately, for example as part of the Apache XML Security Project. This allows you to use the JSR with earlier JDK/JREs such as JDK 1.4 or JDK 5. </summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Security</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>JSR 105 (XML Digital Signature API) is included with JDK 6, but is also available separately, for example as part of the <a href="http://santuario.apache.org">Apache XML Security Project</a>. This allows you to use the JSR with earlier JDK/JREs such as JDK 1.4 or JDK 5. </p>

<p>If you do this, however, be aware that the JSR 105 service provider implementation is not included by default with JDK 1.4 or JDK 1.5, so you may get some exceptions when instantiating an <code>XMLSignatureFactory</code>:<p></p>

<pre></code>
XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");

<p>javax.xml.crypto.NoSuchMechanismException: Mechanism type DOM not available<br />
    at javax.xml.crypto.dsig.XMLDSigSecurity.getEngineClassName(Unknown Source)<br />
    at javax.xml.crypto.dsig.XMLDSigSecurity.getImpl(Unknown Source)<br />
    at javax.xml.crypto.dsig.XMLDSigSecurity.getImpl(Unknown Source)<br />
    at javax.xml.crypto.dsig.XMLSignatureFactory.findInstance <br />
</code></pre></p>

<p>The easiest workaround is to just instantiate and specify the service provider implementation (bundled with Apache XMLSec) as a parameter as follows:</p>

<pre>
XMLSignatureFactory factory = 
    XMLSignatureFactory.getInstance
        ("DOM", new org.jcp.xml.dsig.internal.dom.XMLDSigRI());
</pre>

<p>Alternatively, you can register the provider in the java.security file, or use the <code>java.security.Provider</code> API. See <a href="http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#ProviderInstalling">http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#ProviderInstalling</a><br />
"Registering a Provider" for more details. </p>]]>

</content>
</entry>
<entry>
<title>JavaPolis &apos;07</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2007/11/javapolis_07.html" />
<modified>2007-11-26T16:32:22Z</modified>
<issued>2007-11-26T16:32:15Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mullan/263.8705</id>
<created>2007-11-26T16:32:15Z</created>
<summary type="text/plain">I&apos;ll be speaking about XML Security and JSRs 105 and 106 at the upcoming JavaPolis conference in Antwerp, Belgium in December.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>If you are attending <a href="http://www.javapolis.com">JavaPolis '07</a>, come check out my talk. I'll be speaking about <a href="http://javapolis.com/confluence/display/JP07/XML+Security+and+JSR+105-106">XML Security and JSRs 105 and 106</a>. </p>

<p>This will be a great opportunity to learn more about the new Java APIs for XML Signature and Encryption. I'll be showing you programming examples using the new APIs, discussing tips from my blog, and taking a look at the future of XML Signature and Encryption. My session is on Thursday, December 13th at 2PM in Room 6. </p>]]>

</content>
</entry>
<entry>
<title>Even more XML Signature debugging tips</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2007/08/even_more_xml_s.html" />
<modified>2007-08-03T17:19:12Z</modified>
<issued>2007-08-03T17:19:05Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mullan/263.7971</id>
<created>2007-08-03T17:19:05Z</created>
<summary type="text/plain">In a previous blog entry, I talked about how to enable logging to get debugging output when using the Java XML DSig API to validate an XML Signature. There are also various methods in the API that you can invoke to get similar information.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Security</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>In <a href="http://weblogs.java.net/blog/mullan/archive/2006/02/more_xml_signat_1.html">a previous blog entry</a>, I wrote about how to enable logging to get debugging output when using the Java XML DSig API to validate an XML Signature. There are also various methods in the API that you can invoke to get similar information. Here are a couple of those which are probably most useful:</p>

<ol>
<li> <code>SignedInfo.getCanonicalizedData</code>

<p>This method will return an InputStream containing the canonicalized bytes of the SignedInfo element. This method is very useful for debugging signature verification failures; often these are due to subtle changes in the canonicalized bytes, such as XML marshallers that format or "pretty-print" the XML, inserting newlines and other whitespace that break the signature. Here's an example of how to use this API:</p>

<pre>
System.out.println("Canonicalized SignedInfo:");
InputStreamReader isr = 
    new InputStreamReader(si.getCanonicalizedData());
char[] cbuf = new char[1024];
while (isr.read(cbuf, 0, 1024) != -1) {
    System.out.print(cbuf);
}
System.out.println();
</pre>

<p>You should compare the SignedInfo element that is output with the SignedInfo element in the Signature.</p>

<p><li> <code>Reference.getDigestInputStream</code></p>

<p>This method returns the Reference's pre-digested input stream. Because this data can be potentially large and expensive to keep in memory, you must first enable reference caching. The data returned is the input to the digest operation during a validation or signing operation. This method is very useful for debugging reference validation failures as well as showing the user exactly what was signed, <a href="http://www.w3.org/TR/xmldsig-core/#sec-See">which is very important</a>. The usage of this API is similar to SignedInfo.getCanonicalizedData: </p>

<pre>
// enable reference caching in your validation context 
valContext.setProperty
    ("javax.xml.crypto.dsig.cacheReference", Boolean.TRUE);
System.out.println("Pre-digested Input:");
InputStreamReader isr = 
    new InputStreamReader(ref.getDigestInputStream());
char[] cbuf = new char[1024];
while (isr.read(cbuf, 0, 1024) != -1) {
    System.out.print(cbuf);
}
System.out.println();
</pre>
]]>

</content>
</entry>
<entry>
<title>Apache XML Security 1.4.1 is ready for download</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2007/06/apache_xml_secu_1.html" />
<modified>2007-06-08T19:51:15Z</modified>
<issued>2007-06-08T19:51:10Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mullan/263.7595</id>
<created>2007-06-08T19:51:10Z</created>
<summary type="text/plain">Apache XML Security 1.4.1 was released a few weeks ago but I never got
around to blogging about it. You should definitely upgrade to this
version if you are using 1.4.0. Here&apos;s why ...</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<a href="http://xml.apache.org/security/dist/java-library/">Apache XML Security 1.4.1</a> is ready for download. 

<p>This is a bugfix release that contains a major fix to the canonicalization engine. This bug was introduced in the 1.4.0 release, so it is highly recommended that anyone
using 1.4.0 upgrade to the 1.4.1 version. The bug is that signatures containing non ascii characters created by the 1.4.0 library are not generated according to the standard.

<p>Several other important bugs were fixed in 1.4.1. See the <a href="http://xml.apache.org/security/changes.html">changelog</a>
for more information.

]]>

</content>
</entry>
<entry>
<title>Java Security at JavaOne 2007</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2007/05/java_security_a.html" />
<modified>2007-05-04T21:15:42Z</modified>
<issued>2007-05-04T21:15:37Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mullan/263.7228</id>
<created>2007-05-04T21:15:37Z</created>
<summary type="text/plain">Wow, JavaOne is here again, next week to be exact! I hope you are going.
Come to one of our sessions to learn or discuss more about Java Security.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Security</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>Wow, JavaOne is here again, next week to be exact! I hope you are <br />
going. We have a bunch of new security features in the JDK and<br />
a number of things we are thinking about for the future.<br />
Come to one of our sessions to learn or discuss more about Java <br />
Security:</p>

<p>1. Ask the Experts about Java Security in the Java Pavilion (booth #1538)<br />
   Time: Tuesday, 12:30 - 1:30 PM</p>

<p>2. Session ID:  	 TS-2594<br />
   Session Title: 	Secure Coding Guidelines, Continued:  Preventing Attacks and Avoiding Antipatterns<br />
   Time: Wednesday, 9:35 AM - 10:35 AM</p>

<p>3. Session ID:  	 BOF-2516<br />
   Session Title: 	Stump the (Security) Band<br />
   Time: Thursday, 8:55 PM - 9:45 PM</p>]]>

</content>
</entry>
<entry>
<title>New article on XML Signatures</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2007/02/new_article_on.html" />
<modified>2007-02-28T15:23:49Z</modified>
<issued>2007-02-28T15:22:46Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mullan/263.6708</id>
<created>2007-02-28T15:22:46Z</created>
<summary type="text/plain">I have written a new article on java.sun.com titled &quot;Programming With the Java XML Digital Signature API&quot;.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Community: JDK</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>Check out my new technicle article on java.sun.com: <a href="http://java.sun.com/developer/technicalArticles/xml/dig_signature_api/">Programming With the Java XML Digital Signature API</a>. 

<p>This article introduces you to the <b>new</b> XML Digital Signature API in JDK 6 and shows you how to generate and validate an XML Signature using the API. If you want to know more about XML Signatures and how to process them in Java, then start with this article. And let me know if you have any feedback. Thanks!]]>

</content>
</entry>
<entry>
<title>Apache Java XML Security 1.4 released!</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2007/01/apache_java_xml_2.html" />
<modified>2007-01-29T20:25:05Z</modified>
<issued>2007-01-29T20:24:59Z</issued>
<id>tag:weblogs.java.net,2007:/blog/mullan/263.6433</id>
<created>2007-01-29T20:24:59Z</created>
<summary type="text/plain">Apache Java XML Security 1.4 has just been released. This release 
contains an implementation of JSR 105, the standard Java XML Digital
Signature API. </summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Security</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[Apache Java XML Security 1.4 has just been released. This is the first release that contains an implementation of <a href="http://jcp.org/en/jsr/detail?id=105">JSR 105</a>, the standard Java XML Digital Signature API. It also contains several performance and memory reduction improvements. See the <a href="http://xml.apache.org/security/">website</a> for more details and a download link.]]>

</content>
</entry>
<entry>
<title>Security Feature Planning for JDK 7</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2006/08/security_featur.html" />
<modified>2006-08-25T17:41:48Z</modified>
<issued>2006-08-25T17:41:42Z</issued>
<id>tag:weblogs.java.net,2006:/blog/mullan/263.5429</id>
<created>2006-08-25T17:41:42Z</created>
<summary type="text/plain">We would like your feedback! Help us by giving us suggestions on the security features for the next release of Java SE (JDK 7).</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Security</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>
In <a href="http://blogs.sun.com/andreas/entry/security_feature_planning_for_jdk">a recent blog</a> of my colleague Andreas Sterbenz, he asks the Java community for input on the security features for JDK 7. Specifically, he writes:
<p>
<blockquote>
Let us know your suggestions for features in the security area including topics such as crypto, PKI, SSL, Kerberos, security manager + policy, authorization + JAAS, SASL, XML security, secure coding, performance, ease of use and administration, and everything else related to security. Or if you don't have a specific suggestion but find that there are some things that really annoy you or that you cannot do, we want to hear about that us well.
</blockquote>
<p>
So I am posing the same question on my blog. Feel free to send your suggestions as comments on my or Andreas blog or directly to me at <a href="mailto:sean.mullan@sun.com?subject=JDK 7 Security Feature Suggestion">sean.mullan@sun.com</a>, and together we'll collect all the feedback. As Andreas mentions, due to our limited resources, we will not be able to accomodate all requests. And of course, all Java SE platform features are subject to JCP approval.
<p>
Thanks for your feedback!]]>

</content>
</entry>
<entry>
<title>New java.sun.com article on XML Digital Signatures</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2006/07/new_javasuncom.html" />
<modified>2006-07-14T20:02:27Z</modified>
<issued>2006-07-14T20:02:20Z</issued>
<id>tag:weblogs.java.net,2006:/blog/mullan/263.5189</id>
<created>2006-07-14T20:02:20Z</created>
<summary type="text/plain">There&apos;s a new article on the front page of java.sun.com on XML Digital Signatures
and the new Java XMLDSig API (JSR 105).</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Security</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>There's a new java.sun.com article titled <a href="http://java.sun.com/developer/technicalArticles/xml/dig_signatures/">Java XML Digital Signatures</a>. It includes an introduction to XML digital signatures and to the new Java XML Digital Signatures APIs (JSR 105). It also discusses how to accelerate Java XML digital signature performance using cryptographic hardware accelerators such as Sun's UltraSPARC T1 processor with cryptographic acceleration support. The article was written by Sun's Java Web Services Security and Performance Team.</p>]]>

</content>
</entry>
<entry>
<title>Extending JSR 105 to support more URI reference types</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2006/06/supporting_addi.html" />
<modified>2006-06-28T18:25:47Z</modified>
<issued>2006-06-28T18:24:29Z</issued>
<id>tag:weblogs.java.net,2006:/blog/mullan/263.5111</id>
<created>2006-06-28T18:24:29Z</created>
<summary type="text/plain">The reference implementation of JSR 105 (Java XML Digital Signature API) includes support for all of the required or recommended URI reference types (http, same-document, and null/barename/same-document XPointers). But sometimes this may not be enough. This blog shows you how to extend the API to add support for more URI reference types.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Security</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>In XML Signatures, Reference elements use URIs to describe the data that is to be digested and signed. Adding support for your own URI dereferencing implementation is pretty straightforward in <a href="http://jcp.org/en/jsr/detail?id=105">JSR 105</a>. First you need to create a concrete implementation of the <code><a href="http://download.java.net/jdk6/docs/api/javax/xml/crypto/URIDereferencer.html">javax.xml.crypto.URIDereferencer</a></code> interface, ex:<br />
<code><br />
public class MyURIDereferencer implements URIDereferencer {<br />
    ...<br />
</code><br />
There is only one method in <code>URIDereferencer</code> that you need to provide an implementation for: the <code>dereference</code> method:<br />
<code><br />
Data dereference(URIReference uriReference, <br />
                 XMLCryptoContext context) <br />
                 throws URIReferenceException<br />
</code><br />
This method takes a <code>URIReference</code> object describing the URI to be dereferenced and an <code>XMLCryptoContext</code> object that may contain additional information (such as the base URI) that is helpful in dereferencing the URI. The method returns a <code>Data</code> object containing the dereferenced data. The API defines two subclasses of <code>Data</code>: <code>OctetStreamData</code> for holding byte streams, and <code>NodeSetData</code> for holding node-sets.</p>

<p>Once you have implemented your <code>URIDereferencer</code>, it can be set as the default <code>URIDereferencer</code> by invoking the <code>XMLCryptoContext.setURIDereferencer</code> method (which takes a <code>URIDereferencer</code> argument), ex:</p>

<p><code><br />
context.setURIDereferencer(new MyURIDereferencer());<br />
</code></p>

<p>Does this mean <code>MyURIDereferencer</code> is responsible for dereferencing all URI types? Yes. But what if I want to continue to use the built-in support and only add support for new types? Well you can do that too. In your <code>URIDereferencer</code> implementation, you should add some code to fallback to the built-in <code>URIDereferencer</code> for URI types that you do not support. You can do this by calling the <code>XMLSignatureFactory.getURIDereferencer</code> method which returns a reference to the <code>XMLSignatureFactory</code>'s built-in  implementation of <code>URIDereferencer</code>. </p>

<p>You can get the reference implementation of JSR 105 from the <a href="http://java.sun.com/webservices/downloads/webservicespack.html">Java Web Service Developer's Pack v2.0</a>, <a href="https://mustang.dev.java.net/">the beta 2 release or latest  snapshot of JDK 6 (Mustang)</a>, or <a href="http://java.sun.com/javaee/glassfish">GlassFish</a>.</p>]]>

</content>
</entry>
<entry>
<title>Java SE Security Sessions at JavaOne</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2006/05/java_se_securit.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-05-10T14:33:58Z</issued>
<id>tag:weblogs.java.net,2006:/blog/mullan/263.4686</id>
<created>2006-05-10T14:33:58Z</created>
<summary type="text/plain">For those attending JavaOne next week, there are a couple of sessions related to Java Security that you may want to check out.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>JavaOne</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[JavaOne is right around the corner, next week to be precise. If you are going, I encourage you to check out one (or both) of the technical sessions/BOFs related to Java Security:

<ul>
<li><a href="https://www28.cplan.com/javaone06_cv_124_1/session_details.jsp?isid=278238&ilocation_id=124-1&ilanguage=english">TS-1238:  Secure Coding Antipatterns: Avoiding Vulnerabilities</a>. This session covers some common programming mistakes that can lead to security issues. More important, it shows you how to avoid them. We combed through past Java™ technology security vulnerabilities and other sources of information to come up with a list of security antipatterns that demonstrate some of the more commonly recurring problems. In each case, we discuss what is wrong and what is the proper fix.<br>
Thursday 1:30PM-2:30PM, Moscone Center Gateway 102/103
<li><a href="https://www28.cplan.com/javaone06_cv_124_1/session_details.jsp?isid=277600&ilocation_id=124-1&ilanguage=english">BOF-0600: Meet the Java™ Platform, Standard Edition (Java SE) Security Team</a>. This BOF will feature a short presentation discussing the new security features in Mustang and will be followed by an informal Q&A with the security team where you can ask questions about anything related to Java SE security.<br>
Thursday, 10:30PM-11:20PM, Moscone Center Gateway 102/103
</ul>]]>

</content>
</entry>
<entry>
<title>Mustang Beta is out! Here&apos;s what is new in Security</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2006/02/mustang_beta_is_1.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-02-15T16:19:39Z</issued>
<id>tag:weblogs.java.net,2006:/blog/mullan/263.4112</id>
<created>2006-02-15T16:19:39Z</created>
<summary type="text/plain">Mustang Beta (JDK 6) was released today and contains many new security features. </summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Community: JDK</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<a href="http://java.sun.com/javase/6">Mustang Beta</a> (JDK 6) was released today and contains many new security features:
<ul>
<li><b><a href="http://jcp.org/en/jsr/detail?id=105">JSR 105,</a> the Java XML Digital Signature API and implementation.</b>
<li><b>Native Platform GSS/Kerberos Integration.</b> This feature allows Java GSS applications to take advantage of features in the native GSS/Kerberos implementation available on the platform.
<li><b>Support for Smart Card I/O API.</b> The Sun JDK bundles the Smart Card I/O API defined by <a href="http://jcp.org/en/jsr/detail?id=268">JSR 268</a>. It also includes a provider that implements Smart Card I/O using the PC/SC functionality of the host platform. This gives Java applications a platform independent way to communicate with Smart Cards using ISO 7816 APDUs.
<li><b>Access to native PKI and cryptographic services on Microsoft Windows.</b> Added the SunMSCAPI JCE provider which uses the Microsoft CryptoAPI (CAPI) to offer a variety of RSA cryptographic functions. It acts as a bridge between Java applications and the services offered by the default RSA cryptographic service provider available via CAPI. It provides access to X.509 certificates and RSA key pairs, it performs RSA encryption and decryption, and it creates and validates RSA signatures. It also supports a cryptographic random number generator.
<li><b>Support for SPNEGO in Java GSS.</b> The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism is a pseudo security mechanism that enables GSS-API peers to securely negotiate a common security mechanism to be used.
<li><b>JSSE pluggability restrictions have been removed.</b> You can now
plug in 3rd party JSSE providers that implement non-standard ciphersuites.
<li><b>JAAS-based authentication using LDAP.</b> Added a JAAS login module which enables users to perform authentication using credentials stored in an LDAP directory service.
<li><b>JSSE (SSL/TLS) FIPS 140 compliance.</b> The SunJSSE provider now supports an experimental FIPS 140 compliant mode. When enabled and used in combination with the SunPKCS11 provider and an appropriate FIPS 140 certified PKCS#11 token, SunJSSE is FIPS 140 compliant.
<li><b>Socket read timeouts are fully supported by SunJSSE SSLSockets.</b> In previous releases, calling setSoTimeout() would sometimes lead to unpredictable results. This has been corrected.
<li><b>Support for the Kerberos AES and RC4-HMAC Encryption Types.</b>
<li><b>Support for new Kerberos Pre-Authentication Mechanisms.</b>
<li><b>Enhancements to the implementation of PKI Certificate Path Builder and Validator.</b> Added support for segmented and indirect CRLs and the authority information access extension, resulting in improved performance, path discovery, and PKIX compliance (RFC 3280).
</ul>

See the <a href="http://java.sun.com/javase/6/docs/guide/security/index.html">Mustang security documentation</a> for more details on these and all of the features of Java security.]]>

</content>
</entry>
<entry>
<title>More XML Signature debugging tips</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mullan/archive/2006/02/more_xml_signat_1.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-02-14T16:24:20Z</issued>
<id>tag:weblogs.java.net,2006:/blog/mullan/263.4097</id>
<created>2006-02-14T16:24:20Z</created>
<summary type="text/plain">Here&apos;s how to enable logging to get detailed debugging messages when using the Java XML Digital Signature API.</summary>
<author>
<name>mullan</name>

<email>Sean.Mullan@Sun.COM</email>
</author>
<dc:subject>Security</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mullan/">
<![CDATA[<p>In a <a href="http://weblogs.java.net/blog/mullan/archive/2006/01/my_xml_signatur_1.html">previous blog entry</a>, I discussed how to determine what caused an invalid XML Signature and provided some code snippets. But for some programmers, this information may not be enough, and you may want to know more details.</p>

<p>Well then, good news. The reference implementation of XML DSig has extensive logging support, that when enabled, will provide you with lots of additional information. The log messages use the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/package-summary.html">JDK logging facility</a> (<code>java.util.logging</code>) so if you are familiar with how to format and configure that, you should breeze through the rest of my blog.</p>

<p>I'll show you two different ways to enable this logging, first if you are running your application from the command-line, and second if you are running it inside a J2EE container, in this case - <a href="http://java.sun.com/j2ee/1.4/download.html">Sun's Java System Application Server</a>.</p>

<p>If you are running your application from the java command line, you need to configure the logging facility so that the XML DSig logging messages are emitted. You can do this by editing the JRE's default logging.properties file directly, or by creating your own file and set it with the <code>java.util.logging.config.file property</code>, ex:</p>

<pre>
java -Djava.util.logging.config.file=logging.properties ...
</pre>

<p>where logging.properties contains:</p>

<pre>
handlers= java.util.logging.ConsoleHandler
.level= INFO
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
org.jcp.xml.dsig.internal.level = FINER 
com.sun.org.apache.xml.internal.security.level = FINER
</pre>

<p>This will emit XML DSig log messages of level FINER and higher to the console. All other components will emit log messages of level INFO and higher.</p>

<p>With Sun's Application Server, enable logging using the Application Server admin console:</p>

<p>- In the tree component, select the Application Server node.<br />
- Click the Logging tab.<br />
- On the Logging Settings page, click the Log Levels tab.<br />
- Add a new property named "org.jcp.xml.dsig.internal" with value "FINER"<br />
- Add a new property named "com.sun.org.apache.xml.internal.security" with value "FINER"<br />
- Click Save to save the changes</p>

<p>The log messages will be written to the application server log file.</p>

<p>I won't describe each and every log message in detail, but some of the most helpful are the following:<br />
<pre>[java] FINER: Pre-digested input: ...</pre><br />
This message displays the content of the referenced data just before it was digested.<br />
<pre>[java] FINE: Expected digest: ...<br />
[java] FINE: Actual digest: ...</pre><br />
This message displays the expected and actual base64 encoded digest values of a Reference.<br />
<pre>[java] FINE: Canonicalized SignedInfo: ...</pre><br />
This message displays the canonicalized SignedInfo element before it is signed.</p>

<p>You can get the reference implementation of JSR 105 from the <a href="http://java.sun.com/webservices/downloads/webservicespack.html">Java Web Service Developer's Pack v2.0</a>, an <a href="https://mustang.dev.java.net/">early access snapshot of JDK 6 (Mustang)</a>, or <a href="http://java.sun.com/javaee/glassfish">GlassFish</a>.</p>]]>

</content>
</entry>

</feed>