Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

secretshardul avatar image
secretshardul asked ·

Why can't I create a new Stargate namespace using the document API on Astra?

[FOLLOW UP QUESTION TO #9912]

I'm unable to create a new namespace using `POST /v2/schemas/namespaces` endpoint. I got an error

{"description":"Server error: org.apache.cassandra.stargate.exceptions.UnauthorizedException: User secretuser has no CREATE permission on <all keyspaces> or any of its parents","code":500}%
stargate
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

In DataStax Astra, a database user (CQL ROLE) has permissions to only the keyspace it has been explicitly granted access. In your case, the secretuser role only has access to the keyspace you provisioned when you created the DB instance.

When using the Document API on Astra, you will need to use the web interface to add a new keyspace to your database. You can only use Stargate's create namespace endpoint against a non-Astra hosted Cassandra instance. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.