You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2007/07/19 02:08:14 UTC
svn commit: r557432 -
/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandlerTest.java
Author: erodriguez
Date: Wed Jul 18 17:08:13 2007
New Revision: 557432
URL: http://svn.apache.org/viewvc?view=rev&rev=557432
Log:
Warnings clean-up: Added Javadocs to the new KerberosProtocolHandlerTest.
Modified:
directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandlerTest.java
Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandlerTest.java?view=diff&rev=557432&r1=557431&r2=557432
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandlerTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandlerTest.java Wed Jul 18 17:08:13 2007
@@ -73,6 +73,9 @@
private DummySession session;
+ /**
+ * Creates a new instance of KerberosProtocolHandlerTest.
+ */
public KerberosProtocolHandlerTest()
{
config = new KdcConfiguration();
@@ -109,6 +112,9 @@
}
+ /**
+ * Tests the protocol version number, which must be '5'.
+ */
public void testProtocolVersionNumber()
{
RequestBodyModifier modifier = new RequestBodyModifier();
@@ -126,6 +132,10 @@
}
+ /**
+ * Tests that Kerberos reply messages sent to the KDC will be rejected with the
+ * correct error message.
+ */
public void testIncorrectMessageDirection()
{
KdcRequest message = new KdcRequest( 5, MessageType.KRB_AS_REP, null, null );
@@ -144,6 +154,9 @@
}
+ /**
+ * Tests that a non-existent client principal returns the correct error message.
+ */
public void testClientNotFound()
{
RequestBodyModifier modifier = new RequestBodyModifier();
@@ -161,6 +174,11 @@
}
+ /**
+ * Tests when the KDC configuration requires pre-authentication by encrypted
+ * timestamp that an AS_REQ without pre-authentication is rejected with the
+ * correct error message.
+ */
public void testPreAuthenticationRequired()
{
RequestBodyModifier modifier = new RequestBodyModifier();
@@ -178,6 +196,11 @@
}
+ /**
+ * Tests that a non-existent server principal returns the correct error message.
+ *
+ * @throws Exception
+ */
public void testServerNotFound() throws Exception
{
RequestBodyModifier modifier = new RequestBodyModifier();
@@ -200,6 +223,10 @@
}
+ /**
+ * Tests that when a client principal is not configured with Kerberos keys that
+ * the correct error message is returned.
+ */
public void testClientNullKey()
{
RequestBodyModifier modifier = new RequestBodyModifier();
@@ -217,6 +244,12 @@
}
+ /**
+ * Tests that when a server principal is not configured with Kerberos keys that
+ * the correct error message is returned.
+ *
+ * @throws Exception
+ */
public void testServerNullKey() throws Exception
{
RequestBodyModifier modifier = new RequestBodyModifier();
@@ -239,6 +272,12 @@
}
+ /**
+ * Tests that a user-specified end time is honored when that end time does not
+ * violate policy.
+ *
+ * @throws Exception
+ */
public void testSpecificEndTime() throws Exception
{
RequestBodyModifier modifier = new RequestBodyModifier();
@@ -269,6 +308,13 @@
}
+ /**
+ * Tests when an end time is requested that exceeds the maximum end time as
+ * configured in policy that the maximum allowable end time is returned instead
+ * of the requested end time.
+ *
+ * @throws Exception
+ */
public void testEndTimeExceedsMaximumAllowable() throws Exception
{
RequestBodyModifier modifier = new RequestBodyModifier();
@@ -301,6 +347,11 @@
}
+ /**
+ * Tests that RENEWABLE and RENEWABLE_OK are mutually exclusive. RENEWABLE_OK
+ * should be set by default, but if a request is made for a RENEWABLE ticket then
+ * the RENEWABLE_OK flag should be cleared.
+ */
public void testRenewableOk()
{
// RENEWABLE_OK defaulted on.
@@ -308,8 +359,6 @@
// {
// clear renewable_ok
// }
-
- // renewable and renewable_ok should not be set at the same time.
}
@@ -363,7 +412,7 @@
}
- public Object getMessage()
+ private Object getMessage()
{
return message;
}
@@ -371,6 +420,7 @@
protected void updateTrafficMask()
{
+ // Do nothing.
}