'What should be the contents of OSI CCR atomic action identifier?
X/Open XA specification defines a transaction identifier for both recognizing transaction ID and making them unique.
One of the recommendation is to use OSI CCR atomic action identifier for this purpose.
The atomic action identifier is defined, according to X/Open spec, by ISO/IEC 9804.3 (1989). That ISO spec doesn't seem to be around anymore, ISO's own website won't even find it.
I found ITU X.852 that seems to define atomic action identifiers, but doesn't go into any detail what the contents should be (besides being unique).
So far, my web crawling really seems to be a dead end, so I was wondering if anybody had any information on what are the OSI CCR contents supposed to be, or whether I'm better off coming up with my own format ID, and generating some reasonable transaction IDs that make sense for my application.
Solution 1:[1]
I was searching for the same topic and the best information I found was in "ACSE/Presentation: Transaction Processing API (XAP-TP)"
1.3.19 Atomic Action Identifiers
OSI TP uses CCR Atomic Action Identifiers (AAIds) to identify uniquely a provider-supported distributed transaction. The AAId applies to the entire transaction tree. So, each transaction branch of the tree has the same AAId. The AAId is formed from the Application Entity Title (AET) of the originator of the transaction and a suffix unique within the scope of the AET.
Note: The AAId must be globally unique.
As far as I understand it says that OSI-CCR identifier has a prefix (unique among applications) and a suffix (some kind of counter/id). I don't think the original document goes into more details.
I'm using an algorithm based on Twitter's Snowflake (https://github.com/twitter-archive/snowflake/tree/b3f6a3c6ca8e1b6847baa6ff42bf72201e2c2231) that gives me a unique 64bit number.
Solution 2:[2]
For anyone coming across this in the future, the answer is entirely given within public standards. X.852 gives the following ASN.1 definition
CCR { joint-iso-itu-t ccr(7) module(1) ccr-apdus1(1) version3(3) }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
EXPORTS ... ;
IMPORTS
AE-title
FROM ACSE-1 { joint-iso-itu-t association-control(2) module(2) apdus(1) version1(1) };
-- ASN.1 module defined in ITU-T Rec. X.227 | ISO/IEC 8650-1
ATOMIC-ACTION-IDENTIFIER ::= SEQUENCE
{
owners-name CHOICE {
name [0] EXPLICIT AE-title,
side [1] ENUMERATED
{ sender(0), receiver(1), ... },
... },
atomic-action-suffix CHOICE {
form1 [2] OCTET STRING,
form2 [3] INTEGER,
... }
}
side is shorthand and basically means "use the AE-Title belonging to the specified end of the connection, as we already exchanged"
AE-Title is imported from X.227
ACSE-1 { joint-iso-itu-t association-control(2) modules(0) apdus(0) version1(1) }
-- ACSE-1 refers to ACSE version 1
DEFINITIONS ::=
BEGIN
v
-- The data types Name and RelativeDistinguishedName are imported from ISO/IEC9594-2.
-- object identifier assignments.
IMPORTS Name, RelativeDistinguishedName
FROM InformationFramework { joint-iso-ccitt ds(5) modules(1) informationFramework(1) } ;
-- As defined in CCITT Rec. X.650 | ISO 7498-3, an application-entity title is composed of an
-- application-process title and an application-entity qualifier. The ACSE protocol provides for the transfer of
-- an application-entity title value by the transfer of its component values. However, the following data type is
-- provided for International Standards that reference a single syntactic structure for AE titles.
AE-title ::= CHOICE { AE-title-form1, AE-title-form2 }
AE-title-form1 ::= Name
-- For access to The Directory (ITU-T Rec. X.500-Series | ISO/IEC 9594), an AE title
-- has AE-title-form1. This value can be constructed from AP-title-form1 and AE-qualifier-form1 values
-- contained in an AARQ or AARE APDU. A discussion of forming an AE-title-form1 from AP-title-form1 and
-- AE-qualifier-form1 may be found in CCITT Rec. X.665 | ISO/IEC 9834-6.
AE-title-form2 ::= OBJECT IDENTIFIER
Continuing the standards chase, Name comes from X.501, and is the same definition as used for x.509 certificates (i.e. the DC=com, DC=example, OU=users, CN=bob type structure)
The full definition can be found in either X.501 or the IETF PKIX RFCs. The latest version of X.501 is only available after payment due to ISO nonsense, but older versions including the 2016 revision are free.
The XAP-TP page 52 effectively confirms that the XA XID is the BER encoding of ATOMIC-ACTION-IDENTIFIER, after expanding any side shorthand. (I presume this should actually be the DER encoding, so they're byte comparable)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | aivarsk |
| Solution 2 | erincandescent |
