-
Notifications
You must be signed in to change notification settings - Fork 4
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
PMM-13633 Improve API Key migration to service accounts #796
Conversation
…ounts' into PMM-13633-migrate-to-service-accounts
Changes on BE:
|
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.
LGTM
return response.Error(http.StatusBadRequest, "Auth method is not service account token", errors.New("failed to get service account info")) | ||
return response.JSON(http.StatusOK, nil) |
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.
Not sure if it's good idea
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.
Any suggestions? Like reserve -1 ID for SA? In case it is not service account? Because in case of returning error it is logged in Grafana log.
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 think it's ok to log it in grafana log as API key is deprecated.
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.
Reverted and right now it will be error in logs again. Changes related to this change in PMM PR: percona/pmm@e519d45. Ticket also adjusted.
pkg/services/user/userimpl/user.go
Outdated
@@ -23,6 +20,8 @@ import ( | |||
"github.com/grafana/grafana/pkg/services/user" | |||
"github.com/grafana/grafana/pkg/setting" | |||
"github.com/grafana/grafana/pkg/util" | |||
"go.opentelemetry.io/otel/attribute" | |||
"go.opentelemetry.io/otel/trace" |
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.
please revert this change
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.
When I ran "go fmt ./..." even on v3 branch this change appear. It is moved from top to here. Same if I save in my IDE.
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.
Same with make format
?
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 dont see make format in Makefile. Only something called format-drone. Not related.
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.
please revert manually if there is no command for that.
"github.com/grafana/grafana/pkg/infra/localcache" | ||
"github.com/grafana/grafana/pkg/infra/tracing" | ||
"github.com/grafana/grafana/pkg/services/org" | ||
"github.com/grafana/grafana/pkg/services/org/orgtest" | ||
"github.com/grafana/grafana/pkg/services/team/teamtest" | ||
"github.com/grafana/grafana/pkg/services/user" | ||
"github.com/grafana/grafana/pkg/setting" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" |
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.
please revert this change
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.
Same here like above. If needed I can do it manually.
…ounts' into PMM-13633-migrate-to-service-accounts
PMM-13633
PMM PR: percona/pmm#3420
FB: Percona-Lab/pmm-submodules#3808