I want to configure authentication based on DbIdentityManager - I am getting 401 Unauthorized. Please let me know what am I doing wrong. Steps I have followed so far:
In Mongodb:
Created database userbase. Created collection _accounts
I want users to just GET and admins can perform all actions
# Users can GET from /mydb/mycol
- role: users
predicate: path-prefix[path="/mycol"] and method[value="GET"]
# Admins can perform any action on /mydb/mycol
- role: admins
predicate: path-prefix[path="/mycol"]
Here getting error 401 Unauthorized. What am I going wrong, my feeling is could be something trivial - but I am not able to see that. Kindly review and help.
I want to configure authentication based on DbIdentityManager - I am getting 401 Unauthorized. Please let me know what am I doing wrong. Steps I have followed so far:
In Mongodb:
userbase
. Created collection_accounts
{"_id" : "consumer1","password" : "changeit","roles" : "[users]"}
In restheart.yml
Under idm commented out
SimpleFileIdentityManager
Created this entry
Mongo mount is like below
In security.yml 1.
Testing from Postman
GET
localhost:8080/mydb/mycol
Authorization Type: Basic Auth Username: consumer1 Password: changeit
Here getting error 401 Unauthorized. What am I going wrong, my feeling is could be something trivial - but I am not able to see that. Kindly review and help.
Thanks Kshitij