Skip to content

contrib: add QAT private key provider.#21984

Merged
ggreenway merged 13 commits intoenvoyproxy:mainfrom
ipuustin:qat-private-key-provider-pr
Jul 18, 2022
Merged

contrib: add QAT private key provider.#21984
ggreenway merged 13 commits intoenvoyproxy:mainfrom
ipuustin:qat-private-key-provider-pr

Conversation

@ipuustin
Copy link
Copy Markdown
Member

@ipuustin ipuustin commented Jul 1, 2022

Commit Message:

contrib: add QAT private key provider for RSA handshake acceleration.

Next generation Intel® QAT support with Intel® Xeon® Scalable processors will feature an Intel® QAT cryptography and compression acceleration engine.

QAT private key provider extension will use qatlib library (https://github.com/intel/qatlib) to accelerate RSA operations in handshakes. The extension will look a bit like the existing cryptomb private key provider. The use case is to move the expensive cryptographic operations away from the CPU to the accelerator device, leaving CPU cycles for other use.

Additional Description:

Support for Intel® QAT is already present in the mainline Linux kernel and in Kubernetes device plugins (to expose the device files to containers). There are previous generations of Intel QAT® hardware devices, but they are not supported by this extension.

Two patches to libqat are present, but they should be included into the next qatlib release.

Risk Level: medium (contrib extension, no HW available yet, crypto-related code)
Testing: unit tests
Docs Changes: Protobuf comments
Release Notes: N/A
Platform Specific Features: Requires a future Intel Xeon Scalable processor.
Fixes #21531 (partly, QATzip extension will be a later PR)

Next generation Intel® QAT support with Intel® Xeon® Scalable processors
will feature an Intel® QAT cryptography and compression acceleration
engine.

QAT private key provider extension will use qatlib library
(https://github.com/intel/qatlib) to accelerate RSA operations in
handshakes. The extension will look a bit like the existing cryptomb
private key provider. The use case is to move the expensive
cryptographic operations away from the CPU to the accelerator device,
leaving CPU cycles for other use.

Support for Intel® QAT is already present in the mainline Linux kernel
and in Kubernetes device plugins (to expose the device files to
containers). There are previous generations of Intel QAT® hardware
devices, but they are not supported by this extension.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Jul 1, 2022
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @moderation

🐱

Caused by: #21984 was opened by ipuustin.

see: more, trace.

ipuustin added 4 commits July 1, 2022 15:26
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
// The private key provider provides RSA sign and decrypt operation
// hardware acceleration.

// [#extension-category: envoy.tls.key_providers]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this line as we do need one envoy.tls.key_providers category.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, fixed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @daixiang0 if you are able to re-review and stamp

ipuustin added 8 commits July 4, 2022 10:54
Looks like autoconf can't parse the -fuse-ld=lld flag, which leads to
wrong linker being used, which in turn leads to unrecognized linker
command line options. An alternative would be to set the LD env variable
in the BUILD file for clang-based builds.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
@wrowe
Copy link
Copy Markdown
Contributor

wrowe commented Jul 8, 2022

/assign-from @envoyproxy/senior-maintainers

for new contrib component review

@repokitteh-read-only
Copy link
Copy Markdown

@envoyproxy/senior-maintainers assignee is @ggreenway

🐱

Caused by: a #21984 (comment) was created by @wrowe.

see: more, trace.

@ggreenway
Copy link
Copy Markdown
Member

@moderation how does this look for dependencies?

@moderation
Copy link
Copy Markdown
Contributor

Not great but this is contrib and follows prior Intel contributions. Lack of code review, contributors and maintenance noted.

scorecard --repo=https://github.com/intel/qatlib

RESULTS
-------
Aggregate score: 5.4 / 10

Check scores:
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
|  SCORE  |          NAME          |             REASON             |                             DOCUMENTATION/REMEDIATION                             |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Binary-Artifacts       | no binaries found in the repo  | https://github.com/ossf/scorecard/blob/main/docs/checks.md#binary-artifacts       |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 6 / 10  | Branch-Protection      | branch protection is not       | https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection      |
|         |                        | maximal on development and all |                                                                                   |
|         |                        | release branches               |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | CI-Tests               | 0 out of 2 merged PRs          | https://github.com/ossf/scorecard/blob/main/docs/checks.md#ci-tests               |
|         |                        | checked by a CI test -- score  |                                                                                   |
|         |                        | normalized to 0                |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | CII-Best-Practices     | no badge detected              | https://github.com/ossf/scorecard/blob/main/docs/checks.md#cii-best-practices     |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 1 / 10  | Code-Review            | GitHub code reviews found for  | https://github.com/ossf/scorecard/blob/main/docs/checks.md#code-review            |
|         |                        | 2 commits out of the last 17   |                                                                                   |
|         |                        | -- score normalized to 1       |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Contributors           | 0 different organizations      | https://github.com/ossf/scorecard/blob/main/docs/checks.md#contributors           |
|         |                        | found -- score normalized to 0 |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Dangerous-Workflow     | no dangerous workflow patterns | https://github.com/ossf/scorecard/blob/main/docs/checks.md#dangerous-workflow     |
|         |                        | detected                       |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Dependency-Update-Tool | no update tool detected        | https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Fuzzing                | project is not fuzzed          | https://github.com/ossf/scorecard/blob/main/docs/checks.md#fuzzing                |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | License                | license file detected          | https://github.com/ossf/scorecard/blob/main/docs/checks.md#license                |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Maintained             | 0 commit(s) out of 17 and 0    | https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained             |
|         |                        | issue activity out of 5 found  |                                                                                   |
|         |                        | in the last 90 days -- score   |                                                                                   |
|         |                        | normalized to 0                |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| ?       | Packaging              | no published package detected  | https://github.com/ossf/scorecard/blob/main/docs/checks.md#packaging              |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Pinned-Dependencies    | all dependencies are pinned    | https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies    |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | SAST                   | SAST tool is not run on all    | https://github.com/ossf/scorecard/blob/main/docs/checks.md#sast                   |
|         |                        | commits -- score normalized to |                                                                                   |
|         |                        | 0                              |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Security-Policy        | security policy file detected  | https://github.com/ossf/scorecard/blob/main/docs/checks.md#security-policy        |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| ?       | Signed-Releases        | no releases found              | https://github.com/ossf/scorecard/blob/main/docs/checks.md#signed-releases        |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Token-Permissions      | tokens are read-only in GitHub | https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions      |
|         |                        | workflows                      |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Vulnerabilities        | no vulnerabilities detected    | https://github.com/ossf/scorecard/blob/main/docs/checks.md#vulnerabilities        |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| ?       | Webhooks               | check is not supported for     | https://github.com/ossf/scorecard/blob/main/docs/checks.md#webhooks               |
|         |                        | this request: SCORECARD_V6     |                                                                                   |
|         |                        | is not set, not running the    |                                                                                   |
|         |                        | Webhook check                  |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|

@moderation
Copy link
Copy Markdown
Contributor

/lgtm deps

@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label Jul 12, 2022
@phlax
Copy link
Copy Markdown
Member

phlax commented Jul 18, 2022

@ggreenway would you mind looking over this one again

/wait-any

@ggreenway ggreenway merged commit 9447ff5 into envoyproxy:main Jul 18, 2022
@phlax
Copy link
Copy Markdown
Member

phlax commented Jul 19, 2022

@ipuustin
Copy link
Copy Markdown
Member Author

@ipuustin this seems to have introduced a flake in CI:

https://dev.azure.com/cncf/envoy/_build/results?buildId=113225&view=logs&j=8c169225-0ae8-53bd-947f-07cb81846cb5&t=6b0ace90-28b2-51d9-2951-b1fd35e67dec&l=2212

Thanks for the heads up. I'll take a look at ops_test to see what might go wrong there.

ipuustin added a commit to ipuustin/envoy that referenced this pull request Sep 29, 2022
Next generation Intel® QAT support with Intel® Xeon® Scalable processors
will feature an Intel® QAT cryptography and compression acceleration
engine.

QAT private key provider extension will use qatlib library
(https://github.com/intel/qatlib) to accelerate RSA operations in
handshakes. The extension will look a bit like the existing cryptomb
private key provider. The use case is to move the expensive
cryptographic operations away from the CPU to the accelerator device,
leaving CPU cycles for other use.

Support for Intel® QAT is already present in the mainline Linux kernel
and in Kubernetes device plugins (to expose the device files to
containers). There are previous generations of Intel QAT® hardware
devices, but they are not supported by this extension.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
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.

Add Intel® QuickAssist Technology (Intel® QAT) support as contrib extensions

6 participants