diff --git a/server/api.go b/server/api.go index e629ac01..724c4807 100644 --- a/server/api.go +++ b/server/api.go @@ -7,7 +7,6 @@ import ( "fmt" "log/slog" "strconv" - "strings" "golang.org/x/crypto/bcrypt" @@ -440,10 +439,6 @@ func (d dexAPI) CreateConnector(ctx context.Context, req *api.CreateConnectorReq return nil, errors.New("no id supplied") } - if strings.HasPrefix(req.Connector.Id, "__") { - return nil, fmt.Errorf("connector ID %q is invalid: IDs starting with \"__\" are reserved for internal use", req.Connector.Id) - } - if req.Connector.Type == "" { return nil, errors.New("no type supplied") } diff --git a/server/api_test.go b/server/api_test.go index 08ba0831..5ddbcc4a 100644 --- a/server/api_test.go +++ b/server/api_test.go @@ -536,21 +536,6 @@ func TestCreateConnector(t *testing.T) { } else if !strings.Contains(err.Error(), "invalid config supplied") { t.Fatalf("Unexpected error: %v", err) } - - // Test reserved connector ID (__ prefix) - reservedReq := api.CreateConnectorReq{ - Connector: &api.Connector{ - Id: "__client_credentials", - Name: "Reserved", - Type: "TestType", - Config: []byte(`{"key": "value"}`), - }, - } - if _, err := client.CreateConnector(ctx, &reservedReq); err == nil { - t.Fatal("Expected an error for reserved connector ID, but none occurred") - } else if !strings.Contains(err.Error(), "reserved for internal use") { - t.Fatalf("Unexpected error: %v", err) - } } func TestUpdateConnector(t *testing.T) {