[scim] Concerns Regarding Cursor-Based Pagination

"Bojitha Piyathilake (intern)" <bojitha@wso2.com> Mon, 30 May 2022 05:32 UTC

Return-Path: <bojitha@wso2.com>
X-Original-To: scim@ietfa.amsl.com
Delivered-To: scim@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B97B3C14F735 for <scim@ietfa.amsl.com>; Sun, 29 May 2022 22:32:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.623
X-Spam-Level:
X-Spam-Status: No, score=0.623 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_KAM_HTML_FONT_INVALID=0.01, T_REMOTE_IMAGE=0.01, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=wso2.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iMX8njv1F3z0 for <scim@ietfa.amsl.com>; Sun, 29 May 2022 22:32:01 -0700 (PDT)
Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6F43EC14F725 for <scim@ietf.org>; Sun, 29 May 2022 22:32:01 -0700 (PDT)
Received: by mail-vs1-xe35.google.com with SMTP id z6so9855314vsp.0 for <scim@ietf.org>; Sun, 29 May 2022 22:32:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wso2.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=TnDrQXMho0h12U8jmMOMwqiOiiZLiLzPRCAEU6mwIX0=; b=euE07pRi+ebfQMO0XTh8tJ2mys8Mm4/3z7ZM5YPlfxyfcZAYEzqVkTFBGfYfRyoCUh O2Dt0mQ/0IMb1XmveEZmMngS3nWwhLcXMBqvnVKxGB7ymhiZryWpv2K3dKsRZ45AuZZG 6Ze66FxX3yNHYqnFs0h8plh62vv7PLX4S7A+4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TnDrQXMho0h12U8jmMOMwqiOiiZLiLzPRCAEU6mwIX0=; b=SqJcmzjTaajEWrapVaZcBmA/CD/IWeFjjpJ6qQRoMw1tRuB4ol9FjdPExfV08XbCr2 n4MZURIs5vFFVA967/Islg+w+K79kSxBycogVvmqJV53UuE6zvzCdpMQNTeordux0gha WEreT2B3LCjqhEEnUpFgXUVE5Ar93B28XNhQb4MTyHLkVRyLwo4iUJyAnkbaKG4LlYSL uAx99Kh4cBJUh6cPWZzs23CuahWnqmfituNlUKWr4j8x1K3+nOw/o7jyLtlMBtIL6kGK DryNDHGpOcTLVAHuugQBWRUtcRpUySuqWWKZBvdLjUFcUQkvI4p+KTpI6m0Z5DZvUb+n H/vQ==
X-Gm-Message-State: AOAM530ZIPKS98Xvu5ILVvxNtih960IZNJSy7MhmT4PxeP8rzvw4AAej GiZFvBV9XyldA1hbwpfuHSRKpS+jx8Mp9XPaYCY89nzbEIVydw==
X-Google-Smtp-Source: ABdhPJyqCvMBDQ4etRYRUfc+8XSLiHlSWQsdQi+iFvE+tPrIcczGpsiLub9haLJIC0uWrGjuFsh30cl7W4wBG/dHfOo=
X-Received: by 2002:a67:b805:0:b0:341:d950:d94b with SMTP id i5-20020a67b805000000b00341d950d94bmr2340862vsf.59.1653888719970; Sun, 29 May 2022 22:31:59 -0700 (PDT)
MIME-Version: 1.0
From: "Bojitha Piyathilake (intern)" <bojitha@wso2.com>
Date: Mon, 30 May 2022 11:02:27 +0530
Message-ID: <CAKphzcCDyGjXuqjuQY-4KtTjDGL+nYxN6zDnZW0zSM0Y+qQGmA@mail.gmail.com>
To: scim@ietf.org
Content-Type: multipart/alternative; boundary="000000000000a7187205e033f9f3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/91BlQbDz1JqHJXjAd-EPa-Ptlgw>
Subject: [scim] Concerns Regarding Cursor-Based Pagination
X-BeenThere: scim@ietf.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: Simple Cloud Identity Management BOF <scim.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/scim>, <mailto:scim-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/scim/>
List-Post: <mailto:scim@ietf.org>
List-Help: <mailto:scim-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/scim>, <mailto:scim-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 30 May 2022 05:32:05 -0000

Hi all,

I am in the process of implementing cursor based pagination for WSO2
Identity Server, which is a SCIM service provider that supports SCIM 2.0. I
have encountered a few concerns and would appreciate any feedback.

Question 1

In the Cursor-based Pagination of SCIM Resources draft
<https://datatracker.ietf.org/doc/html/draft-peterson-scim-cursor-pagination-00#section-2>
[1], it hasn’t been mentioned how to handle an unspecified count. Am I
right to assume this can follow the same, as per RFC - 7644
<https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.4> [2] which
states, “If unspecified, the maximum number of results is set by the
service provider”?

Question 2

In a situation where we wish to provide both cursor based pagination and
index based pagination in the same SCIM service provider, how would you
suggest the user decide the pagination approach? RFC - 7644
<https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.4> [2], states
that both the startIndex value and the count are optional parameters when
making the first offset based request. startIndex will be defaulted to 1
and the count will be defaulted to the value specified by the service
provider. Furthermore, Cursor-based Pagination of SCIM Resources draft
<https://datatracker.ietf.org/doc/html/draft-peterson-scim-cursor-pagination-00#section-2>
[1], states that the cursor value of the initial request should be omitted.

eg:

Possible first request for offset pagination: /scim2/Users?count=20 ->
Offset will be defaulted to 1.

Possible first request for cursor pagination: /scim2/Users?count=20 ->
Initial cursor is omitted.

The SCIM service provider fails to distinguish the pagination mechanism
that the user wants for these requests.

Question 3

When querying for resources using a POST request combined with the
"/.search" path extension, the query params will be contained in the
request body. How should the cursor attribute be passed? This point is not
mentioned in the Cursor-based Pagination of SCIM Resources draft
<https://datatracker.ietf.org/doc/html/draft-peterson-scim-cursor-pagination-00#section-2>
[1]

{

  "schemas": [

    "urn:ietf:params:scim:api:messages:2.0:SearchRequest"

  ],

  "filter": "userName sw A",

  "domain": "PRIMARY",

  "count": 10,

  "cursor": "eyJ2YWx1ZSI6IlNDSU0yQ1"

}


[1]
https://datatracker.ietf.org/doc/html/draft-peterson-scim-cursor-pagination-00#section-2

[2] https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.4


-- 
*Bojitha Piyathilake* | Software Engineering Intern | WSO2 Inc.
(m) +94771715600 | (e) bojitha@wso2.com

<http://wso2.com/signature>
[image: http://wso2.com/signature]
<http://wso2.com/signature>