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

User management/permissions API #664

Closed
rcoulsell opened this issue May 26, 2020 · 4 comments
Closed

User management/permissions API #664

rcoulsell opened this issue May 26, 2020 · 4 comments
Labels
fixed Issue has been resolved but remains open due to a pending release. HTTP API Request for an ArangoDB HTTP API currently missing in the driver. semver-minor This issue does not require any backwards-incompatible changes to address.

Comments

@rcoulsell
Copy link

rcoulsell commented May 26, 2020

When creating a new database and defining users using the database.createDatabase users: Array, it creates a new user with administative rights to the subject database.

This is causing difficulty in automatically setting up default system users for app integration/installation in Node.js.

Is there a way to pass in a parameter to set the access for the user to the created database as 'Access' instead of 'Adminstrate', etc.?

@rcoulsell
Copy link
Author

rcoulsell commented May 26, 2020

I know this can be achieved using an external curl call outside of arangojs after the fact:
curl -X PUT -u "<admin user>:<admin user password>" -H "Content-Type: application/json" -H "accept: application/json" -d '{"grant" : "ro"}' http://localhost:8529/_api/user/{userModified}/database/{databaseModified}

Seems like this is missing from arangojs natively.

@pluma
Copy link
Contributor

pluma commented Jun 16, 2020

No, this option is intended to create per-database admin accounts as an alternative to the default root user. This option pre-dates the modern permission system, so this may be an oversight in the API: https://www.arangodb.com/docs/stable/http/database-database-management.html#create-database

You're right that there is currently no way to manage users from arangojs. You can however access arbitrary endpoints of the HTTP API using the .route() method, which provides a generic request API.

@pluma pluma added the semver-minor This issue does not require any backwards-incompatible changes to address. label Jun 16, 2020
@pluma pluma changed the title database.createDatabase cannot define the access level for newly created users User management/permissions API Jun 16, 2020
@pluma pluma added the HTTP API Request for an ArangoDB HTTP API currently missing in the driver. label Jun 18, 2020
@pluma
Copy link
Contributor

pluma commented Jun 18, 2020

I think this may be a duplicate of #593

@pluma
Copy link
Contributor

pluma commented Jun 19, 2020

The HTTP API is documented at https://www.arangodb.com/docs/stable/http/user-management.html

pluma added a commit that referenced this issue Oct 15, 2021
pluma added a commit that referenced this issue Oct 19, 2021
@pluma pluma added the fixed Issue has been resolved but remains open due to a pending release. label Oct 20, 2021
@pluma pluma closed this as completed in 7116fe8 Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Issue has been resolved but remains open due to a pending release. HTTP API Request for an ArangoDB HTTP API currently missing in the driver. semver-minor This issue does not require any backwards-incompatible changes to address.
Projects
None yet
Development

No branches or pull requests

2 participants