//
// CSI.idl
// CORBA Core 3.0 Chapter 24

#ifndef _CSI_IDL_
#define _CSI_IDL_

#ifdef _PRE_3_0_COMPILER_
#pragma prefix "omg.org"
#else
#endif // _PRE_3_0_COMPILER_

//PolyORB:NI:module CSI {
//PolyORB:NI:
//PolyORB:NI:#ifndef _PRE_3_0_COMPILER_ 
//PolyORB:NI:    typeprefix CSI "omg.org";
//PolyORB:NI:#endif // _PRE_3_0_COMPILER_
//PolyORB:NI:
//PolyORB:NI:    // The OMG VMCID; same value as CORBA::OMGVMCID. Do not change ever.
//PolyORB:NI:
//PolyORB:NI:    const unsigned long OMGVMCID = 0x4F4D0;
//PolyORB:NI:
//PolyORB:NI:    // An X509CertificateChain contains an ASN.1 BER encoded SEQUENCE 
//PolyORB:NI:    // [1..MAX] OF X.509 certificates encapsulated in a sequence of octets. The
//PolyORB:NI:    // subject's certificate shall come first in the list. Each following 
//PolyORB:NI:    // certificate shall directly certify the one preceding it. The ASN.1
//PolyORB:NI:    // representation of Certificate is as defined in [IETF RFC 2459].
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <octet> X509CertificateChain; 
//PolyORB:NI:
//PolyORB:NI:    // an X.501 type name or Distinguished Name encapsulated in a sequence of
//PolyORB:NI:    // octets containing the ASN.1 encoding.
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <octet> X501DistinguishedName;
//PolyORB:NI:
//PolyORB:NI:    // UTF-8 Encoding of String
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <octet> UTF8String;
//PolyORB:NI:
//PolyORB:NI:    // ASN.1 Encoding of an OBJECT IDENTIFIER
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <octet> OID;
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <OID> OIDList;
//PolyORB:NI:
//PolyORB:NI:    // A sequence of octets containing a GSStoken. Initial context tokens are
//PolyORB:NI:    // ASN.1 encoded as defined in [IETF RFC 2743] Section 3.1, 
//PolyORB:NI:    // "Mechanism-Independent token Format", pp. 81-82. Initial context tokens
//PolyORB:NI:    // contain an ASN.1 tag followed by a token length, a mechanism identifier,
//PolyORB:NI:    // and a mechanism-specific token (i.e. a GSSUP::InitialContextToken). The
//PolyORB:NI:    // encoding of all other GSS tokens (e.g. error tokens and final context
//PolyORB:NI:    // tokens) is mechanism dependent.
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <octet> GSSToken;
//PolyORB:NI:
//PolyORB:NI:    // An encoding of a GSS Mechanism-Independent Exported Name Object as
//PolyORB:NI:    // defined in [IETF RFC 2743] Section 3.2, "GSS Mechanism-Independent
//PolyORB:NI:    // Exported Name Object Format," p. 84.
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <octet> GSS_NT_ExportedName;
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <GSS_NT_ExportedName> GSS_NT_ExportedNameList;
//PolyORB:NI:
//PolyORB:NI:    // The MsgType enumeration defines the complete set of service context
//PolyORB:NI:    // message types used by the CSI context management protocols, including
//PolyORB:NI:    // those message types pertaining only to the stateful application of the 
//PolyORB:NI:    // protocols (to insure proper alignment of the identifiers between
//PolyORB:NI:    // stateless and stateful implementations). Specifically, the 
//PolyORB:NI:    // MTMessageInContext is not sent by stateless clients (although it may
//PolyORB:NI:    // be received by stateless targets).
//PolyORB:NI:
//PolyORB:NI:    typedef short MsgType;
//PolyORB:NI:      
//PolyORB:NI:    const MsgType MTEstablishContext = 0;
//PolyORB:NI:    const MsgType MTCompleteEstablishContext = 1;      
//PolyORB:NI:    const MsgType MTContextError = 4; 
//PolyORB:NI:    const MsgType MTMessageInContext = 5;
//PolyORB:NI:
//PolyORB:NI:    // The ContextId type is used carry session identifiers. A stateless 
//PolyORB:NI:    // application of the service context protocol is indicated by a session
//PolyORB:NI:    // identifier value of 0.
//PolyORB:NI:
//PolyORB:NI:    typedef unsigned long long ContextId;
//PolyORB:NI:
//PolyORB:NI:    // The AuthorizationElementType defines the contents and encoding of
//PolyORB:NI:    // the_element field of the AuthorizationElement.
//PolyORB:NI:
//PolyORB:NI:    // The high order 20-bits of each AuthorizationElementType constant
//PolyORB:NI:    // shall contain the Vendor Minor Codeset ID (VMCID) of the
//PolyORB:NI:    // organization that defined the element type. The low order 12 bits
//PolyORB:NI:    // shall contain the organization-scoped element type identifier. The
//PolyORB:NI:    // high-order 20 bits of all element types defined by the OMG shall
//PolyORB:NI:    // contain the VMCID allocated to the OMG (that is, 0x4F4D0).
//PolyORB:NI:      
//PolyORB:NI:    typedef unsigned long AuthorizationElementType;
//PolyORB:NI:
//PolyORB:NI:    // An AuthorizationElementType of X509AttributeCertChain indicates that 
//PolyORB:NI:    // the_element field of the AuthorizationElement contains an ASN.1 BER
//PolyORB:NI:    // SEQUENCE composed of an (X.509) AttributeCertificate followed by a
//PolyORB:NI:    // SEQUENCE OF (X.509) Certificate. The two-part SEQUENCE is encapsulated
//PolyORB:NI:    // in an octet stream. The chain of identity certificates is provided
//PolyORB:NI:    // to certify the attribute certificate. Each certificate in the chain 
//PolyORB:NI:    // shall directly certify the one preceding it. The first certificate
//PolyORB:NI:    // in the chain shall certify the attribute certificate. The ASN.1
//PolyORB:NI:    // representation of (X.509) Certificate is as defined in [IETF RFC 2459].
//PolyORB:NI:    // The ASN.1 representation of (X.509) AtributeCertificate is as defined
//PolyORB:NI:    // in [IETF ID PKIXAC].  
//PolyORB:NI:
//PolyORB:NI:    const AuthorizationElementType X509AttributeCertChain = OMGVMCID | 1;
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <octet> AuthorizationElementContents;
//PolyORB:NI:
//PolyORB:NI:    // The AuthorizationElement contains one element of an authorization token.
//PolyORB:NI:    // Each element of an authorization token is logically a PAC.
//PolyORB:NI:
//PolyORB:NI:    struct AuthorizationElement {
//PolyORB:NI:	AuthorizationElementType   the_type;
//PolyORB:NI:	AuthorizationElementContents   the_element;
//PolyORB:NI:    };
//PolyORB:NI:
//PolyORB:NI:    // The AuthorizationToken is made up of a sequence of 
//PolyORB:NI:    // AuthorizationElements
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <AuthorizationElement> AuthorizationToken;
//PolyORB:NI:      
//PolyORB:NI:    typedef unsigned long IdentityTokenType;
//PolyORB:NI:
//PolyORB:NI:    // Additional standard identity token types shall only be defined by the
//PolyORB:NI:    // OMG. All IdentityTokenType constants shall be a power of 2.
//PolyORB:NI:
//PolyORB:NI:    const IdentityTokenType ITTAbsent = 0;      
//PolyORB:NI:    const IdentityTokenType ITTAnonymous = 1;
//PolyORB:NI:    const IdentityTokenType ITTPrincipalName = 2;
//PolyORB:NI:    const IdentityTokenType ITTX509CertChain = 4;
//PolyORB:NI:    const IdentityTokenType ITTDistinguishedName = 8;
//PolyORB:NI:
//PolyORB:NI:    typedef sequence <octet> IdentityExtension;
//PolyORB:NI:      
//PolyORB:NI:    union IdentityToken switch ( IdentityTokenType ) {
//PolyORB:NI:	case ITTAbsent: boolean absent;
//PolyORB:NI:	case ITTAnonymous: boolean anonymous;
//PolyORB:NI:        case ITTPrincipalName: GSS_NT_ExportedName principal_name;
//PolyORB:NI:	case ITTX509CertChain: X509CertificateChain certificate_chain;
//PolyORB:NI:	case ITTDistinguishedName: X501DistinguishedName dn;
//PolyORB:NI:	default: IdentityExtension id;
//PolyORB:NI:    };
//PolyORB:NI:
//PolyORB:NI:    struct EstablishContext {
//PolyORB:NI:	ContextId client_context_id;
//PolyORB:NI:	AuthorizationToken authorization_token;
//PolyORB:NI:	IdentityToken identity_token;
//PolyORB:NI:	GSSToken client_authentication_token;
//PolyORB:NI:    };
//PolyORB:NI:      
//PolyORB:NI:    struct CompleteEstablishContext {
//PolyORB:NI:	ContextId client_context_id;
//PolyORB:NI:	boolean context_stateful;
//PolyORB:NI:	GSSToken final_context_token;
//PolyORB:NI:    };
//PolyORB:NI:
//PolyORB:NI:    struct ContextError {
//PolyORB:NI:	ContextId client_context_id;
//PolyORB:NI:	long major_status;
//PolyORB:NI:	long minor_status;
//PolyORB:NI:	GSSToken error_token;
//PolyORB:NI:    };
//PolyORB:NI:
//PolyORB:NI:    // Not sent by stateless clients. If received by a stateless server, a
//PolyORB:NI:    // ContextError message should be returned, indicating the session does
//PolyORB:NI:    // not exist.
//PolyORB:NI:      
//PolyORB:NI:    struct MessageInContext {
//PolyORB:NI:	ContextId client_context_id;
//PolyORB:NI:	boolean discard_context;
//PolyORB:NI:    };
//PolyORB:NI:      
//PolyORB:NI:    union SASContextBody switch ( MsgType ) {
//PolyORB:NI:	case MTEstablishContext: EstablishContext establish_msg;
//PolyORB:NI:	case MTCompleteEstablishContext: CompleteEstablishContext complete_msg;
//PolyORB:NI:	case MTContextError: ContextError error_msg;
//PolyORB:NI:	case MTMessageInContext: MessageInContext in_context_msg;
//PolyORB:NI:    };
//PolyORB:NI:
//PolyORB:NI:    // The following type represents the string representation of an ASN.1
//PolyORB:NI:    // OBJECT IDENTIFIER (OID). OIDs are represented by the string "oid:"
//PolyORB:NI:    // followed by the integer base 10 representation of the OID separated
//PolyORB:NI:    // by dots. For example, the OID corresponding to the OMG is represented
//PolyORB:NI:    // as: "oid:2.23.130"     
//PolyORB:NI:
//PolyORB:NI:    typedef string StringOID;
//PolyORB:NI:
//PolyORB:NI:    // The GSS Object Identifier for the KRB5 mechanism is:
//PolyORB:NI:    // { iso(1) member-body(2) United States(840) mit(113554) infosys(1)
//PolyORB:NI:    // gssapi(2) krb5(2) }
//PolyORB:NI:
//PolyORB:NI:    const StringOID KRB5MechOID = "oid:1.2.840.113554.1.2.2";
//PolyORB:NI:
//PolyORB:NI:    // The GSS Object Identifier for name objects of the Mechanism-idependent
//PolyORB:NI:    // Exported Name Object type is:
//PolyORB:NI:    // { iso(1) org(3) dod(6) internet(1) security(5) nametypes(6)
//PolyORB:NI:    // gss-api-exported-name(4) }
//PolyORB:NI:
//PolyORB:NI:    const StringOID GSS_NT_Export_Name_OID = "oid:1.3.6.1.5.6.4";
//PolyORB:NI:
//PolyORB:NI:    // The GSS Object Identifier for the scoped-username name form is:
//PolyORB:NI:    // { iso-itu-t (2) international-organization (23) omg (130) security (1)
//PolyORB:NI:    // naming (2) scoped-username(1) }
//PolyORB:NI:
//PolyORB:NI:    const StringOID GSS_NT_Scoped_Username_OID = "oid:2.23.130.1.2.1";
//PolyORB:NI:
//PolyORB:NI:}; // CSI

#endif
