Skip to content

Incorrect 'peer_type' claim for OPAL jwt token: PeerType.client, expected: PeerType.datasource #197

Answered by orweis
hongbo-miao asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Hongbo - OPAL supports multiple types of JWT tokens for clients -
one allowing to subscribe to topics, and another for data-sources publishing events (which is the type of token you require here).

Check out the guide here
You'll see the token creation request requires the additional type flag to be set to datasource

curl --request POST 'https://opal.yourdomain.com/token' \
--header 'Authorization: Bearer MY_MASTER_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "type": "datasource",
}'

or as CLI command:
opal-client obtain-token MY_MASTER_TOKEN --uri=https://opal.yourdomain.com --type datasource

This is an important security measure, so you can make sure not every…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hongbo-miao
Comment options

Answer selected by hongbo-miao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants