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

Role domain validation #30

Merged
merged 55 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
0754030
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Aug 17, 2023
8740671
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Jan 19, 2024
3cfd9d4
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Jan 19, 2024
e203557
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Jan 19, 2024
4a0f1e7
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Jan 19, 2024
e64a904
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Jan 19, 2024
10a0e6c
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Jan 19, 2024
57bc510
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Jan 19, 2024
541731d
feat(ci): Adding CI to build different architectures of the plugin.
spbsoluble Jan 19, 2024
580f15c
fix(ci): Remove release.yml
spbsoluble Jan 19, 2024
ccd12a4
ignoring binaries
joevanwanzeeleKF Mar 21, 2024
218d688
cleaned up artifacts, added role explanation to README, fixed domain …
joevanwanzeeleKF Mar 21, 2024
0fb49c3
cleanup
joevanwanzeeleKF Mar 21, 2024
080f274
Updated README for clarity on role functionality
joevanwanzeeleKF Mar 22, 2024
9486109
Update .goreleaser.yml to create sha256 for binary
joevanwanzeeleKF Mar 25, 2024
84a3bde
Adding CHANGELOG and readme_source to facilitate builds via goreleaser.
joevanwanzeeleKF Mar 25, 2024
a10aee4
Merge branch 'fix_ci' of https://github.com/Keyfactor/hashicorp-vault…
joevanwanzeeleKF Mar 25, 2024
d292940
Merge branch 'role-domain-validation' of https://github.com/Keyfactor…
joevanwanzeeleKF Mar 25, 2024
b162937
Update generated README
Mar 25, 2024
1de04c2
removed "split" property until goreleaser is updated to 1.25+
joevanwanzeeleKF Mar 25, 2024
67205a8
Merge branch 'role-domain-validation' of https://github.com/Keyfactor…
joevanwanzeeleKF Mar 25, 2024
92d506f
updated template name for checksums file
joevanwanzeeleKF Mar 25, 2024
66741b2
added license file, updated to generate checksum for binary only
joevanwanzeeleKF Mar 25, 2024
068ed18
updated goreleaser
joevanwanzeeleKF Mar 25, 2024
6445c5e
fix
joevanwanzeeleKF Mar 25, 2024
a9133c1
goreleaser mod
joevanwanzeeleKF Mar 25, 2024
ef9ab77
updating gorleaser to get checksum for binary
joevanwanzeeleKF Mar 26, 2024
1b56bbb
write checksums to BUILD_ARTIFACT_DIR
joevanwanzeeleKF Mar 26, 2024
609da3d
typo
joevanwanzeeleKF Mar 26, 2024
d6545b4
.Env
joevanwanzeeleKF Mar 26, 2024
e31a180
removed a set of curly braces
joevanwanzeeleKF Mar 26, 2024
e3f9f6b
updated output in extra_files
joevanwanzeeleKF Mar 26, 2024
8cfffd7
moving hook to post instead of pre
joevanwanzeeleKF Mar 28, 2024
fa3e5bd
github action
joevanwanzeeleKF Mar 28, 2024
ce82080
writing checksums to dist/
joevanwanzeeleKF Mar 28, 2024
12b87c4
adding the glob to extra files for binary checksums
joevanwanzeeleKF Mar 28, 2024
24f351f
added full path to checksums in glob property
joevanwanzeeleKF Mar 28, 2024
3fcb9e7
fixing format in checksums output
joevanwanzeeleKF Mar 28, 2024
bf3bd63
changed prop to .Target from .Goos and .Goarch
joevanwanzeeleKF Mar 28, 2024
24e60bb
quotation fix
joevanwanzeeleKF Mar 29, 2024
8eed114
fix formatting
joevanwanzeeleKF Mar 29, 2024
0fe2b0b
double quotes
joevanwanzeeleKF Mar 29, 2024
455d570
adding tabs for formatting
joevanwanzeeleKF Mar 29, 2024
1e2f6f7
splitting target value into os and arch
joevanwanzeeleKF Mar 29, 2024
5483193
formatting
joevanwanzeeleKF Mar 29, 2024
ccfdc89
inserting tabs for readability
joevanwanzeeleKF Apr 1, 2024
7dca349
giving up trying to insert tab
joevanwanzeeleKF Apr 1, 2024
20f81b1
attempting tab again
joevanwanzeeleKF Apr 1, 2024
56d3df4
format
joevanwanzeeleKF Apr 1, 2024
6ff5431
formatting
joevanwanzeeleKF Apr 1, 2024
3664064
format - works in fedora
joevanwanzeeleKF Apr 1, 2024
ddfa101
attempting to use other global vars
joevanwanzeeleKF Apr 1, 2024
114827d
formatting
joevanwanzeeleKF Apr 1, 2024
2bf92b2
format
joevanwanzeeleKF Apr 1, 2024
423f883
format
joevanwanzeeleKF Apr 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See GitHub's documentation for more information on this file:
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
Binary file added .github/images/kf_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions .github/workflows/keyfactor-starter-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Keyfactor Bootstrap Workflow

on:
workflow_dispatch:
pull_request:
types: [opened, closed, synchronize, edited, reopened]
push:
create:
branches:
- 'release-*.*'

jobs:
call-starter-workflow:
uses: keyfactor/actions/.github/workflows/starter.yml@v2
secrets:
token: ${{ secrets.V2BUILDTOKEN}}
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.vs/*
vaultSecretsEngine-update.zip
*.zip
vault/plugins/*
*.sh
*.exe
keyfactor
Keyfactor Vault Secrets Engine Guide.docx
Makefile
sample_config.json
README.md
93 changes: 93 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
- go mod tidy
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
- goos: freebsd
goarch: 'arm64'
binary: 'keyfactor'
id: "keyfactor"
main: './cmd/keyfactor'
hooks:
post:
# - cmd: sh -c "echo $(echo -n '{{split .Target "_"}}'; echo -ne "\t"; sha256sum {{.Path}} | cut -d ' ' -f 1,2) >> binary_checksums.txt"
- cmd: sh -c "echo $(echo -n '{{.Os}} '; echo -n '{{.Arch}} '; sha256sum {{.Path}} | cut -d ' ' -f 1,2) >> binary_checksums.txt"
dir: './dist'
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
name_template: '{{ .ProjectName }}.{{ .Version }}.sha256'
algorithm: sha256
signs:
- artifacts: checksum
args:
# if you are using this in a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
prerelease: auto
extra_files:
- glob: 'installation.txt'
- glob: 'LICENSE.txt'
- glob: './dist/binary_checksums.txt'
# If you want to manually examine the release before its live, uncomment this line:
draft: true
changelog:
sort: asc
use: github
filters:
exclude:
- '^test:'
- '^chore'
- 'merge conflict'
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: Dependency updates
regexp: "^.*(feat|fix)\\(deps\\)*:+.*$"
order: 300
- title: 'New Features'
regexp: "^.*feat[(\\w)]*:+.*$"
order: 100
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 200
- title: 'Documentation updates'
regexp: "^.*docs[(\\w)]*:+.*$"
order: 400
- title: Other work
order: 9999
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"*.yaml": "home-assistant"
}
}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- 1.3.1
- Fix for issue where plugin was not enforcing plugin-side role limitations for AllowedDomains and AllowSubDomains, and was relying exclusively on the certificate template for these values.

- 1.3.0
- Fix for double encoding certificates when viewed in the terminal.

- 1.2.0
- Updated the plugin to use it's own internal configuration settings storage per instance.

- 1.1.0
- added subject parameters to certificate enrollment
- now defaulting to role values for subject parameters if not provided.

- 1.0.1
- This release fixes a bug where the CA logical name was not being URL encoded before sending the request to Keyfactor.

- 1.00
- initial release
Binary file removed Keyfactor Vault Secrets Engine Guide.docx
Binary file not shown.
6 changes: 6 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Copyright 2024 Keyfactor
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
and limitations under the License.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
BINARY = "keyfactor"
VERSION = "v1.3.1"

GOARCH = amd64

UNAME = $(shell uname -s)
Expand Down Expand Up @@ -31,4 +34,20 @@ clean:
fmt:
go fmt $$(go list ./...)


release:
GOOS=darwin GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_darwin_amd64
GOOS=freebsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_freebsd_386
GOOS=freebsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_freebsd_amd64
GOOS=freebsd GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_freebsd_arm
GOOS=linux GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_linux_386
GOOS=linux GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_linux_amd64
GOOS=linux GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_linux_arm
GOOS=openbsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_openbsd_386
GOOS=openbsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_openbsd_amd64
GOOS=solaris GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_solaris_amd64
GOOS=windows GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_windows_386
GOOS=windows GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_windows_amd64


.PHONY: build clean fmt start enable
Loading
Loading