Skip to content

Commit 658246d

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

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

Lines changed: 126 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 116 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/authorize.go

Lines changed: 4 additions & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy