This sample describes how access to an HTTP service can be managed by enforcing Basic Authentication on a process starter activity. In this sample, the Basic Authentication Policy is associated with the 
	 HTTP Receiver Activity and configured to verify user credentials using LDAP authentication. 
  
 
	 Prerequisites
 
		You must be connected to an LDAP server and have user and group information stored in that server. 
		
 
	 Procedure
-  
		  In the 
			 samples directory, select 
			  and double-click 
			 tibco.bw.sample.policy.basicauthentication.HttpReceiver.zip. For more information, see 
			 Accessing Samples . 
		   
		
-  
		  In the 
			 Project Explorerview, expand the 
			 tibco.bw.sample.policy.basicauthentication.HttpReceiver.zip project. 
		   
		
-  
		   In the 
			 Project Explorer view, click 
			 . 
		   
		
-  
		  Fully expand the 
			 Processes directory and double-click 
			 HttpReceiverProcess.bwp 
			 . 
		   
		
-  
		  In the Resource Editor, configure the following properties in the 
			 LDAP Authentication section under the 
			 Connection tab: 
		   
		   
			 - Server URL: LDAP Server Location, such as, 
				ldap://localhost:389 
			 
- User Search Expression: search expression for the user, such as 
				(&(cn={0])(objectclass=user)) 
			 
- User DN Template: user distinguished name template, such as 
				cn={0},cn=users,dc=na,DC=tibco,DC=com 
			 
 
-  
		  Set the default 
			 ApplicationProfile to match the OS you are running on. For more information, see 
			 Setting the Default Application Profile. 
		   
		
-  
		  Fully expand the 
			 Processes directory and double-click 
			 HttpReceiverProcess.bwp 
			 . 
		   
		
-  
		  Click 
			 . 
		   
		
-  
		  At the left hand tree of 
			 Debug Configuration wizard, expand 
			 BusinessWorks Application and select 
			 BWApplication. 
		   
		
-  
		  Click the 
			 Applications tab and then click the 
			 Deselect All button if you have multiple applications. Select the check box next to 
			 tibco.bw.sample.policy.basicauthentication.HttpReceiver.application 
			 . 
		   
		
-  
		  Click 
			 Debug. 
		   
		  This runs the sample in Debug mode. 
		   
-  
		   Launch Google Chrome browser and enter the following URL 
			 http://localhost:9393/request.
		   
		  The Google Chrome page displays a window asking you to enter your user name and password.
			    
 
-  
		  Enter your LDAP user name and password and click 
			 OK. 
		   
		
Result
 
		 After the request is authenticated successfully, the following message displays in the browser: 
		
 
		This is from HTTP Receiver Process. The request is successful. 
		
 
	 Understanding the Configuration
 
		 
		In the 
		  HttpReceiverProcess.bwp 
		   process , the Basic Authentication policy is configured to verify user credentials using LDAP Authentication and is associated with the 
		  HTTP Receiver activity 
		
 
	 Copyright © Cloud Software Group, Inc. All rights reserved.