From 209fae2c6e76f3f1f65d4226ce3e9735fd190a24 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sun, 29 Jul 2007 21:30:06 +0000
Subject: [PATCH] Implement support for restricting the set of tasks that can be invoked in the server.  A new configuration attribute, ds-cfg-allowed-task, is now available in the cn=config entry, and any attempt to invoke a task whose fully-qualified class name is not included in this attribute will be rejected.

---
 opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java b/opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java
index 493f138..942417a 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java
@@ -3227,6 +3227,16 @@
 
 
   /**
+   * The message ID for the message that will be used if an attempt is made to
+   * schedule a task that is not included in the set of allowed tasks.  This
+   * takes a single argument, which is the name of the target class.
+   */
+  public static final int MSGID_TASKSCHED_NOT_ALLOWED_TASK =
+       CATEGORY_MASK_BACKEND | SEVERITY_MASK_SEVERE_ERROR | 298;
+
+
+
+  /**
    * Associates a set of generic messages with the message IDs defined in this
    * class.
    */
@@ -4238,6 +4248,9 @@
                     "The provided task entry contains multiple values for " +
                     "the %s attribute, which is used to specify the task " +
                     "class name, but only a single value is allowed");
+    registerMessage(MSGID_TASKSCHED_NOT_ALLOWED_TASK,
+                    "The Directory Server is not configured to allow task " +
+                    "%s to be invoked");
     registerMessage(MSGID_TASKSCHED_CANNOT_LOAD_CLASS,
                     "An error occurred while attempting to load class %s " +
                     "specified in attribute %s of the provided task entry:  " +

--
Gitblit v1.10.0