Hashicorp Vault plugin for authenticating Trusted Execution Environments (TEE) like SGX enclaves
Find a file
Harald Hoyer 403276b9f2
chore(deps): update trufflesecurity/trufflehog action to v3.76.3 (#70)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[trufflesecurity/trufflehog](https://togithub.com/trufflesecurity/trufflehog)
| action | minor | `v3.75.1` -> `v3.76.3` |

---

### Release Notes

<details>
<summary>trufflesecurity/trufflehog
(trufflesecurity/trufflehog)</summary>

###
[`v3.76.3`](https://togithub.com/trufflesecurity/trufflehog/releases/tag/v3.76.3)

[Compare
Source](https://togithub.com/trufflesecurity/trufflehog/compare/v3.76.2...v3.76.3)

#### What's Changed

- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2849](https://togithub.com/trufflesecurity/trufflehog/pull/2849)
- Integromat detector - Deprecated by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2856](https://togithub.com/trufflesecurity/trufflehog/pull/2856)
- add tolower to all keywords, and remove return on error for global
vars by [@&#8203;zricethezav](https://togithub.com/zricethezav) in
[https://github.com/trufflesecurity/trufflehog/pull/2852](https://togithub.com/trufflesecurity/trufflehog/pull/2852)
- Adding postman to sub-commands list by
[@&#8203;CarlesLlobet](https://togithub.com/CarlesLlobet) in
[https://github.com/trufflesecurity/trufflehog/pull/2813](https://togithub.com/trufflesecurity/trufflehog/pull/2813)
- \[chore] - upgrade Github dep by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2858](https://togithub.com/trufflesecurity/trufflehog/pull/2858)
- \[chore] - move buffers pkg out of writers pkg by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2826](https://togithub.com/trufflesecurity/trufflehog/pull/2826)
- \[refactor] - remove redundant chunking by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2855](https://togithub.com/trufflesecurity/trufflehog/pull/2855)

#### New Contributors

- [@&#8203;CarlesLlobet](https://togithub.com/CarlesLlobet) made their
first contribution in
[https://github.com/trufflesecurity/trufflehog/pull/2813](https://togithub.com/trufflesecurity/trufflehog/pull/2813)

**Full Changelog**:
https://github.com/trufflesecurity/trufflehog/compare/v3.76.2...v3.76.3

###
[`v3.76.2`](https://togithub.com/trufflesecurity/trufflehog/releases/tag/v3.76.2)

[Compare
Source](https://togithub.com/trufflesecurity/trufflehog/compare/v3.76.1...v3.76.2)

#### What's Changed

- \[bug] - Handle empty reader case in newFileReader by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2854](https://togithub.com/trufflesecurity/trufflehog/pull/2854)

**Full Changelog**:
https://github.com/trufflesecurity/trufflehog/compare/v3.76.1...v3.76.2

###
[`v3.76.1`](https://togithub.com/trufflesecurity/trufflehog/releases/tag/v3.76.1)

[Compare
Source](https://togithub.com/trufflesecurity/trufflehog/compare/v3.76.0...v3.76.1)

#### What's Changed

- chore: fix some typos in comments by
[@&#8203;cuiyourong](https://togithub.com/cuiyourong) in
[https://github.com/trufflesecurity/trufflehog/pull/2851](https://togithub.com/trufflesecurity/trufflehog/pull/2851)
- Added user's email and location in metadata for Github detector. by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2850](https://togithub.com/trufflesecurity/trufflehog/pull/2850)
- \[refactor] - Create separate handler for non-archive data by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2825](https://togithub.com/trufflesecurity/trufflehog/pull/2825)

#### New Contributors

- [@&#8203;cuiyourong](https://togithub.com/cuiyourong) made their first
contribution in
[https://github.com/trufflesecurity/trufflehog/pull/2851](https://togithub.com/trufflesecurity/trufflehog/pull/2851)

**Full Changelog**:
https://github.com/trufflesecurity/trufflehog/compare/v3.76.0...v3.76.1

###
[`v3.76.0`](https://togithub.com/trufflesecurity/trufflehog/releases/tag/v3.76.0)

[Compare
Source](https://togithub.com/trufflesecurity/trufflehog/compare/v3.75.1...v3.76.0)

#### What's Changed

- fix(deps): update module golang.org/x/net to v0.25.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2792](https://togithub.com/trufflesecurity/trufflehog/pull/2792)
- Add webhook source protos by
[@&#8203;dustin-decker](https://togithub.com/dustin-decker) in
[https://github.com/trufflesecurity/trufflehog/pull/2789](https://togithub.com/trufflesecurity/trufflehog/pull/2789)
- Increase test chan size by
[@&#8203;rosecodym](https://togithub.com/rosecodym) in
[https://github.com/trufflesecurity/trufflehog/pull/2797](https://togithub.com/trufflesecurity/trufflehog/pull/2797)
- fix(deps): update module golang.org/x/exp to
v0.0.0-20240506185415-9bf2ced13842 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2795](https://togithub.com/trufflesecurity/trufflehog/pull/2795)
- fix(deps): update module github.com/brianvoe/gofakeit/v7 to v7.0.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2798](https://togithub.com/trufflesecurity/trufflehog/pull/2798)
- fix(deps): update module github.com/aws/aws-sdk-go to v1.52.4 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2794](https://togithub.com/trufflesecurity/trufflehog/pull/2794)
- fix(deps): update module google.golang.org/api to v0.178.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2800](https://togithub.com/trufflesecurity/trufflehog/pull/2800)
- Enterprise ReadMe Updates by
[@&#8203;theproductone](https://togithub.com/theproductone) in
[https://github.com/trufflesecurity/trufflehog/pull/2803](https://togithub.com/trufflesecurity/trufflehog/pull/2803)
- Updating Enterprise Readme Link from Contact to Product Info Page by
[@&#8203;theproductone](https://togithub.com/theproductone) in
[https://github.com/trufflesecurity/trufflehog/pull/2804](https://togithub.com/trufflesecurity/trufflehog/pull/2804)
- chore(deps): update golangci/golangci-lint-action action to v6 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2801](https://togithub.com/trufflesecurity/trufflehog/pull/2801)
- \[chore] - address linter by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2783](https://togithub.com/trufflesecurity/trufflehog/pull/2783)
- fix(deps): update module github.com/xanzy/go-gitlab to v0.104.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2784](https://togithub.com/trufflesecurity/trufflehog/pull/2784)
- fix(deps): update module github.com/rabbitmq/amqp091-go to v1.10.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2809](https://togithub.com/trufflesecurity/trufflehog/pull/2809)
- fix(deps): update module github.com/snowflakedb/gosnowflake to v1.10.0
by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2810](https://togithub.com/trufflesecurity/trufflehog/pull/2810)
- Prevent panic from flaky test by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[https://github.com/trufflesecurity/trufflehog/pull/2817](https://togithub.com/trufflesecurity/trufflehog/pull/2817)
- fix(deps): update module github.com/aws/aws-sdk-go to v1.52.6 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2816](https://togithub.com/trufflesecurity/trufflehog/pull/2816)
- fix(deps): update module github.com/hashicorp/go-retryablehttp to
v0.7.6 by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2819](https://togithub.com/trufflesecurity/trufflehog/pull/2819)
- fix(deps): update module github.com/charmbracelet/bubbletea to v0.26.2
by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2818](https://togithub.com/trufflesecurity/trufflehog/pull/2818)
- fix(deps): update module github.com/prometheus/client_golang to
v1.19.1 by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2821](https://togithub.com/trufflesecurity/trufflehog/pull/2821)
- Update postman flags to be less confusing by
[@&#8203;dustin-decker](https://togithub.com/dustin-decker) in
[https://github.com/trufflesecurity/trufflehog/pull/2755](https://togithub.com/trufflesecurity/trufflehog/pull/2755)
- \[refactor] - Refactor Archive Handling Logic by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2703](https://togithub.com/trufflesecurity/trufflehog/pull/2703)
- fix(deps): update testcontainers-go monorepo to v0.31.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2823](https://togithub.com/trufflesecurity/trufflehog/pull/2823)
- fix(deps): update module github.com/xanzy/go-gitlab to v0.105.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2824](https://togithub.com/trufflesecurity/trufflehog/pull/2824)
- fix(deps): update module google.golang.org/api to v0.180.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2822](https://togithub.com/trufflesecurity/trufflehog/pull/2822)
- fix(deps): update module github.com/sassoftware/go-rpmutils to v0.4.0
by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2831](https://togithub.com/trufflesecurity/trufflehog/pull/2831)
- fix(deps): update module github.com/google/go-github/v61 to v62 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2832](https://togithub.com/trufflesecurity/trufflehog/pull/2832)
- Update results's extra data for Twilio by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2807](https://togithub.com/trufflesecurity/trufflehog/pull/2807)
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2830](https://togithub.com/trufflesecurity/trufflehog/pull/2830)
- \[chore] - Update GitlabV2 detector by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2840](https://togithub.com/trufflesecurity/trufflehog/pull/2840)
- Fixed the Now Scanning Emoji on the ReadMe by
[@&#8203;theproductone](https://togithub.com/theproductone) in
[https://github.com/trufflesecurity/trufflehog/pull/2842](https://togithub.com/trufflesecurity/trufflehog/pull/2842)
- fix(deps): update module github.com/fatih/color to v1.17.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2837](https://togithub.com/trufflesecurity/trufflehog/pull/2837)
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2841](https://togithub.com/trufflesecurity/trufflehog/pull/2841)
- Bump up performance test threshold to 50% by
[@&#8203;zricethezav](https://togithub.com/zricethezav) in
[https://github.com/trufflesecurity/trufflehog/pull/2839](https://togithub.com/trufflesecurity/trufflehog/pull/2839)
- Update SendGrid detector by [@&#8203;rgmz](https://togithub.com/rgmz)
in
[https://github.com/trufflesecurity/trufflehog/pull/2833](https://togithub.com/trufflesecurity/trufflehog/pull/2833)
- fix(deps): update module cloud.google.com/go/storage to v1.41.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2843](https://togithub.com/trufflesecurity/trufflehog/pull/2843)
- \[bug] - Fix case-sensitivity issue in PrefixRegex function by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2811](https://togithub.com/trufflesecurity/trufflehog/pull/2811)
- switch to filesystem and specific tag when performance testing by
[@&#8203;zricethezav](https://togithub.com/zricethezav) in
[https://github.com/trufflesecurity/trufflehog/pull/2846](https://togithub.com/trufflesecurity/trufflehog/pull/2846)
- Use fake detectors in versioned detectors test by
[@&#8203;rosecodym](https://togithub.com/rosecodym) in
[https://github.com/trufflesecurity/trufflehog/pull/2847](https://togithub.com/trufflesecurity/trufflehog/pull/2847)
- \[feat] - Support bearer auth for docker scans by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2848](https://togithub.com/trufflesecurity/trufflehog/pull/2848)
- Add "Intra42" detector by
[@&#8203;alexandregv](https://togithub.com/alexandregv) in
[https://github.com/trufflesecurity/trufflehog/pull/2835](https://togithub.com/trufflesecurity/trufflehog/pull/2835)

#### New Contributors

- [@&#8203;theproductone](https://togithub.com/theproductone) made their
first contribution in
[https://github.com/trufflesecurity/trufflehog/pull/2803](https://togithub.com/trufflesecurity/trufflehog/pull/2803)

**Full Changelog**:
https://github.com/trufflesecurity/trufflehog/compare/v3.75.1...v3.76.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/matter-labs/vault-auth-tee).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-05-21 12:15:27 +02:00
.github chore(deps): update trufflesecurity/trufflehog action to v3.76.3 2024-05-21 10:08:35 +00:00
cmd/vault-auth-tee feat: restructure project and fix vault/sdk version 2024-02-12 17:12:24 +01:00
packages chore(deps): update nix flake and go xcrypto 2024-05-21 11:03:45 +02:00
shells/vault-auth-tee chore: use snowfall lib for nix flake 2024-02-15 11:08:13 +01:00
test-fixtures/keys feat: restructure project and fix vault/sdk version 2024-02-12 17:12:24 +01:00
.gitignore feat: initial commit 2023-10-26 14:15:52 +02:00
backend.go feat: restructure project and fix vault/sdk version 2024-02-12 17:12:24 +01:00
backend_test.go all: use errors.New() which has no param instead of fmt.Errorf() 2024-03-10 09:03:53 +08:00
CONTRIBUTING.md feat: initial commit 2023-10-26 14:15:52 +02:00
Dockerfile feat: build the container image with nix 2024-02-13 13:21:23 +01:00
flake.lock chore(deps): update nix flake and go xcrypto 2024-05-21 11:03:45 +02:00
flake.nix fix(flake): follow the inputs of nixsgx 2024-03-27 16:27:45 +01:00
go.mod chore(deps): update nix flake and go xcrypto 2024-05-21 11:03:45 +02:00
go.sum chore(deps): update nix flake and go xcrypto 2024-05-21 11:03:45 +02:00
LICENSE feat: initial commit 2023-10-26 14:15:52 +02:00
path_info.go feat: restructure project and fix vault/sdk version 2024-02-12 17:12:24 +01:00
path_login.go all: use errors.New() which has no param instead of fmt.Errorf() 2024-03-10 09:03:53 +08:00
path_login_test.go feat: get current unix time for verification with NTS 2024-02-13 10:26:45 +01:00
path_tees.go fix: enable clearing the sgx_mrsigner and sgx_mrenclave field 2024-02-27 11:58:55 +01:00
README.md docs: lower warning in README.md 2024-03-26 16:04:02 +01:00
renovate.json feat: initial commit 2023-10-26 14:15:52 +02:00
roughntstime.go all: use errors.New() which has no param instead of fmt.Errorf() 2024-03-10 09:03:53 +08:00
SECURITY.md feat: initial commit 2023-10-26 14:15:52 +02:00
sgxquote.go feat: restructure project and fix vault/sdk version 2024-02-12 17:12:24 +01:00
sgxquote_test.go feat: restructure project and fix vault/sdk version 2024-02-12 17:12:24 +01:00
test_responder.go feat: restructure project and fix vault/sdk version 2024-02-12 17:12:24 +01:00
version.go feat: restructure project and fix vault/sdk version 2024-02-12 17:12:24 +01:00

vault-auth-tee

TEE remote attestation plugin for Hashicorp Vault

Disclaimer

This plugin has not yet received an audit. Use at your own risk.

License

All of the code is licensed under the Mozilla Public License 2.0 unless otherwise specified. Most of the vault plugin code is based on the vault builtin/credential/cert plugin.

Build Setup

$ wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
$ sudo bash -c 'echo "deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main" > /etc/apt/sources.list.d/intel-sgx.list'
$ sudo apt update
$ sudo apt install -y --no-install-recommends \
    libsgx-headers \
    libsgx-enclave-common \
    libsgx-urts \
    libsgx-dcap-quote-verify \
    libsgx-dcap-quote-verify-dev

Configuration

Create or Update via the ${plugin}/tees/$name endpoint

{
    "name": "TEE_role_name",
    "token_policies": "policy1,policy2,...",
    "types": "sgx",
    "sgx_mrsigner": "298037d88782e022e019b3020745b78aa40ed95c77da4bf7f3253d3a44c4fd7e",
    "sgx_mrenclave": "18946b3547d3ca036f4df7b516857e28fd512d69fed3411dc660537912faabf8",
    "sgx_isv_prodid": 0,
    "sgx_min_isv_svn": 0,
    "sgx_allowed_tcb_levels": "Ok,ConfigNeeded,OutOfDate,OutOfDateConfigNeeded,SwHardeningNeeded,ConfigAndSwHardeningNeeded"
}
  • At least one of sgx_mrsigner or sgx_mrenclave must be set. If both are set, both are used for matching.
  • sgx_isv_prodid is optional and defaults to 0.
  • sgx_min_isv_svn is optional and defaults to 0.
  • sgx_allowed_tcb_levels is optional and defaults to Ok.

Authentication

  • Client TEE generates a self-signed TLS client certificate
  • Client TEE generates an attestation report, which includes the hash of the public key of the client certificate (in case of SGX, a sha256 sum of the public key)
  • Client TEE fetches all collateral material via e.g. Intel DCAP (tee_qv_get_collateral)
  • Client TEE sends POST request with a TLS connection using the client certificate to Vault via the ${plugin}/login endpoint with the name, attestation report and the attestation collateral material
  • An optional challenge can be included in the POST request, which is then included in the attestation report of the vault response
{
    "name": "The name of the TEE role to authenticate against.",
    "quote": "The quote Base64 encoded.",
    "collateral": "The collateral Json string encoded.",
    "challenge": "An optional challenge hex encoded."
}

The response contains the Vault token and, if a challenge was included, the vault attestation report, which must contain the challenge bytes in the report_data of the quote.

{
    "auth": {
        "client_token": "The Vault token.",
        "....": "...."
    },
    "data": {
        "quote": "The vault quote Base64 encoded.",
        "collateral": "The vault collateral Json string encoded."
    }
}

Collateral Json encoding

See sgx_ql_lib_common.h

{
    "major_version": uint16,
    "minor_version": uint16,
    "tee_type": uint32,
    "pck_crl_issuer_chain": []byte,
    "root_ca_crl": []byte,
    "pck_crl": []byte,
    "tcb_info_issuer_chain": []byte,
    "tcb_info": []byte,
    "qe_identity_issuer_chain": []byte,
    "qe_identity": []byte
}