Skip to content
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

Part 9/n - Add kubernetes secret plugin #107

Merged
merged 45 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6491b65
repo init
tvoran Apr 6, 2022
dca0c35
Basic plugin setup (#1)
tvoran Apr 11, 2022
4a1591f
config endpoint implementation (#2)
tvoran Apr 19, 2022
709eb57
adding roles endpoint (#3)
tvoran May 3, 2022
f61499d
creds endpoint (#4)
tvoran May 20, 2022
2f60824
add changelog (#5)
tvoran May 20, 2022
e38a909
Split additional annotations (#7)
tomhjp May 25, 2022
498edce
changelog++
tvoran May 26, 2022
aab96f5
test with kubernetes 1.24 (#9)
tvoran Jun 8, 2022
dee9534
Test against Vault Enterprise (#11)
Jul 19, 2022
b617757
Update jira sync (#12)
benashz Aug 5, 2022
b423467
Update team to be 'foundations' (#13)
benashz Aug 8, 2022
bc53143
Role namespace configuration possible via LabelSelector (#10)
f4z3r Sep 16, 2022
f9cb9f0
Repo hygiene (#14)
tvoran Sep 16, 2022
3d24bd2
changelog++
tvoran Sep 16, 2022
02f0219
Update dependencies (#15)
Nov 8, 2022
47eab73
[COMPLIANCE] Update MPL-2.0 LICENSE (#16)
hashicorp-copywrite[bot] Nov 9, 2022
6b1994e
Add /check endpoint to verify env variable setup (#18)
Dec 15, 2022
077bb00
CreateOperation should only be implemented alongside ExistenceCheck (…
maxb Feb 8, 2023
17938cf
change test to use update operation after removal of create operation…
kpcraig Feb 8, 2023
a0e8750
[COMPLIANCE] Add Copyright and License Headers (#22)
hashicorp-copywrite[bot] Feb 28, 2023
5fd13ac
changelog++ (#21)
kpcraig Feb 28, 2023
1f51056
enable plugin multiplexing (#23)
fairclothjm Feb 28, 2023
fb49b9f
feat: add audiences option on token create and token_default_audience…
thyton Mar 10, 2023
724c9f3
Update go, k8s, and Vault (#25)
tvoran Mar 23, 2023
9b6ea73
Prep for independent release; update deps (#26)
Mar 30, 2023
1340266
feat: kubernetes_namespace omittable on token create for single names…
thyton Apr 7, 2023
9f0a487
Add display attributes for OpenAPI OperationID's (#28)
averche Apr 18, 2023
ce061dc
Result of tsccr-helper -pin-all-workflows . (#29)
hashicorp-tsccr[bot] Apr 21, 2023
a5db793
update dependencies (#30)
fairclothjm May 25, 2023
ad634b0
make changelog correction for release v0.5.0 (#31)
fairclothjm May 25, 2023
fe4b949
repo hygiene (#32)
tvoran Jun 15, 2023
e1d2312
workflows: add bulk dep update job (#34)
fairclothjm Jul 26, 2023
e62408f
Bump google.golang.org/grpc from 1.41.0 to 1.53.0 (#33)
dependabot[bot] Sep 6, 2023
17019ff
Update dependencies and release tag (#35)
robmonte Sep 6, 2023
5903c1e
go, k8s, and actions updates (#37)
tvoran Oct 12, 2023
2f75db6
Bump google.golang.org/grpc from 1.57.0 to 1.57.1 (#38)
dependabot[bot] Oct 27, 2023
8af09a9
Bump github.com/docker/docker from 24.0.5+incompatible to 24.0.7+inco…
dependabot[bot] Nov 2, 2023
1e7a059
Automated dependency upgrades (#40)
hc-github-team-secure-vault-ecosystem Nov 2, 2023
fdc0f88
Bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 (#41)
dependabot[bot] Nov 28, 2023
0074a52
Automated dependency upgrades (#42)
hc-github-team-secure-vault-ecosystem Dec 1, 2023
d3d8789
Replace hashicorp/vault -> openbao/openbao in secret/kubernetes
cipherboy Feb 2, 2024
477aea6
Add 'builtin/logical/kubernetes/' from commit 'd3d8789fbd26469e969899…
cipherboy Feb 2, 2024
be8fd13
Rename cmd/vault-plugin-secrets-kubernetes -> kubernetes
cipherboy Feb 2, 2024
0eb372a
Use builtin/logical/kubernetes over hashicorp/vault-plugin-secrets-ku…
cipherboy Feb 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions builtin/logical/kubernetes/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Overview

A high level description of the contribution, including:
Who the change affects or is for (stakeholders)?
What is the change?
Why is the change needed?
How does this change affect the user experience (if at all)?

# Design of Change

How was this change implemented?

# Related Issues/Pull Requests

[ ] [Issue #1234](https://github.com/hashicorp/vault/issues/1234)
[ ] [PR #1234](https://github.com/hashicorp/vault/pr/1234)

# Contributor Checklist

[ ] Add relevant docs to upstream Vault repository, or sufficient reasoning why docs won’t be added yet
[My Docs PR Link](link)
[Example](https://github.com/hashicorp/vault/commit/2715f5cec982aabc7b7a6ae878c547f6f475bba6)
[ ] Add output for any tests not ran in CI to the PR description (eg, acceptance tests)
[ ] Backwards compatible
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Upgrade dependencies
on:
workflow_dispatch:
schedule:
# Runs 12:00AM on the first of every month
- cron: '0 0 1 * *'
jobs:
upgrade:
# using `main` as the ref will keep your workflow up-to-date
uses: hashicorp/vault-workflows-common/.github/workflows/bulk-dependency-updates.yaml@main
secrets:
VAULT_ECO_GITHUB_TOKEN: ${{ secrets.VAULT_ECO_GITHUB_TOKEN }}
with:
# either hashicorp/vault-ecosystem-applications or hashicorp/vault-ecosystem-foundations
reviewer-team: hashicorp/vault-ecosystem-foundations
repository: ${{ github.repository }}
run-id: ${{ github.run_id }}
17 changes: 17 additions & 0 deletions builtin/logical/kubernetes/.github/workflows/jira.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Jira Sync
on:
issues:
types: [opened, closed, deleted, reopened]
pull_request_target:
types: [opened, closed, reopened]
issue_comment: # Also triggers when commenting on a PR from the conversation view
types: [created]
jobs:
sync:
uses: hashicorp/vault-workflows-common/.github/workflows/jira.yaml@main
secrets:
JIRA_SYNC_BASE_URL: ${{ secrets.JIRA_SYNC_BASE_URL }}
JIRA_SYNC_USER_EMAIL: ${{ secrets.JIRA_SYNC_USER_EMAIL }}
JIRA_SYNC_API_TOKEN: ${{ secrets.JIRA_SYNC_API_TOKEN }}
with:
teams-array: '["ecosystem", "foundations-eco"]'
54 changes: 54 additions & 0 deletions builtin/logical/kubernetes/.github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Tests

on: [push, workflow_dispatch]

jobs:
fmtcheck:
runs-on: ubuntu-latest
env:
GOFUMPT_VERSION: 0.3.1
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: .go-version
- run: |
go install "mvdan.cc/gofumpt@v${GOFUMPT_VERSION}"
make fmtcheck

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: .go-version
- run: make test

integrationTest:
runs-on: ubuntu-latest
needs: [fmtcheck, test]
strategy:
fail-fast: false
matrix:
kind-k8s-version: [1.24.15, 1.25.11, 1.26.6, 1.27.3, 1.28.0]
enterprise: ["", "-ent"]
name: Integration test ${{ matrix.enterprise }} kind ${{ matrix.kind-k8s-version }}
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Create K8s Kind Cluster
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
with:
version: v0.20.0
cluster_name: vault-plugin-secrets-kubernetes
config: integrationtest/kind/config.yaml
node_image: kindest/node:v${{ matrix.kind-k8s-version }}
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: .go-version
- env:
VAULT_LICENSE_CI: ${{ secrets.VAULT_LICENSE_CI }}
run: make setup-integration-test${{ matrix.enterprise }}
- env:
INTEGRATION_TESTS: true
run: make integration-test TESTARGS="-v"
5 changes: 5 additions & 0 deletions builtin/logical/kubernetes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
.idea
.vscode
pkg/*
bin/*
1 change: 1 addition & 0 deletions builtin/logical/kubernetes/.go-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.21.3
114 changes: 114 additions & 0 deletions builtin/logical/kubernetes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
## Unreleased

### Changes

* Building with go 1.21.3
* Testing with k8s 1.24-1.28
* Dependency updates
* golang.org/x/crypto v0.13.0 -> v0.14.0
* golang.org/x/net v0.15.0 -> v0.17.0
* golang.org/x/sys v0.12.0 -> v0.13.0
* golang.org/x/term v0.12.0 -> v0.13.0
* github.com/docker/docker v24.0.5 -> v24.0.7
* github.com/hashicorp/vault/sdk v0.10.0 -> v0.10.2
* k8s.io/api v0.28.1 -> v0.28.3
* k8s.io/apimachinery v0.28.1 -> v0.28.3
* k8s.io/client-go v0.28.1 -> v0.28.3
* github.com/go-jose/go-jose/v3 v3.0.0 -> v3.0.1

## 0.6.0 (September 6th, 2023)

### Features:

* update dependencies [GH-35](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/35)
* github.com/hashicorp/vault/api v1.10.0
* github.com/hashicorp/vault/sdk v0.10.0
* github.com/stretchr/testify v1.8.4
* k8s.io/api v0.28.1
* k8s.io/apimachinery v0.28.1
* k8s.io/client-go v0.28.1
* golang.org/x/net v0.15.0

### Changes

* Testing with K8s versions 1.23-1.27
* Building with Go 1.20.5

## 0.5.0 (May 25, 2023)

### Features:

* allow omitting `kubernetes_namespace` on token create for single namespace Vault roles [GH-27](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/27)
* update dependencies [GH-196](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/30)
* github.com/hashicorp/vault/api v1.9.1
* github.com/stretchr/testify v1.8.3
* k8s.io/api v0.27.2
* k8s.io/apimachinery v0.27.2
* k8s.io/client-go v0.27.2

## 0.4.0 (March 30, 2023)

### Features:

* add `audiences` option to set audiences for the k8s token created from the TokenRequest API, and add `token_default_audiences`
option to set the default audiences on role write [GH-24](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/24)

### Changes:

* enable plugin multiplexing [GH-23](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/23)
* update dependencies
* `github.com/hashicorp/vault/api` v1.9.0
* `github.com/hashicorp/vault/sdk` v0.8.1
* `github.com/hashicorp/go-hclog` v1.3.1 -> v1.5.0
* `github.com/stretchr/testify` v1.8.1 -> v1.8.2
* `k8s.io/api` v0.25.3 -> v0.26.3
* `k8s.io/apimachinery` v0.25.3 -> v0.26.3
* `k8s.io/client-go` v0.25.3 -> v0.26.3

## 0.3.0 (February 9, 2023)

* Add `/check` endpoint to determine if environment variables are set [GH-18](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/18)

### Changes

* Update to Go 1.19 [GH-15](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/15)
* Update dependencies [GH-15](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/15):
| MODULE | VERSION | NEW VERSION | DIRECT | VALID TIMESTAMPS |
|---------------------------------|---------|-------------|--------|------------------|
| github.com/cenkalti/backoff/v3 | v3.0.0 | v3.2.2 | true | true |
| github.com/hashicorp/go-hclog | v0.16.2 | v1.3.1 | true | true |
| github.com/hashicorp/go-version | v1.2.0 | v1.6.0 | true | true |
| github.com/hashicorp/vault/api | v1.7.2 | v1.8.2 | true | true |
| github.com/hashicorp/vault/sdk | v0.5.3 | v0.6.1 | true | true |
| github.com/stretchr/testify | v1.8.0 | v1.8.1 | true | true |
| gopkg.in/square/go-jose.v2 | v2.5.1 | v2.6.0 | true | true |
| k8s.io/api | v0.22.2 | v0.25.3 | true | true |
| k8s.io/apimachinery | v0.22.2 | v0.25.3 | true | true |
| k8s.io/client-go | v0.22.2 | v0.25.3 | true | true |

## 0.2.0 (September 15, 2022)

### Changes

* Test against k8s versions 1.22-25, vault-helm 0.22.0, and Vault 1.11.3 [[GH-14](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/14)]
* Use go 1.19.1 [[GH-14](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/14)]

### Improvements

* Test against Vault Enterprise [[GH-11](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/11)]
* Role namespace configuration possible via LabelSelector [[GH-10](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/10)]
* Update golang dependencies to avoid CVEs [[GH-14](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/14)]
* golang.org/x/crypto@v0.0.0-20220314234659-1baeb1ce4c0b
* golang.org/x/net@v0.0.0-20220906165146-f3363e06e74c
* golang.org/x/sys@v0.0.0-20220728004956-3c1f35247d10
* github.com/stretchr/testify@v1.8.0

## 0.1.1 (May 26th, 2022)

### Changes

* Split `additional_metadata` into `extra_annotations` and `extra_labels` parameters [[GH-7](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/7)]

## 0.1.0 (May 20th, 2022)

Initial implementation [[GH-2](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/2)][[GH-3](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/3)][[GH-4](https://github.com/hashicorp/vault-plugin-secrets-kubernetes/pull/4)]