When you create a connection to the Couchbase Server, you are actually creating a new instance of the bucket containing your information. Typically when you established a bucket for your application, either in Couchbase Administrative Console, or via an SDK call, you provide required credentials. When you connect to the bucket, provide your username and password as parameters in your call to Couchbase.connect():
Couchbase.connect("http://<host>:8091/pools", :bucket => 'bucket1', :username => 'Administrator', :password => 'password')
This next example demonstrates use of credentials in PHP:
<?php $cb = new Couchbase(”<host>:8091", "bucketname", "pass", "user"); ?>