<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.5.6 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc ipr="trust200902" docName="draft-zollner-scim-roles-entitlements-extension-01" category="info">

  <front>
    <title abbrev="SCIM Roles and Entitlements Extension">SCIM Roles and Entitlements Extension</title>

    <author initials="D." surname="Zollner" fullname="Danny Zollner">
      <organization>Microsoft</organization>
      <address>
        <email>danny@zollnerd.com</email>
      </address>
    </author>

    <date year="2022" month="July" day="27"/>

    <area>TODO</area>
    <workgroup>SCIM</workgroup>
    <keyword>Internet-Draft</keyword> <keyword>SCIM</keyword>

    <abstract>


<t>The System for Cross-domain Identity Management (SCIM) protocol's schema RFC <eref target="https://datatracker.ietf.org/doc/html/rfc7643">RFC7643</eref> defines the complex core schema attributes "roles" and "entitlements". For both of these concepts, frequently only a predetermined set of values are accepted by a SCIM service provider. The values that are accepted may vary per customer or tenant based on customizable configuration in the service provider's application or based on other criteria such as what services have been purchased. This document defines an extension to the SCIM 2.0 standard to allow SCIM service providers to represent available data pertaining to roles and entitlements so that SCIM clients can consume this information and provide easier management of role and entitlement assignments.</t>



    </abstract>


  </front>

  <middle>


<section anchor="introduction"><name>Introduction</name>

<t>The System for Cross-domain Identity Management (SCIM) protocol's schema RFC <eref target="https://datatracker.ietf.org/doc/html/rfc7643">RFC7643</eref> defines the complex core schema attributes "roles" and "entitlements". For both of these concepts, frequently only a predetermined set of values are accepted by a SCIM service provider. Available roles and entitlements may change based on a variety of factors, such as what features are enabled or what customizations have been made in a specific instance of a multi-tenant application. The core SCIM 2.0 RFC documents (RFC7642, RFC7643 and RFC 7644) do not provide a method for retrieving the available roles or entitlements as part of the SCIM 2.0 standard.</t>

<t>In order to allow for SCIM clients to avoid easily predictable errors when interacting with SCIM service providers, this document aims to provide a method for SCIM service providers to provide data on what roles and/or entitlements are available so that SCIM clients can consume this data to more efficiently manage resources between directories.</t>

</section>
<section anchor="conventions-and-definitions"><name>Conventions and Definitions</name>

<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL</bcp14>
NOT", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

</section>
<section anchor="iana-considerations"><name>IANA Considerations</name>

<t>This document has no IANA actions.</t>

</section>
<section anchor="roles-and-entitlements"><name>Roles and Entitlements</name>

<t>The Roles and Entitlements SCIM Extension consists of two new resource types, /Roles and /Entitlements, as well as accompanying ServiceProviderConfig details to advertise support for this extension.</t>

<section anchor="serviceproviderconfig-extension"><name>ServiceProviderConfig Extension</name>
<t>SCIM endpoints that have implemented one or both of the endpoints from this extension <bcp14>MUST</bcp14> advertise which elements are implemented in the ServiceProviderConfig endpoint as defined:</t>

<figure><artwork><![CDATA[
RolesAndEntitlements
    A complex type that specifies Roles and Entitlements extension
    configuration options. REQUIRED.

    roles
        A complex type that specifies configuration options
        related to the Roles resource type. REQUIRED.

        enabled
            A boolean type that indicates if the SCIM service
            provider supports the /Roles endpoint defined
            in this extension. REQUIRED.

        multipleRolesSupported
            A boolean type that indicates if the SCIM service
            provider supports multiple values for the "roles"
            attribute on the User resource. REQUIRED.

        primarySupported
            A boolean type that indicates if the SCIM service
            provider supports the "primary" sub-attribute for
            the "roles" attribute on the User resource. REQUIRED.

        typeSupported
            A boolean type that indicates if the SCIM service
            provider supports the "type" sub-attribute for
            the "roles" attribute on the User resource. REQUIRED.

    entitlements
        A complex type that specifies configuration options
        related to the Entitlements resource type. REQUIRED.

        enabled
            A boolean type that indicates if the SCIM service
            provider supports the /Entitlements endpoint defined
            in this extension. REQUIRED.

        multipleEntitlementsSupported
            A boolean type that indicates if the SCIM service
            provider supports multiple values for the 
            "entitlements" attribute on the User resource.
            REQUIRED.

        primarySupported
            A boolean type that indicates if the SCIM service
            provider supports the "primary" sub-attribute for
            the "entitlements" attribute on the User resource. 
            REQUIRED.

        typeSupported
            A boolean type that indicates if the SCIM service
            provider supports the "type" sub-attribute for
            the "entitlements" attribute on the User resource. 
            REQUIRED.
]]></artwork></figure>

</section>
<section anchor="roles-resource-schema"><name>Roles Resource Schema</name>

<t>The /Roles resource type has a schema consisting of most of the attributes defined for the User resource's complex attribute "roles" in <eref target="https://datatracker.ietf.org/doc/html/rfc7643">RFC7643</eref>, as well as an additional "Enabled" attribute so that SCIM service providers can indicate if the role is currently enabled and intended for use in their service.</t>

<t>The following singular attributes are defined:</t>

<figure><artwork><![CDATA[
value
    The value of a role. REQUIRED.

display
    A human-readable name, primarily used for display purposes. 
    OPTIONAL.

type
    A label indicating the role's function. OPTIONAL

enabled
    A boolean type that indicates if the role is enabled and usable
    in the SCIM service provider's system. REQUIRED.
]]></artwork></figure>

</section>
<section anchor="entitlements-resource-schema"><name>Entitlements Resource Schema</name>

<t>The /Entitlements resource type has a schema consisting of most of the attributes defined for the User resource's complex attribute "entitlements" in <eref target="https://datatracker.ietf.org/doc/html/rfc7643">RFC7643</eref>, as well as an additional "Enabled" attribute so that SCIM service providers can indicate if the entitlement is currently enabled and intended for use in their service.</t>

<t>The following singular attributes are defined:</t>

<figure><artwork><![CDATA[
value
    The value of an entitlement. REQUIRED.

display
    A human-readable name, primarily used for display purposes. 
    OPTIONAL.

type
    A label indicating the entitlement's function. OPTIONAL.

enabled
    A boolean type that indicates if the entitlement is enabled
    and usable in the SCIM service provider's system. REQUIRED.
]]></artwork></figure>

</section>
<section anchor="sample-requests"><name>Sample Requests</name>

<section anchor="retrieving-all-roles"><name>Retrieving all roles</name>

<section anchor="request"><name>Request</name>
<figure><artwork><![CDATA[
GET /Roles
Host: example.com
Accept: application/scim+json
Authorization: Bearer 123456abcd
]]></artwork></figure>

</section>
<section anchor="response"><name>Response</name>

<figure><artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/scim+json

{
    "schemas":["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
    "totalResults":3",
    "itemsPerPage":100,
    "startIndex":1,
    "Resources":[
        {
            "value":"admin"
            "display":"Administrator"
            "enabled":True
        },
        {
            "value":"user"
            "display":"User"
            "enabled":True
        },
        {
            "value":"teamlead"
            "display":"Team Leader"
            "enabled":True
        }
    ]
}
]]></artwork></figure>

</section>
</section>
<section anchor="retrieving-all-entitlements"><name>Retrieving all entitlements</name>

<section anchor="request-1"><name>Request</name>
<figure><artwork><![CDATA[
GET /Entitlements
Host: example.com
Accept: application/scim+json
Authorization: Bearer 123456abcd
]]></artwork></figure>

</section>
<section anchor="response-1"><name>Response</name>

<figure><artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/scim+json

{
    "schemas":["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
    "totalResults":4",
    "itemsPerPage":100,
    "startIndex":1,
    "Resources":[
        {
            "value":"1"
            "display":"Printing"
            "enabled":True
        },
        {
            "value":"2"
            "display":"Scanning"
            "enabled":True
        },
        {
            "value":"3"
            "display":"Copying"
            "enabled":True
        },
        {
            "value":"4"
            "display":"Collating"
        }
    ]
}
]]></artwork></figure>

</section>
</section>
</section>
</section>
<section anchor="roles-schema-bnf"><name>Roles Schema BNF</name>

<figure><artwork><![CDATA[
[
    {
        "id" : "urn:ietf:params:scim:schemas:2.0:Roles",
        "name" : "Role",
        "description" : "Roles available for use with the User 
        resource's 'roles' attribute",
        "attributes" : [
            {
                "name" : "value",
                "type" : "string",
                "multiValued" : false,
                "description" : "The value of a role",
                "required" : true,
                "caseExact" : false,
                "mutability" : "readOnly",
                "returned" : "default",
                "uniqueness" : "server"
            },
            {
                "name" : "display",
                "type" : "string",
                "multiValued" : false,
                "description" : "A human-readable name, primarily 
                used for display purposes.",
                "required" : false,
                "caseExact" : false,
                "mutability" : "readOnly",
                "returned" : "default",
                "uniqueness" : "server"
            },
            {
                "name" : "type",
                "type" : "string",
                "multiValued" : false,
                "description" : "A label indicating the role's 
                function.",
                "required" : false,
                "caseExact" : false,
                "mutability" : "readOnly",
                "returned" : "default",
                "uniqueness" : "server"
            },
            {
                "name" : "enabled",
                "type" : "boolean",
                "multiValued" : false,
                "description" : "A boolean type that indicates if the
                role is enabled and usable in the SCIM service
                provider's system.",
                "required" : true,
                "caseExact" : false, 
                "mutability" : "readOnly",
                "returned" : "default"
            }
        ]
    }
]
]]></artwork></figure>

</section>
<section anchor="entitlements-schema-bnf"><name>Entitlements Schema BNF</name>

<figure><artwork><![CDATA[
[
    {
        "id" : "urn:ietf:params:scim:schemas:2.0:Entitlements",
        "name" : "Entitlement",
        "description" : "Entitlements available for use with the User 
        resource's 'entitlements' attribute",
        "attributes" : [
            {
                "name" : "value",
                "type" : "string",
                "multiValued" : false,
                "description" : "The value of an entitlement",
                "required" : true,
                "caseExact" : false,
                "mutability" : "readOnly",
                "returned" : "default",
                "uniqueness" : "server"
            },
            {
                "name" : "display",
                "type" : "string",
                "multiValued" : false,
                "description" : "A human-readable name, primarily 
                used for display purposes.",
                "required" : false,
                "caseExact" : false,
                "mutability" : "readOnly",
                "returned" : "default",
                "uniqueness" : "server"
            },
            {
                "name" : "type",
                "type" : "string",
                "multiValued" : false,
                "description" : "A label indicating the role's 
                function.",
                "required" : false,
                "caseExact" : false,
                "mutability" : "readOnly",
                "returned" : "default",
                "uniqueness" : "server"
            },
            {
                "name" : "enabled",
                "type" : "boolean",
                "multiValued" : false,
                "description" : "A boolean type that indicates if the
                role is enabled and usable in the SCIM service
                provider's system.",
                "required" : true,
                "caseExact" : false, 
                "mutability" : "readOnly",
                "returned" : "default"
            }
        ]
    }
]

]]></artwork></figure>

</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference anchor='RFC2119' target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author fullname='S. Bradner' initials='S.' surname='Bradner'><organization/></author>
<date month='March' year='1997'/>
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference anchor='RFC8174' target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author fullname='B. Leiba' initials='B.' surname='Leiba'><organization/></author>
<date month='May' year='2017'/>
<abstract><t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='8174'/>
<seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>




    </references>



<section numbered="false" anchor="acknowledgments"><name>Acknowledgments</name>

<t>TODO acknowledge.</t>

</section>


  </back>

<!-- ##markdown-source:
H4sIABur4WIAA+1a227cuBm+H2DegVUukm0940Pc3a7QFp3YTmPUjt3YKbAN
jAVH4ni4kUSFpOzMBsmz9Fn6ZP1+UscZTZJNvG42sC9siYf/+P0HUh6NRsOB
lTYRIQvO9g6P2TOVCMN4FrODzE2kIrOGHby2IjNSZcFwwKdTLa5+wYZYRRlP
wSLWfGZHP6skyYQemUimI03bR6K1dSSqraOt7eEg4lZcKr0ImcxmajgYDmSu
Q2Z1YezO1tb3WzuQSAsesvOT/ZPh4Frpl5daFXnISL7h4KVYYCwO2YvDzAqd
CTvaJzk23PwFUTQW8v/IE5VByI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