Skip to content

Add logs for JWT RBAC configuration - #4581

Merged
timvisee merged 1 commit into
qdrant:devfrom
superseb:jwt_key_checks
Sep 2, 2024
Merged

timvisee merged 1 commit into
qdrant:devfrom
superseb:jwt_key_checks

Conversation

@superseb

Copy link
Copy Markdown
Contributor

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  2. Have you checked your code using cargo clippy --all --all-features command?

I ran into these while checking out JWT, let me know if this is something we want to add (or not) and what should be changed according to how we do things. Also Rust noob so open to any suggestions how to do things differently.

  • When JWT RBAC is enabled but there is no API key set, without at least an error, user does not know why it does not work. I added logging an error cause we are not failing at this currently, but we can change if we want it to fail. At least with this change the user can see from the log something is not going to work.
  • Recommended secret size for HMAC-SHA256 is 32 bytes, I added logging a recommendation if JWT RBAC is enabled and the secret size is less than 32 bytes. Reference: https://www.rfc-editor.org/rfc/rfc7518#section-3.2 A key of the same size as the hash output (for instance, 256 bits for "HS256") or larger MUST be used with this algorithm.. Larger seems to be unneeded but we can change the wording to "at least" if wanted.

Comment thread src/main.rs Resolved
Comment thread src/settings.rs Resolved
@superseb

superseb commented Sep 2, 2024

Copy link
Copy Markdown
Contributor Author

@timvisee Is it okay for me to merge this or do you coordinate this? If this is no longer needed/wanted, it can also be closed.

@timvisee

timvisee commented Sep 2, 2024

Copy link
Copy Markdown
Member

@timvisee Is it okay for me to merge this or do you coordinate this? If this is no longer needed/wanted, it can also be closed.

Since we approved, feel free to merge!

I'll take the opportunity now 😄

@timvisee
timvisee merged commit 97997a2 into qdrant:dev Sep 2, 2024
timvisee pushed a commit that referenced this pull request Sep 17, 2024
@timvisee timvisee mentioned this pull request Sep 17, 2024
HighBestCoder pushed a commit to HighBestCoder/qdrant that referenced this pull request Dec 14, 2025
Summary:
# issue
I met gpu_compile_options initialization order issue over gcc 8.4.0. Maybe related with LTO bug?

# solution
make it deterministic, no "crossing fingers" required. 😸

Pull Request resolved: facebookresearch/faiss#4581

Reviewed By: subhadeepkaran

Differential Revision: D82647834

Pulled By: pankajsingh88

fbshipit-source-id: ead9515dc6e84987e6c8f5471318a34cc5b81086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants