-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add a CLI for rotating webhook secrets #2735
Conversation
Will we need another k8s job to run this? |
cmd/server/app/webhook_update.go
Outdated
}(dbConn) | ||
|
||
store := db.NewStore(dbConn) | ||
allProviders, err := store.GlobalListProvidersByName(ctx, providerName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we instead iterate all providers, check that they implement github, and then attempt the migration? We're moving away from predetermined names and more into traits and classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do that, sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment on the documentation, but otherwise I tested it and it works great.
minder-server webhook update -p github | ||
``` | ||
|
||
Note that the command simply replaces the webhook secret in the configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it the opposite? It seems like this command updates the secret in GitHub, but you will need to restart your Minder server to pick up the secret in the configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gah, of course when I wrote configuration I meant github..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
yes, that's how I was thinking the rotation would work:
|
342f127
to
6b77069
Compare
Summary
Adds a minder-server subcommand that allows you to change minder webhook secrets
in github as a way of rotating the secret
Fixes: #2722
Change Type
Mark the type of change your PR introduces:
Testing
Review Checklist: