Skip to content

Commit d0f2727

Browse files
Emyrkdeansheather
authored andcommitted
chore: add workspace proxies to the backend (#7032)
Co-authored-by: Dean Sheather <dean@deansheather.com>
1 parent fec888a commit d0f2727

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3639
-755
lines changed

coderd/apidoc/docs.go

+126-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+116-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/authorize.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func AuthorizeFilter[O rbac.Objecter](h *HTTPAuthorizer, r *http.Request, action
2525
h.Logger.Error(r.Context(), "filter failed",
2626
slog.Error(err),
2727
slog.F("user_id", roles.Actor.ID),
28-
slog.F("username", roles.Username),
28+
slog.F("username", roles.ActorName),
2929
slog.F("roles", roles.Actor.SafeRoleNames()),
3030
slog.F("scope", roles.Actor.SafeScopeName()),
3131
slog.F("route", r.URL.Path),
@@ -77,8 +77,8 @@ func (h *HTTPAuthorizer) Authorize(r *http.Request, action rbac.Action, object r
7777
// in the early days
7878
logger.Warn(r.Context(), "unauthorized",
7979
slog.F("roles", roles.Actor.SafeRoleNames()),
80-
slog.F("user_id", roles.Actor.ID),
81-
slog.F("username", roles.Username),
80+
slog.F("actor_id", roles.Actor.ID),
81+
slog.F("actor_name", roles.ActorName),
8282
slog.F("scope", roles.Actor.SafeScopeName()),
8383
slog.F("route", r.URL.Path),
8484
slog.F("action", action),
@@ -129,7 +129,7 @@ func (api *API) checkAuthorization(rw http.ResponseWriter, r *http.Request) {
129129
api.Logger.Debug(ctx, "check-auth",
130130
slog.F("my_id", httpmw.APIKey(r).UserID),
131131
slog.F("got_id", auth.Actor.ID),
132-
slog.F("name", auth.Username),
132+
slog.F("name", auth.ActorName),
133133
slog.F("roles", auth.Actor.SafeRoleNames()),
134134
slog.F("scope", auth.Actor.SafeScopeName()),
135135
)

0 commit comments

Comments
 (0)