-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: validate certificate generation #283
Conversation
4c764e6
to
e1852a2
Compare
5f49314
to
70053a5
Compare
…e message completed (#285) * fix: try fix hyper problem * chore: log kms rest client error * chore: log kms rest client error * fix: re-add small delay after a hyper incompletemessage error * fix: revert test cli changes * fix: revert test_server change * fix: small fix in certificate indexing * fix: try new timeout on reqwest * fix: control RUST_LOG from variable env. * chore: force sleep before retry * fix: use default features of reqwest * fix: sync reqwest features between client and server * chore: bump reqwest to 0.12 * fix: set default timeout on server. Remove delay in fetching CRL * fix: try to block async thread on client request * fix: keep retry on failure on KMS rest client
947f356
to
591a5cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you added a real log right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log_init
initializes the logger if:
- RUST_LOG variable is sourced
- or if the input argument
default_value
is filled
In that case, the CLI will have logs if RUST_LOG is sourced.
Does it seem right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no particular comments. I put some questions, but really, curiosities. Otherwise it seems perfect to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool now the tests uses a CRL stored in https://package.cosmian.com/kms/crl_tests/intermediate.crl.pem . Before it was just a mock url right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before, all those certificates were not validated by ckms (and then the CRL URL was never checked)
.default_headers(headers) | ||
.tcp_keepalive(Duration::from_secs(60)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this a problem before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, the timeout passed from 5 to 60 sec :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem hyper is occurring (from time to time) when client authentication by certificate is enabled on the Rust Client.
I believe the 60s delay has no impact on this problem.
Currently, I've disabled the certificate authentication wherever it is not needed (this is only a workaround). It could be fixed properly using reqwest and rustls-tls instead of native-tls.
Incomplete
error by not using client certificate authentication in tests (Incomplete error being quite hard to reproduce in local - not in CI!)cargo deny