Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

REST API List buckets

4 replies [Last post]
  • Login or register to post comments
Tue, 03/27/2012 - 15:14
ChssAddct
Offline
Joined: 09/19/2011
Groups: None

When using /pools/default/buckets to get a list of buckets, there is unexpected behavior that tripped me up a bit.

This behavior can be proven with just a browser.

If you have ONLY buckets WITH passwords, no authentication is required. Response is a list of all buckets Good.

If you have ONLY buckets WITHOUT passwords, authentication is required. Response is a list of all buckets. Good.

If you have a mixture of buckets WITH *and* WITHOUT passwords, you get a list of only non-passworded buckets if you have not previously entered credentials in the browser, and a list of all buckets if you have.

In .Net I am using HttpWebRequest, and specifying Credentials. But, I only get back a list of non-passworded buckets, not all buckets.

Because the web response doesn't do an authentication step, HttpWebRequest does not establish an authenticated connection. So there is no way to get a full list of buckets, even though I have the credentials needed!

If there are only passworded buckets, then authentication is performed and HttpWebRequest provides the list just fine.

Desired behavior from my point of view, is that if there are any passworded buckets, then authentication would be required, rather than getting back an incomplete list of buckets.

I understand others could see it differently, and want it the way it is.

Just want to throw out the request and see what others think.

I haven't tried it, but I suspect couchbase-cli.exe has the same problem, of not being able to list all buckets, even if credentials are supplied.

-ChssAddct

In the meantime, it works for me to have all my buckets be passworded. So, I'm OK. Just wanted to throw this info out to the public, since I got tripped up by it.

Top
  • Login or register to post comments
Fri, 03/30/2012 - 16:35
mikew
Offline
Joined: 03/14/2011
Groups:

This sounds like an issue to me. I have filed a bug here.

http://www.couchbase.com/issues/browse/MB-4992

Thanks for letting us know.

Top
  • Login or register to post comments
Fri, 03/30/2012 - 17:31
alkondratenko
alkondratenko's picture
Offline
Joined: 12/01/2010
Groups: None

Not at all familar with .net api. So there's no way to ask it to provide basic auth?

Top
  • Login or register to post comments
Fri, 03/30/2012 - 17:50
ChssAddct
Offline
Joined: 09/19/2011
Groups: None

There may be.
It clearly provides authentication when 'prompted' to by a 401 Unauthorized response, re-submitting the request using the Credentials I supply it.

I just didn't google to determine if there is a way. After determining the problem, I simply applied passwords to all buckets, and moved on to my next problem.

Even still, if there is a way, it may still be a problem with couchbase-cli.exe.

-ChssAddct

Top
  • Login or register to post comments
Fri, 03/30/2012 - 18:06
alkondratenko
alkondratenko's picture
Offline
Joined: 12/01/2010
Groups: None

Re-submitting only after hitting 401 is kind of suboptimal. But we'll re-consider auth as well.

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker