-
Notifications
You must be signed in to change notification settings - Fork 83
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mikehelmick The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
r := httptest.NewRequest("PUT", "/", nil) | ||
r = r.Clone(ctx) | ||
r = mux.SetURLVars(r, map[string]string{"id": fmt.Sprintf("%d", toDestroy)}) |
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.
TIL
pkg/controller/smskeys/smskeys.go
Outdated
} | ||
|
||
// New creates a new Controller | ||
func New(ctx context.Context, config *config.ServerConfig, db *database.Database, cacher cache.Cacher, h render.Renderer) (*Controller, error) { |
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.
Consider passing in the public key cache as a parameter instead of building it in the controller. That removes the need to pass in a context to New and removes the need to return an error.
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.
did same for realmkeys
m.Title("Authenticated SMS Signing keys") | ||
m["realm"] = realm | ||
|
||
keys, err := realm.ListSMSSigningKeys(c.db) |
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.
This should be cached (if we don't have a ListSMSSigningKeysCached, we should make one)
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.
I don't think we want to cache in this instance - this is the admin screen.
We do cache the public keys, so we're not hitting KMS on every refresh.
/lgtm |
towards #1640
Proposed Changes
Release Note