Skip to content

500 Internal Server Error while trying to coder port-forward #10037

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

Closed
spikecurtis opened this issue Oct 4, 2023 · 4 comments
Closed

500 Internal Server Error while trying to coder port-forward #10037

spikecurtis opened this issue Oct 4, 2023 · 4 comments
Assignees
Labels
s2 Broken use cases or features (with a workaround). Only humans may set this.

Comments

@spikecurtis
Copy link
Contributor

Seen on our dogfood instance.

% coder -v port-forward dogfood2 --tcp 8080
Internal error fetching workspace agent.
unauthorized: rbac: forbidden

Coder API log

			"fields": {
				"path": "/api/v2/workspaceagents/REDACTED",
				"remote_addr": "REDACTED",
				"took": "19.020056ms",
				"status_code": 500,
				"proto": "HTTP/2.0",
				"host": "dev.coder.com",
				"start": "2023-10-04T12:47:26.929773465Z",
				"response_body": "{\"message\":\"Internal error fetching workspace agent.\",\"detail\":\"unauthorized: rbac: forbidden\"}\n",
				"request_id": "abab31f3-a344-43c0-9fae-880f264ed83c",
				"latency_ms": 19
			},

Client is macOS Coder CLI

% coder version
Coder v2.1.5+66019ef Tue Sep  5 21:44:12 UTC 2023
https://github.com/coder/coder/commit/66019ef70a69cc65679733da65547761a67e50ce

Full build of Coder, supports the  server  subcommand.
@spikecurtis spikecurtis added s1 Bugs that break core workflows. Only humans may set this. bug labels Oct 4, 2023
@spikecurtis
Copy link
Contributor Author

Doesn't happen if I have owner role. I think it's pretty clear we shouldn't need owner to port-forward to our own workspaces...

@johnstcn
Copy link
Member

johnstcn commented Oct 4, 2023

Appears to have been introduced by #9584

@johnstcn
Copy link
Member

johnstcn commented Oct 4, 2023

#10043 fixes this for this particular instance, so lowering severity. However, there may be other similar issues lurking that we haven't caught yet. Will address these in a follow-up.

@johnstcn johnstcn added s2 Broken use cases or features (with a workaround). Only humans may set this. and removed s1 Bugs that break core workflows. Only humans may set this. labels Oct 4, 2023
@johnstcn
Copy link
Member

#10133 adds a ruleguard linter plus changes to CLI unit tests that would have detected this issue. Closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s2 Broken use cases or features (with a workaround). Only humans may set this.
Projects
None yet
Development

No branches or pull requests

2 participants