Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clientv3: allow setting JWT directly #16803

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Aug 14, 2024

  1. clientv3: allow setting JWT directly

    etcd supports using signed JWTs in a verify-only mode where the server
    has access to only a public key and therefore can not create tokens but
    can validate them. For this to work a client must not call Authenticate
    and must instead submit a pre-signed JWT with their request. The server
    will validate this token, extract the username from it, and may allow
    the client access.
    
    This change allows setting the JWT directly and not setting a username
    and password. If a JWT is provided the client will no longer call
    Authenticate, which would not work anyhow. It also provides a public
    method UpdateAuthToken to allow a user of the client to update their
    auth token, for example, if it expires.
    
    In this flow all token lifecycle management is handled outside of the
    client as a concern of the client user.
    
    Signed-off-by: Mike Crute <[email protected]>
    mcrute committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    2d6a8ae View commit details
    Browse the repository at this point in the history
  2. etcdclt: support passing JWT auth token

    Signed-off-by: Mike Crute <[email protected]>
    mcrute committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    87d9a46 View commit details
    Browse the repository at this point in the history
  3. test: validate direct JWT passing and acceptance

    Signed-off-by: Mike Crute <[email protected]>
    mcrute committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    4f46fb4 View commit details
    Browse the repository at this point in the history