Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughJWT token authentication support was added to the CrateDB Python client. This includes updates to the connection and HTTP client classes to accept and pass JWT tokens, documentation and changelog updates, and new tests to verify JWT authentication behavior. Existing authentication mechanisms remain unchanged. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Connection
participant Client
participant Server
User->>Connection: connect(jwt_token=...)
Connection->>Client: __init__(jwt_token=...)
Client->>Server: request(..., jwt_token=...)
Server->>Server: Add Authorization: Bearer <jwt_token> header (if not set)
Server-->>Client: Response
Client-->>Connection: Response
Connection-->>User: Connection established
Poem
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seut
left a comment
There was a problem hiding this comment.
👍
Maybe adding a sanity check to give a good error if token and user/password auth is used in conjunction would be useful. Afaik, the user/password args would be used then instead (it will just override the Authorization header afaik) which may not be clear to a user.
|
Thank you for providing support for JWT! |
|
@amotl Hi, do you have time to wrap this up with Sebastian's suggestion or do you mind If I take over? |
|
Hi @surister. Feel free to take over any time. Thank you. 🙏 |
|
Hi. I just rebased the patch to make your job a bit easier. Thank you again. |
CrateDB 5.7.0 introduced JWT token authentication. Let's also implement it on the client sides.
/cc @matriv, @kneth