<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>

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

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

<rfc ipr="trust200902" docName="draft-zollner-scim-domain-extension-00" category="info">

  <front>
    <title abbrev="SCIM Verified Domains Extension">SCIM Verified Domains Extension</title>

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

    <date year="2021" month="October" day="22"/>

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

    <abstract>


<t>The System for Cross-domain Identity Management (SCIM) protocol supports creation and management of identity resources such as users between a client and a service provider. In some instances, a SCIM service provider may maintain a list of DNS domains that an organization using that service has registered for their exclusive use with the service. This registration of domains is frequently tied to some form of ownership verification for each domain. This document defines an extension to the SCIM protocol introducing a new 'VerifiedDomains' resource type in order to allow a SCIM client to confirm what domains have had ownership verified by the SCIM service provider, as well as some information about whether the User resource's userName and emails attributes require domain verification in order for a value to possess that domain suffix.</t>



    </abstract>


  </front>

  <middle>


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

<t>The System for Cross-domain identity Management (SCIM) protocol <eref target="https://datatracker.ietf.org/doc/html/rfc7644">RFC7644</eref> supports creation, modification, and deletion of core identity resources. To allow for efficient interactions between SCIM clients and multi-customer SCIM service providers such as SaaS applications, the client may wish to avoid sending creation or update requests that are already known to contain attribute values that will be rejected by the SCIM service provider.</t>

<t>A common source of creation and update failures when interacting with SCIM service providers for SaaS applications is when the SCIM client attempts to create or update the userName(adhering to <eref target="https://datatracker.ietf.org/doc/html/rfc5321">RFC5321</eref> format) or emails attribute on a user and the SCIM client provides a value with a domain suffix that is not verified in the customer's tenant in the service represented by the SCIM service provider.</t>

<t>This document defines a simple extension to the SCIM protocol and core schema that adds support for a "VerifiedDomains" resource type that can be queried to retrieve a list of verified domains in the SCIM service provider's environment so that a SCIM client can utilize this information to apply additional logic and avoid sending requests that will fail.</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="definitions"><name>Definitions</name>

<t>Domain: At least a Second Level Domain (SLD) and a Top Level Domain(TLD) registered with public DNS registrars and ICANN. Further expansion to Third Level Domains (aka subdomains) are also permitted.</t>

</section>
<section anchor="verified-domains"><name>Verified Domains</name>

<t>A SCIM endpoint supporting the Domains extension <bcp14>MUST</bcp14> implement a /VerifiedDomains resource as outlined in this document. This extension is written with only the HTTP/REST GET method required, as the data provided by the SCIM service provider is intended to be read-only. POST, PUT, PATCH and DELETE requests to the /VerifiedDomains resource <bcp14>MUST</bcp14> result in a HTTP Bad Request (400).</t>

<section anchor="serviceproviderconfig-extension"><name>ServiceProviderConfig Extension</name>

<t>SCIM endpoints that support the Verified Domains extension <bcp14>MUST</bcp14> advertise this support in the ServiceProviderConfig endpoint as defined:</t>

<figure><artwork><![CDATA[
verifiedDomains
    A complex type that specifies Verified Domains configuration 
    options. REQUIRED.

    supported
        A boolean type that specifies if the Verified 
        Domains extension is supported.

    userNameProperties
        A complex type that specifies if the expected value for 
        userName follows the RFC5321 format, and if accepted 
        values following RFC5321 require a verified domain suffix.

    emailsVerifiedDomainRequired
        A boolean type that specifies if accepted values for 
        emails require a verified domain suffix. 
]]></artwork></figure>

</section>
<section anchor="verifieddomains-schema-extension"><name>VerifiedDomains Schema Extension</name>

<t>Any SCIM service provider that supports the Verified Domains extension <bcp14>MUST</bcp14> implement the VerifiedDomains resource type with the urn:ietf:params:scim:schemas:2.0:VerifiedDomain schema defined in this section:</t>

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

<figure><artwork><![CDATA[
domainName
    A string attribute containing at least the Second Level Domain 
    (SLD) and Top Level Domain (TLD) of a domain verified in the 
    SCIM service provider's system. Subdomains (Third Level 
    Domains and below) are supported as well. REQUIRED.

allowSubdomains
    A boolean attribute set to true for any verified domain 
    resource that should be interpreted by the client to 
    include all subdomains. REQUIRED.

verifiedDate
    A dateTime attribute indicating the date and time at which the
    domain resource was verified in the SCIM service provider's 
    system. OPTIONAL.
]]></artwork></figure>

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

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

<section anchor="request"><name>Request</name>
<figure><artwork><![CDATA[
GET /VerifiedDomains
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":2",
    "itemsPerPage":100,
    "startIndex":1,
    "Resources":[
        {
        "id":"1",
        "domainName":"contoso.com",
        "allowSubdomains":true,
        },
        {
        "id":"2",
        "domainName":"fabrikam.com",
        "allowSubdomains":true
        }
    ]
}
]]></artwork></figure>

</section>
</section>
<section anchor="querying-verified-domains-by-domainname-value"><name>Querying verified domains by domainName value</name>

<section anchor="request-1"><name>Request</name>

<figure><artwork><![CDATA[
GET /VerifiedDomains?filter=domainName contains "contoso.com"
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":1",
    "itemsPerPage":100,
    "startIndex":1,
    "Resources":[
        {
        "id":"1",
        "domainName":"contoso.com",
        "allowSubdomains":true
        }
    ]
}

]]></artwork></figure>

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

<figure><artwork><![CDATA[
[ 
    { 
        "id" : "urn:ietf:params:scim:schemas:2.0:VerifiedDomain",
        "name" : "Domain",
        "description" : "DNS Domains",
        "attributes" : [
            {
            "name" : "domainName"
            "type" : "string"
            "multiValued" : false
            "description" : "Value for a domain name registered and 
            optionally verified in the SCIM service provider. The 
            value should represent a DNS domain name such as 
            'contoso.com' and optionally may contain 
            one or more subdomain levels such as 'scim.contoso.com'. 
            REQUIRED.",
            "required" : true,
            "caseExact" : false,
            "mutability" : "readOnly",
            "returned" : "default",
            "uniqueness" : "server"
            },
            {
            "name" : "allowSubdomains",
            "type" : "boolean",
            "multiValued" : false,
            "description" : "A Boolean value indicating if subdomains 
            below the domain specified in domainName should be 
            treated identically to the value provided in domainName. 
            OPTIONAL",
            "required" : true,
            "mutability" : "readOnly",
            "returned" : "default"
            },
            {
            "name" : "verifiedDate",
            "type" : "dateTime",
            "multiValued" : false,
            "description" : "An optional dateTime value indicating 
            the time at which the domain specified in domainName 
            was verified. OPTIONAL",
            "required" : false
            "mutability" : "readOnly",
            "returned" : "default"
            }
        ]
        "meta" : { 
        "resourceType" : "Schema",
        "location" :
        "/v2/Schemas/urn:ietf:params:scim:schemas:2.0:VerifiedDomain"
        }
    }
]
]]></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>


</rfc>

