Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bd87a68
wip: queue item signing via asymm keys
plyr4 Oct 21, 2022
41a1bba
revert: docker-compose local changes
plyr4 Oct 21, 2022
70e9b23
wip: queue item signing via asymm keys
plyr4 Oct 21, 2022
2fcaf0c
wip: queue signing cleanup
plyr4 Oct 21, 2022
bae5946
fix: generate example keys
plyr4 May 11, 2023
203bdb7
tweak: env var naming
plyr4 May 11, 2023
43141ee
enhance: key validations
plyr4 May 11, 2023
ae70584
chore: comment wording
plyr4 May 11, 2023
ca19837
chore: merge with main
plyr4 May 11, 2023
e48fa44
chore: go mod tidy
plyr4 May 11, 2023
683e0a3
wip: nil return to allow read-only setup
plyr4 May 22, 2023
b1c4c48
chore: merge with main
plyr4 Jul 20, 2023
d9d7364
chore: add base64 encoded comment
plyr4 Jul 20, 2023
fc52931
chore: merge with main
plyr4 Aug 8, 2023
96f7bd5
fix: adding keys to redis test mocks
plyr4 Aug 9, 2023
67f4416
Merge branch 'main' into feat/queue-signing
plyr4 Aug 9, 2023
1324f55
Merge branch 'main' of github.com:go-vela/server into feat/queue-signing
plyr4 Aug 16, 2023
4786391
fix: do not allow empty signing keys
plyr4 Aug 17, 2023
448a95d
Merge branch 'main' into feat/queue-signing
plyr4 Aug 17, 2023
2c9d166
fix: lint
plyr4 Aug 17, 2023
346df6c
fix: lint
plyr4 Aug 17, 2023
00507fb
chore: add middleware tests
plyr4 Aug 17, 2023
0328180
Merge branch 'main' into feat/queue-signing
plyr4 Aug 17, 2023
7935fe5
Merge branch 'main' into feat/queue-signing
plyr4 Aug 23, 2023
c28b5d6
Merge branch 'main' into feat/queue-signing
ecrupper Aug 23, 2023
37926a5
tweak: queue/redis/pop.go suggestion
plyr4 Aug 23, 2023
5815fe9
tweak: variable naming for queue keys
plyr4 Aug 23, 2023
5bf066b
tweak: cli variable naming for queue keys
plyr4 Aug 23, 2023
f24894c
Merge branch 'main' into feat/queue-signing
plyr4 Aug 23, 2023
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
Prev Previous commit
Next Next commit
tweak: cli variable naming for queue keys
  • Loading branch information
plyr4 committed Aug 23, 2023
commit 5bf066b5532686cbd7aee28af53cb9e9cae08021
2 changes: 1 addition & 1 deletion cmd/vela-server/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func setupQueue(c *cli.Context) (queue.Service, error) {
Cluster: c.Bool("queue.cluster"),
Routes: c.StringSlice("queue.routes"),
Timeout: c.Duration("queue.pop.timeout"),
PrivateKey: c.String("queue.signing.private-key"),
PrivateKey: c.String("queue.private-key"),
}

// setup the queue
Expand Down
2 changes: 1 addition & 1 deletion cmd/vela-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func server(c *cli.Context) error {
middleware.Secret(c.String("vela-secret")),
middleware.Secrets(secrets),
middleware.Scm(scm),
middleware.QueueSigningPrivateKey(c.String("queue.signing.private-key")),
middleware.QueueSigningPrivateKey(c.String("queue.private-key")),
middleware.Allowlist(c.StringSlice("vela-repo-allowlist")),
middleware.DefaultBuildLimit(c.Int64("default-build-limit")),
middleware.DefaultTimeout(c.Int64("default-build-timeout")),
Expand Down
4 changes: 2 additions & 2 deletions queue/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ var Flags = []cli.Flag{
&cli.StringFlag{
EnvVars: []string{"VELA_QUEUE_SIGNING_PRIVATE_KEY"},
FilePath: "/vela/signing.key",
Name: "queue.signing.private-key",
Name: "queue.private-key",
Usage: "set value of base64 encoded queue signing private key",
},
&cli.StringFlag{
EnvVars: []string{"VELA_QUEUE_SIGNING_PUBLIC_KEY"},
FilePath: "/vela/signing.pub",
Name: "queue.signing.public-key",
Name: "queue.public-key",
Usage: "set value of base64 encoded queue signing public key",
},
}
2 changes: 1 addition & 1 deletion router/middleware/signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// to sign items that are pushed to the queue.
func QueueSigningPrivateKey(key string) gin.HandlerFunc {
return func(c *gin.Context) {
c.Set("queue.signing.private-key", key)
c.Set("queue.private-key", key)
c.Next()
}
}