You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that that doesn't mean Envoy can't use new APIs at all. Of course, if Envoy wishes to support such-and-such old BoringSSL in some builds, those builds will be unable to use newer BoringSSL features. But Envoy builds targeting more recent BoringSSL versions can use new features perfectly fine. You just gate the code behind a preprocessor check like #if BORINGSSL_API_VERSION >= .... That's BoringSSL's standard strategy for dealing with version skew.
In particular, the API you mentioned was specifically added because someone on Google's Envoy team requested it to help manage a transition to enable this security check. Our expectation was that they would use it in Envoy quickly, using this standard version skew strategy, and not wait for Envoy's oldest supported version to move past it. I'm a little surprised to hear that's the impediment. Hopefully this comment clears up the situation and Envoy can now switch to following our BoringSSL's standard practices instead. Artificially waiting years before you can use new features does no one any good. :-)
Please just ask if you run into issues like this in future. I'd been long puzzled why Envoy had taken to long to use the API we specifically added for you all! :-p
@davidben Thanks for sharing the details and info!
I just want to clarify one thing in case there is any misunderstanding: This API is now being used but not in FIPS mode like below:
#ifndef BORINGSSL_FIPS
// Increment the `was_key_usage_invalid_` stats to indicate the given cert would have triggered an
// error but is allowed because the enforcement that rsa key usage and tls usage need to be
// matched has been disabled.
if (SSL_was_key_usage_invalid(ssl)) {
stats_.was_key_usage_invalid_.inc();
}
#endif
Regarding #if BORINGSSL_API_VERSION >= ... you mentioned, I think it won't be effective until version that Envoy is using is actually bumped? But it is the good generic approach to check in the code using API with this guard in the future
Ah okay. Yeah that works too. Using the number means it'll get picked up automatically as the BORINGSSL_FIPS build updates, and you can keep track of which ifdefs are old and can be retired.
Activity
kyessenov commentedon Jul 5, 2023
I don't think it's that old. It looks to be 2021-04-29.
kyessenov commentedon Jul 5, 2023
This is the last certification per https://boringssl.googlesource.com/boringssl/+/master/crypto/fipsmodule/FIPS.md. So I don't think we can update it to anything newer.
tyxia commentedon Jul 5, 2023
Ok, this date should be updated then.
Thanks good to know
kyessenov commentedon Jul 5, 2023
@tyxia You're looking at an old commit.
tyxia commentedon Jul 5, 2023
oops , you are right. The latest one is 2021-04-29
Some latest API like
SSL_was_key_usage_invalidstill can not be used though. But I guess there is nothing can be updated at this moment.davidben commentedon Jul 7, 2023
Note that that doesn't mean Envoy can't use new APIs at all. Of course, if Envoy wishes to support such-and-such old BoringSSL in some builds, those builds will be unable to use newer BoringSSL features. But Envoy builds targeting more recent BoringSSL versions can use new features perfectly fine. You just gate the code behind a preprocessor check like
#if BORINGSSL_API_VERSION >= .... That's BoringSSL's standard strategy for dealing with version skew.In particular, the API you mentioned was specifically added because someone on Google's Envoy team requested it to help manage a transition to enable this security check. Our expectation was that they would use it in Envoy quickly, using this standard version skew strategy, and not wait for Envoy's oldest supported version to move past it. I'm a little surprised to hear that's the impediment. Hopefully this comment clears up the situation and Envoy can now switch to following our BoringSSL's standard practices instead. Artificially waiting years before you can use new features does no one any good. :-)
Please just ask if you run into issues like this in future. I'd been long puzzled why Envoy had taken to long to use the API we specifically added for you all! :-p
tyxia commentedon Jul 7, 2023
@davidben Thanks for sharing the details and info!
I just want to clarify one thing in case there is any misunderstanding: This API is now being used but not in FIPS mode like below:
Regarding
#if BORINGSSL_API_VERSION >= ...you mentioned, I think it won't be effective until version that Envoy is using is actually bumped? But it is the good generic approach to check in the code using API with this guard in the futuredavidben commentedon Jul 7, 2023
Ah okay. Yeah that works too. Using the number means it'll get picked up automatically as the BORINGSSL_FIPS build updates, and you can keep track of which ifdefs are old and can be retired.
ggreenway commentedon Jul 11, 2023
We're already using the latest FIPS build as noted above; closing