Skip to content

Simultaneously Support Multiple Authentication Mechanisms #6062

Answered by MauriceVanVeen
jamlo asked this question in Q&A
Discussion options

You must be logged in to vote

Believe at the moment the server doesn't allow mixed modes of authentication within the same config, like combining token and JWT auth. But in essence there are two alternative ways to achieve this:

  1. Use a leaf node. You connect to the leaf node using Token Authentication, and the leaf node is connected up to another server/cluster that uses JWT Authentication. A leaf node allows you to have separate security domains, for example different authN/Z.
    Link to the docs: https://docs.nats.io/running-a-nats-service/configuration/leafnodes

  2. An alternative is using Auth Callout. A client connects to your server with either token or JWT (or user/pass, etc.), the server calls out to a service tha…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by jamlo
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