Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster admins and phantom databases #579

Closed
msrdic opened this issue May 24, 2014 · 2 comments
Closed

Cluster admins and phantom databases #579

msrdic opened this issue May 24, 2014 · 2 comments
Milestone

Comments

@msrdic
Copy link
Contributor

msrdic commented May 24, 2014

It is possible to create phantom databases with cluster admin – phantom databases are databases into which cluster admins can insert and read from, but the database is not visible when listing all databases, even when listing them as a cluster admin. Here's a scenario I used:

  1. started with empty influxdb, just root user (this is optional, I managed to reproduce it with a populated influxdb)
  2. list cluster admins → returns only root
  3. list databases → returns nothing
  4. create a new database, and then list databases → returns a list of length one, with previously created database, as expected
  5. list users for previously created database → returns an empty list, as expected
  6. write a single point to a nonexistent database (I used "this_database_nonexistent" as a database name) and then read points from the same database (everything with cluster admin credentials) → returns the expected single point
  7. list databases again (as cluster admin) → still returns a list of length one, with the database created in step 4.
  8. list database users for the phantom database → returns an empty list

Here are some additional steps with interesting results:

  • if another database user exists (for some other regular database), adding it to the phantom database and/or setting an admin permission for the phantom database (with cluster admin credentials) fails with the BadRequestException (Invalid username ...) as expected.
  • creating a database user (with cluster admin credentials) for the phantom database fails with the BadRequestException, as expected.

And the best thing? Creating a new database with the name of the phantom database just works, with all the data retained. Creating a new user for that database now works and everything is behaving regularly.

Hope my description helps, available for additional details. Oh, and this happens with the newest brew version (0.7.0) and it happened before (0.6.x).

@jvshahid jvshahid added this to the Next release milestone May 27, 2014
@jvshahid
Copy link
Contributor

Very clear bug report. Thanks for reporting it.

@jvshahid jvshahid modified the milestones: 0.7.1, Next release May 29, 2014
jvshahid added a commit that referenced this issue May 29, 2014
@Dieterbe
Copy link
Contributor

i wonder if this will break the graphite listener. it just starts writing into the db whether it has been created or not.
see this todo https://github.com/influxdb/influxdb/blob/master/src/api/graphite/api.go#L42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants