Re: [scim] Queries on SCIM Cursor-based Pagination Draft
Jeremy Palenchar <jeremy@palenchar.net> Wed, 09 February 2022 17:41 UTC
Return-Path: <jeremy@palenchar.net>
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 65CBF3A0AAB for <scim@ietfa.amsl.com>; Wed, 9 Feb 2022 09:41:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.996
X-Spam-Level:
X-Spam-Status: No, score=-1.996 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=palenchar.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Or9WdazcEuuI for <scim@ietfa.amsl.com>; Wed, 9 Feb 2022 09:41:47 -0800 (PST)
Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 53E543A05DC for <scim@ietf.org>; Wed, 9 Feb 2022 09:41:47 -0800 (PST)
Received: by mail-yb1-xb2f.google.com with SMTP id x136so6386730ybe.11 for <scim@ietf.org>; Wed, 09 Feb 2022 09:41:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palenchar.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IoKGyozWDZPixrrnor6VjPW57E0kLdTTvzJuSOXwIWc=; b=Lrz6/N+UTzj82W1PYhfpG7kri+NA649QUbdmSdJWDX91iR1gPYB+JRdhDvWFFgYy4A SF7yyRMu6r/ACLFPG6xinjCmGEVuDsY6y4K60WllnKAhbJT5rOOg27mFW7ZgXg9xIRZf /XAdBW4ZLeW8HHQJZJnaztd1MgC+FMBFi/BXBR8cLMby3ufN1E/vfxwqRVqNeUQOEuMJ /Z1pJeddRDgbyLqHYS314DQ4FiwcuzYWRfjDcDcmOxgIAuCdea1ZByszsegezWWRjfWf Y4A/2h/mZhVhMQ+L0gyjbbspp0301YqkS31DiErgHgV/5bmLed17a67bRR/VALc5vld9 vokw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IoKGyozWDZPixrrnor6VjPW57E0kLdTTvzJuSOXwIWc=; b=qMbYVBCBWn0/GAAQuTNseJ58GCVPo8CoaCUO7XtRbDSpCXN+AZEvRXxzpxf3vt5JQO bOxeIcK5kyZrijv6y8m8VzMIU3xA/zqt5qK72GurWz4YEjhArc2ysrMx+vpFM+UOJ2t+ P2IjImL5YLCMfUQK2ekyOdsvVj+G8e94t0uLG4cBLfLsaSJbZn8KnQTav8phocz0cBfm qO0aQp9Ql/81yUzJGYBIcF6yO0hD+ZTdU4ZLB5Ib6qRHPhKeHsfm0EXB9eXyM85gcJKa rasM7HHQy90aglmKw8HKTmrJFvwu/RO4z1Iev25CZ/7940zucvXAKpxV6aWh3aa0hO63 8Ciw==
X-Gm-Message-State: AOAM5319+Zm2qe8vNadDJ0JYnR6T9T2kFp/N0F0wFYrh8MefwvwESlVL d46+Jun66l4Heff69AHcXMnJYOZujxUI8ZGhTWh7vw==
X-Google-Smtp-Source: ABdhPJwkjtcRbulgZcw+nv4VAqPn6FgtvHj56td16hUetidnBtpzH6D695HedKogVbhM0W9OEFM9GSYHDiBPaeHq7H4=
X-Received: by 2002:a25:6b44:: with SMTP id o4mr3180858ybm.43.1644428506306; Wed, 09 Feb 2022 09:41:46 -0800 (PST)
MIME-Version: 1.0
References: <CA+OkT=9V-+b7nR=MEovu8r620vPwP_2y5Pprv-YW-8QiXGCLKg@mail.gmail.com> <MWHPR19MB095729F6C69FE4D4C0D5ACCDE12D9@MWHPR19MB0957.namprd19.prod.outlook.com> <af56ec62-f73a-2e28-534c-f57db8326bc6@pdmconsulting.net>
In-Reply-To: <af56ec62-f73a-2e28-534c-f57db8326bc6@pdmconsulting.net>
From: Jeremy Palenchar <jeremy@palenchar.net>
Date: Wed, 09 Feb 2022 09:41:35 -0800
Message-ID: <CA+czj5QscbRFE4HMxcX6kj52svE9oMvszx2aJbNoqPGw=uWHsA@mail.gmail.com>
To: Danny Mayer <mayer@pdmconsulting.net>
Cc: "Matt Peterson (mpeterso)" <matt.peterson=40oneidentity.com@dmarc.ietf.org>, Anuradha Karunarathna <anuradha199528@gmail.com>, "scim@ietf.org" <scim@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000fa2ead05d7995871"
Archived-At: <https://mailarchive.ietf.org/arch/msg/scim/NgcgwXf01Eh2u3QxxS99vhblDag>
Subject: Re: [scim] Queries on SCIM Cursor-based Pagination Draft
X-BeenThere: scim@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 09 Feb 2022 17:41:53 -0000
I agree with Danny here. Previous Cursor is interesting in the case of, say, a Facebook history/timeline where a user might find an article and then traverse the history / graph in a forward or reverse direction looking for future OR past events. When interacting with a SCIM server, I can't think of a reason to access the previous page in the cursor. Does anyone have a use case for this that I am missing? -jeremy On Wed, Feb 9, 2022 at 9:31 AM Danny Mayer <mayer@pdmconsulting.net> wrote: > I'm not sure I understand this. Why would you have a previous cursor? In > order to get to a point where you might have a previous cursor you would > already have traversed that data set. I expect that it would be up to the > client to have absorbed that data set and not expect the server to have > remembered that. I can't imagine how you would be able to jump into the > middle of a set of data. Maybe I'm not understanding how you got to this > point. Don't forget too that the data may have changed between requests so > whatever was on that previous data set may have changed. > > Danny > On 2/8/22 11:37 AM, Matt Peterson (mpeterso) wrote: > > Anurada, > > > > Thank you for the feedback on SCIM Cursor-based Pagination Draft. > > > > You asked: “No explanation on backward traversal (traverse to the > previous page result set)” > > > > I agree. The draft could describe more clearly the use of previousCursor > (when supported). Would the following rewording of the cursor query > parameter be clearer? > > > > cursor – To request the next page, pass the nextCursor value from > > the current result page. For the previous page, pass the > > previousCursor from the current result page. The cursor parameter > > SHOULD be omitted for the first request of a paginated query. > > > > > > You asked: “As per the following paragraph in the introduction, is the > cursor-based pagination supported only when all resources are fetched from > the server?” > > > > Not only is filtering an OPTIONAL capability,for service providers, > > it is also a very common for SCIM clients to not to use a query > > filter in order to intentionally to retrieve all resources. > > Therefore, pagination of results (more so than filtering) is a > > primary scalability mechanism for SCIM service providers. > > > > No, cursor-based pagination should be supported for filtered and > unfiltered requests. This paragraph in the introduction was intended to > counter the opinion that high performance pagination would not be needed if > clients would constrain queries with filter. In a future version of this > draft, I would omit this paragraph as there is less controversy on this > point than I originally thought. > > > > -- > > Matt > > > > *From:* scim <scim-bounces@ietf.org> <scim-bounces@ietf.org> *On Behalf > Of * Anuradha Karunarathna > *Sent:* Monday, February 7, 2022 9:24 AM > *To:* scim@ietf.org > *Subject:* [scim] Queries on SCIM Cursor-based Pagination Draft > > > > *CAUTION:* This email originated from outside of the organization. Do not > follow guidance, click links, or open attachments unless you recognize the > sender and know the content is safe. > > > > Hi all, > > > > WSO2 Identity Server(IS) is a SCIM service provider which supports SCIM > 2.0, and SCIM is the main protocol used in identity management in WSO2-IS. > > After seeing performance and functionality improvements that can be > achieved with the cursor-based pagination we are planning to implement the > cursor-based pagination draft [1] in WSO2 IS. While reading the draft spec > we encountered the following concerns. Appreciate your clarification and > input on these points. > > > > 1. > 2. > 3. No explanation on backward traversal (traverse to the previous page > result set) > 4. > > > > · > > · > > · As per the draft, count and cursor are the URL pagination > parameters for cursor-based pagination. > > · (eg: GET /Users?cursor=VZUTiyhEQJ94I&count=10). > > · > > · > > · > > · Also, the definition of the “cursor” attribute is > > · *“**The* > > · *string* > > · * value from the nextCursor **attribute* > > · * from the previous result page. A cursor parameter SHOULD be > omitted for the first request of the paginated query**”* > > · > > · > > · > > · If the SCIM service provider supports previousCursor, what > should be the API request format to > > · traverse back to the previous page? > > · > > o > > o > > o Suggestions: > > o > > 1. > > 2. > > 3. Instead of “cursor” query param, support two query params as > “before” and “after” as similar to > > 4. Facebook API[2] > > 5. > > 6. > > 7. > > 8. Introduce new query param as “cursorDirection” to indicate > whether the client needs the before/next > > 9. set of results from the cursor, and change cursor attribute > definition > > 10. > > 11. > > 12. > > 13. Only if “count” and “cursor” params are supported, add a prefix to > the cursor such as prev_ and > > 14. next_ that can be parsed before sending to the DB layer[3]. > > 15. > > *Get next page results*: GET > /Users?cursor=base64encode<next_cursor1>&count=10 > > *Get previous page results*: GET > /Users?cursor=base64encode<pre_cursor2>&count=10 > > > > 2. > > 3. > > 4. Supporting filtering params and cursor-based pagination params > together in the API request > > 5. > > > > As per the following paragraph in the introduction, is the cursor-based > pagination supported only when all resources are fetched from the server? > > > > “ Not only is filtering an OPTIONAL capability,for service providers, > > it is also a very common for SCIM clients to not to use a query > > filter in order to intentionally to retrieve all resources. > > Therefore, pagination of results (more so than filtering) is a > > primary scalability mechanism for SCIM service providers. > > “ > > > > [1] > https://datatracker.ietf.org/doc/html/draft-peterson-scim-cursor-pagination-00 > <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatatracker.ietf.org%2Fdoc%2Fhtml%2Fdraft-peterson-scim-cursor-pagination-00&data=04%7C01%7Cmatt.peterson%40quest.com%7Cb71a260276744b4a0b2908d9ea564b70%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637798478629490490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=UkfdM6WJPc5kO%2FYXW8XEAOMK%2BJo7Yu6Tz84JLWYbTKM%3D&reserved=0> > > > [2] https://developers.facebook.com/docs/graph-api/results > <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fgraph-api%2Fresults&data=04%7C01%7Cmatt.peterson%40quest.com%7Cb71a260276744b4a0b2908d9ea564b70%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637798478629490490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=w8VD1YVMi3ZY9ugyo2OwqTILNfcYnR7GPc39oQj5ogo%3D&reserved=0> > > [3] > https://medium.com/swlh/how-to-implement-cursor-pagination-like-a-pro-513140b65f32 > <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmedium.com%2Fswlh%2Fhow-to-implement-cursor-pagination-like-a-pro-513140b65f32&data=04%7C01%7Cmatt.peterson%40quest.com%7Cb71a260276744b4a0b2908d9ea564b70%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637798478629490490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=P%2B8mICK6yoZpnWCcgIB%2FwtSN1ntI%2B8%2Ba64YRi4baVYQ%3D&reserved=0> > > > > Regards, > > Anuradha > > _______________________________________________ > scim mailing listscim@ietf.orghttps://www.ietf.org/mailman/listinfo/scim > > _______________________________________________ > scim mailing list > scim@ietf.org > https://www.ietf.org/mailman/listinfo/scim >
- [scim] Queries on SCIM Cursor-based Pagination Dr… Anuradha Karunarathna
- Re: [scim] Queries on SCIM Cursor-based Paginatio… Matt Peterson (mpeterso)
- Re: [scim] Queries on SCIM Cursor-based Paginatio… Danny Mayer
- Re: [scim] Queries on SCIM Cursor-based Paginatio… Jeremy Palenchar
- Re: [scim] Queries on SCIM Cursor-based Paginatio… Matt Peterson (mpeterso)
- Re: [scim] Queries on SCIM Cursor-based Paginatio… Anuradha Karunarathna