Skip to content

Commit 3d95e1b

Browse files
committed
server: fix DCR tests
Signed-off-by: Benson Wong <[email protected]>
1 parent f0eb15a commit 3d95e1b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

server/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func TestServeDynamicClientRegistration(t *testing.T) {
249249
method: "POST",
250250
body: `{"redirect_uris": ["https://example.com/callback"]}`,
251251
isFunnel: true,
252-
expectStatus: http.StatusForbidden,
252+
expectStatus: http.StatusUnauthorized,
253253
checkResponse: func(t *testing.T, body []byte) {
254254
var errResp map[string]interface{}
255255
if err := json.Unmarshal(body, &errResp); err != nil {

server/clients.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (s *IDPServer) storeFunnelClientsLocked() error {
122122
// Migrated from legacy/tsidp.go:2055-2094
123123
func (s *IDPServer) serveClients(w http.ResponseWriter, r *http.Request) {
124124
if isFunnelRequest(r) {
125-
writeHTTPError(w, r, http.StatusUnauthorized, "access_denied", "not allowed over funnel")
125+
writeHTTPError(w, r, http.StatusUnauthorized, "access_denied", "not available over funnel")
126126
return
127127
}
128128

@@ -274,7 +274,7 @@ func (s *IDPServer) serveDeleteClient(w http.ResponseWriter, r *http.Request, cl
274274
func (s *IDPServer) serveDynamicClientRegistration(w http.ResponseWriter, r *http.Request) {
275275
// Block funnel requests - dynamic registration is only available over tailnet
276276
if isFunnelRequest(r) {
277-
writeHTTPError(w, r, http.StatusUnauthorized, "access_denied", "not allowed over funnel")
277+
writeHTTPError(w, r, http.StatusUnauthorized, "access_denied", "not available over funnel")
278278
return
279279
}
280280

server/ui.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var processStart = time.Now()
4444
// Migrated from legacy/ui.go:61-85
4545
func (s *IDPServer) handleUI(w http.ResponseWriter, r *http.Request) {
4646
if isFunnelRequest(r) {
47-
writeHTTPError(w, r, http.StatusUnauthorized, "access_denied", "not allowed over funnel")
47+
writeHTTPError(w, r, http.StatusUnauthorized, "access_denied", "not available over funnel")
4848
return
4949
}
5050

0 commit comments

Comments
 (0)