Skip to content

PLAT-137 Pentest: Change /auth/with-token to use short-lived tokens #7750

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update admin/server/server.go
Co-authored-by: Benjamin Egelund-Müller <b@egelund-muller.com>
  • Loading branch information
NamanMahor and begelundmuller authored Aug 6, 2025
commit e1958fe04b6375a0e00f2b6268b3b829eaa3e5e8
3 changes: 2 additions & 1 deletion admin/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@
return nil, fmt.Errorf("failed to create transcoder: %w", err)
}

// Add specific route for GetCurrentUser with cookie refresh
// Add auth cookie refresh specifically for the GetCurrentUser RPC.
// This is sufficient to refresh the cookie on each page load without unnecessarily refreshing cookies in each API call.
mux.Handle("/v1/users/current", s.authenticator.HTTPMiddlewareWithCookieRefresh(transcoder))

Check failure on line 191 in admin/server/server.go

View workflow job for this annotation

GitHub Actions / lint

s.authenticator.HTTPMiddlewareWithCookieRefresh undefined (type *"github.com/rilldata/rill/admin/server/auth".Authenticator has no field or method HTTPMiddlewareWithCookieRefresh)) (typecheck)

Check failure on line 191 in admin/server/server.go

View workflow job for this annotation

GitHub Actions / lint

s.authenticator.HTTPMiddlewareWithCookieRefresh undefined (type *"github.com/rilldata/rill/admin/server/auth".Authenticator has no field or method HTTPMiddlewareWithCookieRefresh)) (typecheck)

Check failure on line 191 in admin/server/server.go

View workflow job for this annotation

GitHub Actions / lint

s.authenticator.HTTPMiddlewareWithCookieRefresh undefined (type *"github.com/rilldata/rill/admin/server/auth".Authenticator has no field or method HTTPMiddlewareWithCookieRefresh) (typecheck)

Check failure on line 191 in admin/server/server.go

View workflow job for this annotation

GitHub Actions / test

s.authenticator.HTTPMiddlewareWithCookieRefresh undefined (type *"github.com/rilldata/rill/admin/server/auth".Authenticator has no field or method HTTPMiddlewareWithCookieRefresh)

Check failure on line 191 in admin/server/server.go

View workflow job for this annotation

GitHub Actions / e2e (web-integration)

s.authenticator.HTTPMiddlewareWithCookieRefresh undefined (type *"github.com/rilldata/rill/admin/server/auth".Authenticator has no field or method HTTPMiddlewareWithCookieRefresh)

Check failure on line 191 in admin/server/server.go

View workflow job for this annotation

GitHub Actions / e2e (web-admin)

s.authenticator.HTTPMiddlewareWithCookieRefresh undefined (type *"github.com/rilldata/rill/admin/server/auth".Authenticator has no field or method HTTPMiddlewareWithCookieRefresh)

mux.Handle("/v1/", transcoder)
mux.Handle("/rill.admin.v1.AdminService/", transcoder)
Expand Down
Loading