Skip to content

Prevent "403 Forbidden" with JWT auth #4009

Answered by big-r81
gbshhennsi asked this question in General
Discussion options

You must be logged in to vote

Okay, tried your key, works for me, but you need to add the user of the key or some roles to the db security objects to allow them to access!

Test it with:

Adding the user (52124074-0493-4534-8741-1fd30ee75794) as a member of that db (user or admin). Do this with your admin user.

GET /testdb/_security

{
    "members": {
        "roles": [
            "_admin"
        ],
        "names": [
            "52124074-0493-4534-8741-1fd30ee75794"
        ]
    },
    "admins": {
        "roles": [
            "_admin"
        ],
        "names": []
    }
}

Then you should query your db with your JWT Bearer Token:

GET /testdb

{
    "db_name": "testdb",
    "purge_seq": "0-g1AAAABXeJzLYWBgYMpgTm…

Replies: 8 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gbshhennsi
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by gbshhennsi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants