tariqdaouda
tariqdaouda

Reputation: 2516

ArangoDB REST API: Unable to set user password

I am able to create a user using by following what the doc says:

curl -X POST --user root:root --data-binary @- --dump - http://localhost:8529/_api/user <<EOF
{ 
  "user" : "testUser", 
  "password" : "secure" 
}
EOF

But the password argument seems to be ignored by Arango.

curl -v --user testUser:secure http://localhost:8529/_api/user/testUser

Returns a 401

While:

curl -v --user testUser: http://localhost:8529/_api/user/testUser

Returns a 200

Am I doing anything wrong here?

Upvotes: 1

Views: 195

Answers (1)

dothebart
dothebart

Reputation: 6067

I have to excuse our documentation team - You obviously copied the CURL example from

https://docs.arangodb.com/3.11/develop/http/users/

which has a typo in the post bodies of the examples (added during the 3.0 release cycle). As the body parameter parameter description proberly names it, the password is specified via the passwd key instead of the password key.

The error is corrected and an updated version of the documentation will be online soon.

Thanks for taking the time to dig deeper.

Upvotes: 1

Related Questions