[Previous] [Next] [Contents] [Index]
This chapter describes the Universal User Library (UUL). This chapter includes the following sections:
2.3 context_ptr_type Definition
2.4 Interface Description
2.5 Error Codes
2.1 UUL Overview
The following diagram shows the logical location of the UUL with respect to other server elements.
Figure 2-1: UUL Logical Relationships
Notice that you use NetCrusader Commander to manage the ACL database for this particular server, as well as for managing user information in the NetCrusader Security Server.
2.2 How NetCrusader/Web Maps Identities
Figure 2-2 shows how and where mapping occurs within the NetCrusader/Web environment.
This section describes the functions that make up the UUL. Functions are listed in alphabetical order.
uul_free_credentials()
uul_get_credentials()
uul_get_delegation()
uul_get_principal()
uul_initialize()
uul_nsapi_create_context()
uul_terminate()
uul_free_context()
Frees the memory pointed to by the LoginContext.
Signature
unsigned long int uul_free_context (
uul_handle handle,
sec_login_handle_t* LoginContext);
Parameters
Returns
Returns one of the following error codes (for definitions, see Section 2.5 on page 28):
UUL_NO_ERROR
UUL_INVALID_CONTEXT_POINTER
UUL_CONTEXT_INVALID
UUL_INVALID_HANDLE
uul_free_credentials()
Frees the memory pointed to by the CredsPointer.
Signature
unsigned long int uul_free_credentials(
uul_handle handle,
uul_creds_ptr CredsPointer);
Parameters
Returns
Returns one of the following error codes (for definitions, see Section 2.5 on page 28):
UUL_INVALID_HANDLE
UUL_MEMORY_DELETION_ERROR
UUL_NO_ERROR
uul_get_credentials()
Gets a set of credentials handle for the user associated with the current session.
Signature
unsigned long int uul_get_credentials (
uul_handle handle,
int context_ptr_type,
void * context_ptr,
uul_creds_ptr * CredsPointer);
Parameters
Usage
Use uul_get_credentials() to get a credentials handle for the user making a web request to access data. You can then check the user's permission to access the data by passing the credentials handle to the Authorization Library call authz_acl_authorized() (Page 36). You can also view the user's complete set of permissions to this object by passing the credentials handle to authz_acl_permissions() (Page 37). Once you are done with the credentials, free the memory allocated to them by calling uul_free_credentials() (Page 18).
Returns one of the following error codes (for definitions, see Section 2.5 on page 28):
UUL_ACCOUNT_INVALID
UUL_CONTEXT_INVALID
UUL_DIRECTORY_UNAVAILABLE
UUL_ERROR_ON_SERVER_VARIABLE
UUL_NO_ERROR
UUL_INVALID_CONTEXT_POINTER
UUL_INVALID_HANDLE
UUL_PASSWORD_INVALID
UUL_PASSWORD_NULL
UUL_PREAUTHENTICATION_FAILURE
UUL_MEMORY_DELETION_ERROR
UUL_NO_ENTRUST_FILTER
UUL_NO_MEMORY
UUL_UNKNOWN_ERROR
UUL_USER_DOES_NOT_EXIST
uul_get_delegation()
Gets a delegatable DCE login context for the user associated with the current session.
Signature
unsigned long int uul_get_delegation (
uul_handle handle,
int context_ptr_type,
void * context_ptr,
sec_login_handle_t * DelegationCreds);
Parameters
Usage
Use the uul_get_delegation() to get a delegatable login context for the user making a web request to access data. You can then make a call to a Kerberos application on behalf of this user.Once you are done with the context, free the memory allocated to them by calling uul_free_context() (Page 17).
When the UUL creates the login context, it includes the members of the Delegation Group as the list of allowed delegates. The net result is that the request cannot be accepted by a Kerberos application that does not appear in this list. You configure the name of the Delegation Group through the Security Adapter configuration program, which is described in the NetCrusader/Web Overview Guide. Use Commander to modify the group's contents (see the Commander online help for more information).
Returns
Returns one of the following error codes (for definitions, see Section 2.5 on page 28):
UUL_CONTEXT_INVALID
UUL_DIRECTORY_UNAVAILABLE
UUL_DN_DOES_NOT_EXIST
UUL_ERROR_ON_SERVER_VARIABLE
UUL_INVALID_HANDLE
UUL_MEMORY_DELETION_ERROR
UUL_NO_ENTRUST_FILTER
UUL_NO_ERROR
UUL_NO_MEMORY
UUL_UNKNOWN_ERROR
UUL_USER_DOES_NOT_EXIST
uul_get_principal()
Maps a set of user credentials to the corresponding principal name.
Signature
unsigned long int uul_get_principal (
uul_handle handle,
uul_creds_ptr CredsPointer,
char * NameBuffer,
int * NameBufferLength);
Parameters
Usage
First use uul_get_credentials() (Page 19) to get a credentials handle for the user making a web request to access data. You can then obtain the user's principal name by passing the credentials handle uul_get_principal().
If successful, NameBuffer contains the name of the principal associated with the credentials in CredsPointer, and NameBufferLength contains the length of the principal name (in bytes).
Returns
Returns one of the following error codes (for definitions, see Section 2.5 on page 28):
UUL_INVALID_CREDENTIALS
UUL_INVALID_HANDLE
UUL_NO_ERROR
UUL_STRING_INCOMPLETE
If this call returns UUL_STRING_INCOMPLETE, the buffer you supplied in NameBuffer was too small for the actual name. In this situation, the NameBuffer contains as much of the name as possible (NULL terminated), and NameBufferLength contains the size of the buffer required to retrieve the entire name.
uul_initialize()
Initializes the UUL. You must initialize the UUL before you can use it.
Signature
unsigned long int uul_initialize (
unsigned long int Requested_Major_Revision
unsigned long int Requested_Minor_Revision,
int context_ptr_type
uul_handle * uul_session_handle);
Parameters
Usage
You initialize the UUL once per thread. You can initialize more than one session per program instance. You must terminate all sessions by calling uul_terminate() (Page 27) before the program shuts down.
The UUL is backwards compatible. If you request a version older than the current DLL, the call succeeds. However, if you request a version later than the current DLL, the call fails.
Returns
Returns one of the following error codes (for definitions, see Section 2.5 on page 28):
UUL_NO_ERROR
UUL_NO_MEMORY
UUL_REVISION_NOT_SUPPORTED
uul_nsapi_create_context()
NOTE: This function is supported only for backwards compatibility. For new applications, use UUL_NSAPI_EXTENSION as a context pointer type. For more information, see the discussion of the context_ptr_type in Section 2.3 on page 15.
Creates a context data structure for NSAPI that can be used by the uul_get_credentials() (Page 19) and uul_get_delegation() (Page 21) functions.
void * uul_nsapi_create_context (
void * SN
void * rq);
Parameters
IN/OUT
Parameter
Description
IN
SN
Netscape session pointer.
IN
rq
Netscape request pointer.
Usage
NSAPI server plug-ins use this call to create a context of UUL_NSAPI_PLUGIN type.
Returns
If successful, this call returns a void* pointer that you can pass to the uul_get_credentials() and uul_get_delegation() functions as a context pointer.
uul_terminate()
Ends this UUL session. You must call uul_terminate() to free resources used by the UUL.
Signature
unsigned long int uul_terminate (
uul_handle uul_session_handle
int context_ptr_type);
Parameters
Returns
Returns one of the following error codes (for definitions, see Section 2.5 on page 28):
UUL_MEMORY_DELETION_ERROR
UUL_NO_ERROR
2.5 Error Codes
[Previous] [Next] [Contents] [Index]
To make comments or ask for help, contact support@entegrity.com.