Hashicorp Vault plugin for authenticating Trusted Execution Environments (TEE) like SGX enclaves
Find a file
Harald Hoyer c5a0d92bf5
chore(deps): update trufflesecurity/trufflehog action to v3.78.0 (#78)
[![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.76.3` -> `v3.78.0` |

---

### Release Notes

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

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

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

#### What's Changed

- Add postman to tui by [@&#8203;hxnyk](https://togithub.com/hxnyk) in
[https://github.com/trufflesecurity/trufflehog/pull/2895](https://togithub.com/trufflesecurity/trufflehog/pull/2895)
- chore(deps): update alpine docker tag to v3.20 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2874](https://togithub.com/trufflesecurity/trufflehog/pull/2874)
- fix(deps): update golang.org/x/exp digest to
[`fd00a4e`](fd00a4e)
by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2899](https://togithub.com/trufflesecurity/trufflehog/pull/2899)
- Update metadata for DataDog for API + APPKey by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2879](https://togithub.com/trufflesecurity/trufflehog/pull/2879)
- Consistent docker image of MSSQL for integration testing. by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2898](https://togithub.com/trufflesecurity/trufflehog/pull/2898)
- fix(deps): update module github.com/charmbracelet/bubbletea to v0.26.4
by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2885](https://togithub.com/trufflesecurity/trufflehog/pull/2885)
- Remove 'www' from `DefaultFalsePositives` by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[https://github.com/trufflesecurity/trufflehog/pull/2896](https://togithub.com/trufflesecurity/trufflehog/pull/2896)
- Redis integration test by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2901](https://togithub.com/trufflesecurity/trufflehog/pull/2901)
- Fix Github `enumerateWithToken` test failure by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[https://github.com/trufflesecurity/trufflehog/pull/2880](https://togithub.com/trufflesecurity/trufflehog/pull/2880)
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.14 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2900](https://togithub.com/trufflesecurity/trufflehog/pull/2900)
- fix(deps): update module github.com/hashicorp/go-retryablehttp to
v0.7.7 by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2904](https://togithub.com/trufflesecurity/trufflehog/pull/2904)
- integration testing for mongodb. by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2907](https://togithub.com/trufflesecurity/trufflehog/pull/2907)
- fix(deps): update module
github.com/azure/go-autorest/autorest/azure/auth to v0.5.13 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2902](https://togithub.com/trufflesecurity/trufflehog/pull/2902)
- chore: fix some comments by
[@&#8203;jinjiadu](https://togithub.com/jinjiadu) in
[https://github.com/trufflesecurity/trufflehog/pull/2903](https://togithub.com/trufflesecurity/trufflehog/pull/2903)
- \[chore] Always log git repositories being scanned by
[@&#8203;mcastorina](https://togithub.com/mcastorina) in
[https://github.com/trufflesecurity/trufflehog/pull/2909](https://togithub.com/trufflesecurity/trufflehog/pull/2909)
- Add Jenkins scanning by
[@&#8203;dustin-decker](https://togithub.com/dustin-decker) in
[https://github.com/trufflesecurity/trufflehog/pull/2892](https://togithub.com/trufflesecurity/trufflehog/pull/2892)

#### New Contributors

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

**Full Changelog**:
https://github.com/trufflesecurity/trufflehog/compare/v3.77.0...v3.78.0

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

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

#### What's Changed

- Remove "finished verificationOverlap chunks" log line by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[https://github.com/trufflesecurity/trufflehog/pull/2860](https://togithub.com/trufflesecurity/trufflehog/pull/2860)
- fix(deps): update module github.com/wasilibs/go-re2 to v1.5.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2861](https://togithub.com/trufflesecurity/trufflehog/pull/2861)
- fix(deps): update module google.golang.org/api to v0.181.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2857](https://togithub.com/trufflesecurity/trufflehog/pull/2857)
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.5 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2859](https://togithub.com/trufflesecurity/trufflehog/pull/2859)
- Update azure storage extra data by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2808](https://togithub.com/trufflesecurity/trufflehog/pull/2808)
- Update regex for Organization in Azure Devops detector by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2866](https://togithub.com/trufflesecurity/trufflehog/pull/2866)
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.6 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2867](https://togithub.com/trufflesecurity/trufflehog/pull/2867)
- \[chore] - Use http.NewRequestWithContext by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[https://github.com/trufflesecurity/trufflehog/pull/2870](https://togithub.com/trufflesecurity/trufflehog/pull/2870)
- adding Groq detector by [@&#8203;0x1](https://togithub.com/0x1) in
[https://github.com/trufflesecurity/trufflehog/pull/2873](https://togithub.com/trufflesecurity/trufflehog/pull/2873)
- Log reasons for GitLab repo exclusion by
[@&#8203;rosecodym](https://togithub.com/rosecodym) in
[https://github.com/trufflesecurity/trufflehog/pull/2875](https://togithub.com/trufflesecurity/trufflehog/pull/2875)
- \[github] Scan user repositories by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[https://github.com/trufflesecurity/trufflehog/pull/2814](https://togithub.com/trufflesecurity/trufflehog/pull/2814)
- Elastic adapter by [@&#8203;camgunz](https://togithub.com/camgunz) in
[https://github.com/trufflesecurity/trufflehog/pull/2727](https://togithub.com/trufflesecurity/trufflehog/pull/2727)
- Improve handling of Gist URLs by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[https://github.com/trufflesecurity/trufflehog/pull/2653](https://togithub.com/trufflesecurity/trufflehog/pull/2653)
- Fix some GitHub source test issues by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[https://github.com/trufflesecurity/trufflehog/pull/2774](https://togithub.com/trufflesecurity/trufflehog/pull/2774)
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.10 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2871](https://togithub.com/trufflesecurity/trufflehog/pull/2871)
- fix(deps): update module github.com/go-logr/logr to v1.4.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2869](https://togithub.com/trufflesecurity/trufflehog/pull/2869)
- fix(deps): update module cloud.google.com/go/secretmanager to v1.13.1
by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2884](https://togithub.com/trufflesecurity/trufflehog/pull/2884)
- fix(deps): update golang.org/x/exp digest to
[`4c93da0`](4c93da0)
by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2883](https://togithub.com/trufflesecurity/trufflehog/pull/2883)
- fix(deps): update module github.com/elastic/go-elasticsearch/v8 to
v8.13.1 by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2886](https://togithub.com/trufflesecurity/trufflehog/pull/2886)
- fix(deps): update module github.com/gabriel-vasile/mimetype to v1.4.4
by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/trufflesecurity/trufflehog/pull/2890](https://togithub.com/trufflesecurity/trufflehog/pull/2890)
- Added extra data for LaunchDarkly by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[https://github.com/trufflesecurity/trufflehog/pull/2836](https://togithub.com/trufflesecurity/trufflehog/pull/2836)
- feat: support docker image history scanning by
[@&#8203;jamestelfer](https://togithub.com/jamestelfer) in
[https://github.com/trufflesecurity/trufflehog/pull/2882](https://togithub.com/trufflesecurity/trufflehog/pull/2882)

#### New Contributors

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

**Full Changelog**:
https://github.com/trufflesecurity/trufflehog/compare/v3.76.3...v3.77.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM4OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-06-10 10:56:55 +02:00
.github chore(deps): update trufflesecurity/trufflehog action to v3.78.0 2024-06-10 08:37:47 +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 2024-06-10 10:32:19 +02: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 nixsgx dependency 2024-06-07 16:56:11 +02:00
flake.nix chore(deps): update nixsgx dependency 2024-06-07 16:56:11 +02:00
go.mod chore(deps): update 2024-06-10 10:32:19 +02:00
go.sum chore(deps): update 2024-06-10 10:32:19 +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
}