<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc4511 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4511.xml">
<!ENTITY rfc4533 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4533.xml">
<!ENTITY rfc5805 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5805.xml">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>

<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc autobreaks="yes"?>
<?rfc docmapping="yes"?>

<rfc category="std" docName="draft-spacek-ldapext-syncrepl-transaction-01"
      ipr="trust200902">
  <front>
    <title abbrev="LDAP Content Synchronization &amp; Transactions">
			The Lightweight Directory Access Protocol (LDAP)
			Content Synchronization Operation
			with Transactions
		</title>

    <author fullname="Petr Spacek" initials="P." surname="Spacek">
      <organization>Red Hat, Inc.</organization>
      <address><email>pspacek@redhat.com</email></address>
    </author>

    <date month="November" year="2015" />

    <area>Applications Area</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <abstract>
			<t>This document specifies LDAP Control which extends the persist stage of the
				Content Synchronization Operation with information about LDAP
				transaction boundaries. This information can be used to support
				application-level transactions or for application-level optimizations.
			</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
			<t><xref target="RFC4533">The LDAP Content Synchronization Operation</xref>
				and <xref target="RFC5805">LDAP Transactions</xref>
				are not integrated, which makes the Content Synchronization Operation less
				useful.</t>

			<t>The client using the Content Synchronization Operation has no information
				of which changes were part of a single transaction. As a result,
				the client cannot replicate transaction semantics reliably, especially
				when a connection to an LDAP server is interrupted in the middle of
				the persist stage of the Content Synchronization Operation.</t>

			<t>Some clients could use the information where an LDAP transaction
				started and ended for transactions at application level to guarantee
				consistency of application data. Altenatively, some applications can
				use transaction boundaries for optimizations when further processing
				of the data is triggered by the end of a transaction. This might allow
				the application to save some overhead by processing changes in groups.
			</t>

		</section>

    <section title="Document Conventions">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
				target="RFC2119"/>.</t>

			<t>Term "transaction identifier" has the same definition as in
				<xref target="RFC5805"/>.
			</t>
    </section>

		<section
			title="Elements of the LDAP Content Synchronization with Transactions">
			<t>Existing protocol messages and semantics defined by
				<xref target="RFC4533"/> are not changed. The protocol flow is only
				extended with	Transaction Notification Control, Start, and
				End	Transaction Notification Messages.</t>

			<section title="Transaction Notification Control">
				<t>The Transaction Notification Control is an LDAPControl
					<xref target="RFC4511"/>
					where the controlType is "TBD1"
					and the controlValue is absent.
					The criticality may be TRUE or FALSE.</t>
			</section>

			<section title="Start Transaction Notification Message">
				<t>The Start Transaction Notification message is an
					IntermediateResponse <xref target="RFC4511"/>
					where the responseName is "TBD2"
					and the responseValue is absent.
				</t>
			</section>

			<section title="End Transaction Notification Message">
				<t>The End Transaction Notification message is an
					IntermediateResponse <xref target="RFC4511"/>
					where the responseName is "TBD3"
					and the responseValue is absent.
				</t>
			</section>
		</section>


		<section title="Interaction with the Content Synchronization Operation">
			<t>The client requests information about LDAP Transaction to be added
				to the Content Synchronization Operation by sending
				Transaction Notification Control along with a SearchRequest Message
				that contains a Sync Request Control <xref target="RFC4533"/>.
				All attempts to use Transaction Notification Control without
				Sync Request Control MUST be denied with the unwillingToPerform
				<xref target="RFC4511"/> result code.
			</t>

			<t>TODO: THIS SHOULD BE CLARIFIED BY FURTHER UPDATES TO TRANSACTION RFCs</t>
			<t>Please note that <xref target="RFC5805"/> defined that LDAP
				Transactions have atomic, consistency, isolation, durability (ACID)
				properties without further specification of the "isolation" level.
				This extension assumes that an isolation property guarantees that
				uncommited changes are generaly not visible to LDAP clients and thus
				not returned in the Content Synchronization Operation results.</t>

			<section title="Refresh stage">
				<t>The refresh stage of the Content Synchronization Operation
					is unaffected by Transaction Notification Control. The control affects neither Content Determination nor protocol messages sent
					during the refresh stage.</t>

				<t>Transaction-aware clients MUST treat the refresh stage as a single
					transaction. Messages that mark end of the refresh stage are defined
					in <xref target="RFC4533"/>.</t>
			</section>

			<section title="Persist stage">
				<t>Existing protocol messages and semantics defined by
					<xref target="RFC4533"/> are not changed. The protocol flow
					in the persist stage is extended only with
					Start and End Transaction Notification Messages.</t>

				<t>A Start Transaction Notification Message MUST be sent to a client when
					a transaction is successfully commited but before any of the changes
					contained in the transaction are sent to the client.</t>

				<t>The Start Transaction Notification Message MUST be followed by
					all Change notification messages as defined in the persist stage of
					<xref target="RFC4533"/>. A server MUST NOT interleave changes made in
					multiple transactions to ensure that Start and End messages
					unambiguously identify one transaction.</t>

				<t>An End Transaction Notification Message MUST be sent immediatelly after all
					Change notifications for given transaction were sent to the client.
					This message signalizes to the client that the transaction marked
					by the Start Transaction Notification Message is complete
					and all changes can be commited.</t>
			</section>
		</section>

    <section title="IANA Considerations">
			<t>TBD</t>
    </section>

    <section title="Security Considerations">
			<t>This document merely adds information about transaction boundaries
				to the existing Content Synchronization Operation.
				This is believed not to add any security risk.</t>
    </section>

  </middle>

  <back>
<?rfc rfcedstyle="no"?>
    <references title="Normative References">
      &rfc2119;
      &rfc4511;
      &rfc4533;
      &rfc5805;
    </references>
  </back>
</rfc>

