User Authentication from Inside SDKs

The Enterprise Edition of Sybase CEP supports a user authentication feature. This enables an administrator to limit access to the Sybase CEP Server, or to certain objects within the server.

Note: This section applies only to the Enterprise Edition of . If you are using the Professional Edition, you may skip this section.

If user authentication is enabled, then client applications, such as out-of-process adapters and programs that register queries, must authenticate themselves with the server by providing a username and password when calling certain API functions.

The following operations require authentication:

The Sybase CEP C/C++, Java 1.5, and .NET3 SDKs support user authentication.

In general, you will follow these steps to authenticate:

  1. Create or obtain an empty C8UserCredentials object.
  2. Fill in the C8UserCredentials object with the user name and password.
  3. Perform the desired operations (for example, connect to a stream).
  4. Destroy the credentials.

    This process assumes that you have already server has already been configured to request user authentication.

    Depending on which user authentication rules have been established, a single program might need to perform authentication for some operations and not for others. For example, if any user is allowed to subscribe to a stream, but only certain users are allowed to start and stop the project that contains that stream, then a client program that starts and stops the project and also subscribes to the stream will follow the user authentication rules for starting the stream but not for subscribing to it.

    For more information about user authentication, including how to turn the feature on and how to configure it, see the Sybase CEP Installation Guide .

    If you will be creating your own plugin to do custom authentication, see How to Implement Manager HA with the Sybase CEP Generic Plugin.