From kitten-bounces@lists.ietf.org Tue Nov 08 13:21:13 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EZY5p-0005Qy-IA; Tue, 08 Nov 2005 13:21:13 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EZY5o-0005Qt-6l
	for kitten@megatron.ietf.org; Tue, 08 Nov 2005 13:21:12 -0500
Received: from serrano.cc.columbia.edu (IDENT:cu41754@serrano.cc.columbia.edu
	[128.59.29.6]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id NAA23803
	for <kitten@lists.ietf.org>; Tue, 8 Nov 2005 13:20:45 -0500 (EST)
Received: from [209.52.107.237] (pp107-237.bctel.ca [209.52.107.237])
	(user=jaltman mech=PLAIN bits=0)
	by serrano.cc.columbia.edu (8.13.0/8.13.0) with ESMTP id jA8ILAGs022286
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <kitten@lists.ietf.org>; Tue, 8 Nov 2005 13:21:11 -0500 (EST)
Message-ID: <4370ED21.7090404@columbia.edu>
Date: Tue, 08 Nov 2005 10:23:29 -0800
From: Jeffrey Altman <jaltman@columbia.edu>
Organization: No Longer Affiliated with Columbia University in the City of
	New York
User-Agent: Thunderbird 1.5 (Windows/20051025)
MIME-Version: 1.0
To: kitten@ietf.org
X-Enigmail-Version: 0.93.0.0
X-No-Spam-Score: Local
X-Scanned-By: MIMEDefang 2.48 on 128.59.29.6
Cc: 
Subject: Work Group Last Call:  Desired Enhancements to GSSAPI Naming 
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1386262667=="
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

This is a cryptographically signed message in MIME format.

--===============1386262667==
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature";
	micalg=sha1; boundary="------------ms040208000103060609040606"

This is a cryptographically signed message in MIME format.

--------------ms040208000103060609040606
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I am happy to announce the start of a two week working group last call
for the Kitten work item "Desired Enhancements to GSSAPI Naming".
http://www.ietf.org/internet-drafts/draft-ietf-kitten-gss-naming-03.txt

This document is intended to be published as Informational.  The
document provides scope for the naming issues Kitten is attempting to solve.

Please perform another review and send feedback to the list.

This WGLC ends at midnight EST on Nov 23, 2005.

Jeffrey Altman


--------------ms040208000103060609040606
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJPzCC
AvowggJjoAMCAQICAw7NrDANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDUwNTI3MTc0MjQzWhcNMDYwNTI3MTc0MjQz
WjBrMQ8wDQYDVQQEEwZBbHRtYW4xFTATBgNVBCoTDEplZmZyZXkgRXJpYzEcMBoGA1UEAxMT
SmVmZnJleSBFcmljIEFsdG1hbjEjMCEGCSqGSIb3DQEJARYUamFsdG1hbkBjb2x1bWJpYS5l
ZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+LutDu/YyHreNfoYd+ZtOjXsL
h67F2cmcVuBPBz+ZGDA+WpVEHrqXaZZO8acXBR5uAVfiwA1acE/kvD/CN5kAqx1VJuQ8Pvyk
iGHhUYTd27ZTliBIrptC7C/381gVwkS+a8jQFPJPO+OktZDzAYplGRY/MQCV8dIsvXUjucox
7TwTTdoLAJYRvHtfEcaCc6mO4ph6NeXQw8Grlx3IRAlTrkE5fBGyjH6R4fqnFTXRQAh1/bG+
i8hQvE6mud3mXdL2t7NP1Qxd9wW0/F/pnWY12IFP/luc3zEzIPvAe+nJluLuSEj0LZgP16mF
xBj1p+u9HPWcHRVX6q7+MQ0RWOv1AgMBAAGjMTAvMB8GA1UdEQQYMBaBFGphbHRtYW5AY29s
dW1iaWEuZWR1MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEEBQADgYEAUDUuzxiq8bbI8vq2
swRK513RphZp+fepyKU5mwBI6aF4GcmqITQILtfTG2SXnjSeY99d+bjOdK1DJFvVh9aOy8mh
2NbEnqMnJIZtg5+eEU64DIV5bQdDRpi99H9vA0sRATIquut+3YHba+zArj0VkVof2VI+ToBu
sHdtSrZYo0gwggL6MIICY6ADAgECAgMOzawwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMC
WkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1Ro
YXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA1MDUyNzE3NDI0M1oXDTA2
MDUyNzE3NDI0M1owazEPMA0GA1UEBBMGQWx0bWFuMRUwEwYDVQQqEwxKZWZmcmV5IEVyaWMx
HDAaBgNVBAMTE0plZmZyZXkgRXJpYyBBbHRtYW4xIzAhBgkqhkiG9w0BCQEWFGphbHRtYW5A
Y29sdW1iaWEuZWR1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvi7rQ7v2Mh63
jX6GHfmbTo17C4euxdnJnFbgTwc/mRgwPlqVRB66l2mWTvGnFwUebgFX4sANWnBP5Lw/wjeZ
AKsdVSbkPD78pIhh4VGE3du2U5YgSK6bQuwv9/NYFcJEvmvI0BTyTzvjpLWQ8wGKZRkWPzEA
lfHSLL11I7nKMe08E03aCwCWEbx7XxHGgnOpjuKYejXl0MPBq5cdyEQJU65BOXwRsox+keH6
pxU10UAIdf2xvovIULxOprnd5l3S9rezT9UMXfcFtPxf6Z1mNdiBT/5bnN8xMyD7wHvpyZbi
7khI9C2YD9ephcQY9afrvRz1nB0VV+qu/jENEVjr9QIDAQABozEwLzAfBgNVHREEGDAWgRRq
YWx0bWFuQGNvbHVtYmlhLmVkdTAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBAFA1
Ls8YqvG2yPL6trMESudd0aYWafn3qcilOZsASOmheBnJqiE0CC7X0xtkl540nmPfXfm4znSt
QyRb1YfWjsvJodjWxJ6jJySGbYOfnhFOuAyFeW0HQ0aYvfR/bwNLEQEyKrrrft2B22vswK49
FZFaH9lSPk6AbrB3bUq2WKNIMIIDPzCCAqigAwIBAgIBDTANBgkqhkiG9w0BAQUFADCB0TEL
MAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3du
MRowGAYDVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIENB
MSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUuY29tMB4XDTAzMDcx
NzAwMDAwMFoXDTEzMDcxNjIzNTk1OVowYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0
ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVl
bWFpbCBJc3N1aW5nIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEpjxVc1X7TrnK
mVoeaMB1BHCd3+n/ox7svc31W/Iadr1/DDph8r9RzgHU5VAKMNcCY1osiRVwjt3J8CuFWqo/
cVbLrzwLB+fxH5E2JCoTzyvV84J3PQO+K/67GD4Hv0CAAmTXp6a7n2XRxSpUhQ9IBH+nttE8
YQRAHmQZcmC3+wIDAQABo4GUMIGRMBIGA1UdEwEB/wQIMAYBAf8CAQAwQwYDVR0fBDwwOjA4
oDagNIYyaHR0cDovL2NybC50aGF3dGUuY29tL1RoYXd0ZVBlcnNvbmFsRnJlZW1haWxDQS5j
cmwwCwYDVR0PBAQDAgEGMCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFQcml2YXRlTGFiZWwy
LTEzODANBgkqhkiG9w0BAQUFAAOBgQBIjNFQg+oLLswNo2asZw9/r6y+whehQ5aUnX9MIbj4
Nh+qLZ82L8D0HFAgk3A8/a3hYWLD2ToZfoSxmRsAxRoLgnSeJVCUYsfbJ3FXJY3dqZw5jowg
T2Vfldr394fWxghOrvbqNOUQGls1TXfjViF4gtwhGTXeJLHTHUb/XV9lTzGCAzswggM3AgEB
MGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0
ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAgMOzaww
CQYFKw4DAhoFAKCCAacwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUx
DxcNMDUxMTA4MTgyMzI5WjAjBgkqhkiG9w0BCQQxFgQUmyGOG3/DchE1CkyYIqusewivLBIw
UgYJKoZIhvcNAQkPMUUwQzAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcN
AwICAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgweAYJKwYBBAGCNxAEMWswaTBiMQswCQYD
VQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UE
AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAw7NrDB6BgsqhkiG9w0B
CRACCzFroGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQ
dHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENB
AgMOzawwDQYJKoZIhvcNAQEBBQAEggEAQC3gaYMF4Crzc+syvDBIMYKNPsnfmqY99AlxBfOj
iTckzX7NVHGlleXq51SCkLF9HZDlxfVrpoThTLtrowqYuRptovhetH5ktrMGo0TirPULZC6G
eBEsch6PqqBBgBcHmoYKargisAPG9djS9PCIJI6DTzCgrWmtBOKzX1nwHxp6DTcLeieR8lHq
dReebZbi77U86Y8gbgx6j25rnUIeeu7O+3kCsiE/koAXTW8lUsxeuOrkoTsGzkWf7X7FempR
XOm7lUTDNj+P7tuMRiu+0hvcFR1a5spinGtZTMTMWg8cmWC0TKvRvCNrGeiNEBEBAkf5Ky8o
aDkGfXPgC+GSWQAAAAAAAA==
--------------ms040208000103060609040606--


--===============1386262667==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten

--===============1386262667==--




From kitten-bounces@lists.ietf.org Tue Nov 08 17:27:44 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EZbwO-00058L-Sz; Tue, 08 Nov 2005 17:27:44 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EZbwN-00057w-Ma
	for kitten@megatron.ietf.org; Tue, 08 Nov 2005 17:27:43 -0500
Received: from serrano.cc.columbia.edu (IDENT:cu41754@serrano.cc.columbia.edu
	[128.59.29.6]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id RAA10140
	for <kitten@lists.ietf.org>; Tue, 8 Nov 2005 17:27:15 -0500 (EST)
Received: from [209.52.107.237] (pp107-237.bctel.ca [209.52.107.237])
	(user=jaltman mech=PLAIN bits=0)
	by serrano.cc.columbia.edu (8.13.0/8.13.0) with ESMTP id jA8MRgkE015368
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <kitten@lists.ietf.org>; Tue, 8 Nov 2005 17:27:42 -0500 (EST)
Message-ID: <437126E8.9090909@columbia.edu>
Date: Tue, 08 Nov 2005 14:30:00 -0800
From: Jeffrey Altman <jaltman@columbia.edu>
Organization: No Longer Affiliated with Columbia University in the City of
	New York
User-Agent: Thunderbird 1.5 (Windows/20051025)
MIME-Version: 1.0
To: kitten@ietf.org
X-Enigmail-Version: 0.93.0.0
X-No-Spam-Score: Local
X-Scanned-By: MIMEDefang 2.48 on 128.59.29.6
Cc: 
Subject: Kitten Meeting at IETF64
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0757272464=="
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

This is a cryptographically signed message in MIME format.

--===============0757272464==
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature";
	micalg=sha1; boundary="------------ms040508000602050002000204"

This is a cryptographically signed message in MIME format.

--------------ms040508000602050002000204
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Kitten (GSS-API Next Generation) WG (kitten)

WEDNESDAY, November 9, 2005
0900-1130 (UTC-8) Morning Session I

==============================================================================

CHAIR: Jeffrey Altman <jaltman@columbia.edu>

Presentation Materials (search for Kitten):

  https://onsite.ietf.org/public/meeting_materials.cgi?meeting_num=64

Audio Stream:

  http://videolab.uoregon.edu/events/ietf/
  http://videolab.uoregon.edu/events/ietf/ietf648.m3u


Jabber:
  server: ietf.xmpp.org
  room:   kitten


AGENGA:

Preliminaries - Jeffrey Altman (5 min)
  - Introduction
  - Blue Sheets
  - Scribe, Jabber
    http://www.xmpp.org/ietf-chat.html
  - Agenda Bashing

Document Status - Jeffrey Altman (15 min)

Technical Discussions:
  - GSS-API Naming Extensions (Nico Williams, Sun Microsystems)
    (60 min)
    draft-ietf-kitten-gssapi-naming-exts-01.txt

  - Review CAT and KRB-WG mailing list archives to determine contents of
    'Clarifications to GSSAPIv2' as Informational   (60 min)

Update Milestones - Chair and Participants (10 min)


--------------ms040508000602050002000204
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJPzCC
AvowggJjoAMCAQICAw7NrDANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDUwNTI3MTc0MjQzWhcNMDYwNTI3MTc0MjQz
WjBrMQ8wDQYDVQQEEwZBbHRtYW4xFTATBgNVBCoTDEplZmZyZXkgRXJpYzEcMBoGA1UEAxMT
SmVmZnJleSBFcmljIEFsdG1hbjEjMCEGCSqGSIb3DQEJARYUamFsdG1hbkBjb2x1bWJpYS5l
ZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+LutDu/YyHreNfoYd+ZtOjXsL
h67F2cmcVuBPBz+ZGDA+WpVEHrqXaZZO8acXBR5uAVfiwA1acE/kvD/CN5kAqx1VJuQ8Pvyk
iGHhUYTd27ZTliBIrptC7C/381gVwkS+a8jQFPJPO+OktZDzAYplGRY/MQCV8dIsvXUjucox
7TwTTdoLAJYRvHtfEcaCc6mO4ph6NeXQw8Grlx3IRAlTrkE5fBGyjH6R4fqnFTXRQAh1/bG+
i8hQvE6mud3mXdL2t7NP1Qxd9wW0/F/pnWY12IFP/luc3zEzIPvAe+nJluLuSEj0LZgP16mF
xBj1p+u9HPWcHRVX6q7+MQ0RWOv1AgMBAAGjMTAvMB8GA1UdEQQYMBaBFGphbHRtYW5AY29s
dW1iaWEuZWR1MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEEBQADgYEAUDUuzxiq8bbI8vq2
swRK513RphZp+fepyKU5mwBI6aF4GcmqITQILtfTG2SXnjSeY99d+bjOdK1DJFvVh9aOy8mh
2NbEnqMnJIZtg5+eEU64DIV5bQdDRpi99H9vA0sRATIquut+3YHba+zArj0VkVof2VI+ToBu
sHdtSrZYo0gwggL6MIICY6ADAgECAgMOzawwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMC
WkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1Ro
YXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA1MDUyNzE3NDI0M1oXDTA2
MDUyNzE3NDI0M1owazEPMA0GA1UEBBMGQWx0bWFuMRUwEwYDVQQqEwxKZWZmcmV5IEVyaWMx
HDAaBgNVBAMTE0plZmZyZXkgRXJpYyBBbHRtYW4xIzAhBgkqhkiG9w0BCQEWFGphbHRtYW5A
Y29sdW1iaWEuZWR1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvi7rQ7v2Mh63
jX6GHfmbTo17C4euxdnJnFbgTwc/mRgwPlqVRB66l2mWTvGnFwUebgFX4sANWnBP5Lw/wjeZ
AKsdVSbkPD78pIhh4VGE3du2U5YgSK6bQuwv9/NYFcJEvmvI0BTyTzvjpLWQ8wGKZRkWPzEA
lfHSLL11I7nKMe08E03aCwCWEbx7XxHGgnOpjuKYejXl0MPBq5cdyEQJU65BOXwRsox+keH6
pxU10UAIdf2xvovIULxOprnd5l3S9rezT9UMXfcFtPxf6Z1mNdiBT/5bnN8xMyD7wHvpyZbi
7khI9C2YD9ephcQY9afrvRz1nB0VV+qu/jENEVjr9QIDAQABozEwLzAfBgNVHREEGDAWgRRq
YWx0bWFuQGNvbHVtYmlhLmVkdTAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBAFA1
Ls8YqvG2yPL6trMESudd0aYWafn3qcilOZsASOmheBnJqiE0CC7X0xtkl540nmPfXfm4znSt
QyRb1YfWjsvJodjWxJ6jJySGbYOfnhFOuAyFeW0HQ0aYvfR/bwNLEQEyKrrrft2B22vswK49
FZFaH9lSPk6AbrB3bUq2WKNIMIIDPzCCAqigAwIBAgIBDTANBgkqhkiG9w0BAQUFADCB0TEL
MAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3du
MRowGAYDVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIENB
MSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUuY29tMB4XDTAzMDcx
NzAwMDAwMFoXDTEzMDcxNjIzNTk1OVowYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0
ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVl
bWFpbCBJc3N1aW5nIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEpjxVc1X7TrnK
mVoeaMB1BHCd3+n/ox7svc31W/Iadr1/DDph8r9RzgHU5VAKMNcCY1osiRVwjt3J8CuFWqo/
cVbLrzwLB+fxH5E2JCoTzyvV84J3PQO+K/67GD4Hv0CAAmTXp6a7n2XRxSpUhQ9IBH+nttE8
YQRAHmQZcmC3+wIDAQABo4GUMIGRMBIGA1UdEwEB/wQIMAYBAf8CAQAwQwYDVR0fBDwwOjA4
oDagNIYyaHR0cDovL2NybC50aGF3dGUuY29tL1RoYXd0ZVBlcnNvbmFsRnJlZW1haWxDQS5j
cmwwCwYDVR0PBAQDAgEGMCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFQcml2YXRlTGFiZWwy
LTEzODANBgkqhkiG9w0BAQUFAAOBgQBIjNFQg+oLLswNo2asZw9/r6y+whehQ5aUnX9MIbj4
Nh+qLZ82L8D0HFAgk3A8/a3hYWLD2ToZfoSxmRsAxRoLgnSeJVCUYsfbJ3FXJY3dqZw5jowg
T2Vfldr394fWxghOrvbqNOUQGls1TXfjViF4gtwhGTXeJLHTHUb/XV9lTzGCAzswggM3AgEB
MGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0
ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAgMOzaww
CQYFKw4DAhoFAKCCAacwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUx
DxcNMDUxMTA4MjIzMDAwWjAjBgkqhkiG9w0BCQQxFgQUPb13H3utQujKGgoa3BRNqU+Rt5kw
UgYJKoZIhvcNAQkPMUUwQzAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcN
AwICAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgweAYJKwYBBAGCNxAEMWswaTBiMQswCQYD
VQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UE
AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAw7NrDB6BgsqhkiG9w0B
CRACCzFroGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQ
dHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENB
AgMOzawwDQYJKoZIhvcNAQEBBQAEggEAAunoGy/WxG5MhjjQPHTGDqVWJthUi5Z7rzDM6H/E
n+BxyafuxM3yppJ3S6d95/z54rez3TS0+zHkbYAZF/hw/jf52/VtQ3b/jkFJyK+gr/kP1y4i
NLPlQe3Wf0eL+HeLqivSEIxED7biyCJsrhzzvjSbO0H4236RnUPHSNGQUr+aRY3/eI8aTkSc
xxe1KPdHVBneBicx1Hq7MTF/z19Gpuu+uHiNdo4PORdCHvcVgi9litiOUopBuY8WXc43hBqG
QsPStlVJ2AfS+LuhFHINstxFTS9klGK3diUc3+aft8wDT+iKkKwEmunlHP/Xva3RQ8q4v9BA
KoyMo2fR2TDGxAAAAAAAAA==
--------------ms040508000602050002000204--


--===============0757272464==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten

--===============0757272464==--




From kitten-bounces@lists.ietf.org Wed Nov 09 19:01:30 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EZzsf-00049c-S9; Wed, 09 Nov 2005 19:01:29 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EZzsb-00047N-IV; Wed, 09 Nov 2005 19:01:27 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id TAA19408;
	Wed, 9 Nov 2005 19:00:33 -0500 (EST)
Received: from lucius.provo.novell.com ([137.65.81.172])
	by ietf-mx.ietf.org with esmtp (Exim 4.43)
	id 1Ea08D-0006hp-Fl; Wed, 09 Nov 2005 19:17:39 -0500
Received: from INET-PRV1-MTA by lucius.provo.novell.com
	with Novell_GroupWise; Wed, 09 Nov 2005 17:00:35 -0700
Message-Id: <43722B28.365D.009A.0@novell.com>
X-Mailer: Novell GroupWise Internet Agent 7.0 
Date: Wed, 09 Nov 2005 17:00:24 -0700
From: "Juan Carlos Luciani" <jluciani@novell.com>
To: <internet-drafts@ietf.org>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=__Part5C7E6088.0__="
X-Spam-Score: 0.0 (/)
X-Scan-Signature: ea8fa782ffd53df2251486bddca77dc4
Cc: kitten@ietf.org
Subject: New draft for Kitten (GSS_API V2: C# Bindings)
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=__Part5C7E6088.0__=
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

This e-mail is being sent to submit the:

  GSS_API V2: C# Bindings
  draft- ietf- kitten- gssapi- csharp- bindings- 00.txt

as a Kitten working group draft.

Thank you,

Juan Carlos Luciani
jluciani@novell.com


--=__Part5C7E6088.0__=
Content-Type: text/plain;
	name="draft-ietf-kitten-gssapi-csharp-bindings-00.txt"
Content-Disposition: attachment;
	filename="draft-ietf-kitten-gssapi-csharp-bindings-00.txt"
Content-Transfer-Encoding: 8bit

NETWORK WORKING GROUP                                      J. C. Luciani
INTERNET-DRAFT                                              Novell, Inc.
Expires: April 8, 2006                                  November 8, 2005

                        GSS_API V2: C# Bindings
               draft-ietf-kitten-gssapi-csharp-bindings-00.txt


Status of this Memo

   This document is an Internet-Draft and is subject to all provisions
   of section 3 of RFC 3667.  By submitting this Internet-Draft, each
   author represents that any applicable patent or other IPR claims of
   which he or she is aware have been or will be disclosed, and any of
   which he or she becomes aware will be disclosed, in accordance with
   Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

Abstract

   The Generic Security Services Application Program Interface (GSS-API)
   offers application programmers uniform access to security services
   atop a variety of underlying cryptographic mechanisms.  This document
   specifies the C# language bindings for GSS-API which is described at
   a language independent conceptual level in RFC 2743 [RFC2743].

   The GSS-API C# bindings were designed to emulate the Java bindings as
   defined in RFC 2853 [RFC2853].










Luciani                 Expires April 8, 2006                   [Page 1]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


Table of Contents

1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2. GSS-API Operational Paradigm. . . . . . . . . . . . . . . . . . . . 6  
3. Additional Controls . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1. Delegation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9   
3.2. Mutual Authentication . . . . . . . . . . . . . . . . . . . . . . 9
3.3. Replay and Out-of-Sequence Detection. . . . . . . . . . . . . .  10 
3.4. Anonymous Authentication. . . . . . . . . . . . . . . . . . . .  11  
3.5. Confidentiality . . . . . . . . . . . . . . . . . . . . . . . .  12    
3.6. Inter-process Context Transfer. . . . . . . . . . . . . . . . .  12  
3.7. The Use of Incomplete Contexts. . . . . . . . . . . . . . . . .  13  
4. C# GSS-API Overview . . . . . . . . . . . . . . . . . . . . . . .  13  
4.1. Object Identifiers. . . . . . . . . . . . . . . . . . . . . . .  14  
4.2. Object Identifier Sets. . . . . . . . . . . . . . . . . . . . .  14    
4.3. Credentials . . . . . . . . . . . . . . . . . . . . . . . . . .  14   
4.4. Contexts. . . . . . . . . . . . . . . . . . . . . . . . . . . .  16   
4.5. Authentication Tokens . . . . . . . . . . . . . . . . . . . . .  17 
4.6. Interprocess Tokens . . . . . . . . . . . . . . . . . . . . . .  17   
4.7. Error Reporting . . . . . . . . . . . . . . . . . . . . . . . .  17 
4.7.1. GSS Status Codes. . . . . . . . . . . . . . . . . . . . . . .  18  
4.7.2. Mechanism-specific Codes. . . . . . . . . . . . . . . . . . .  20   
4.7.3. Suplementary Status Codes . . . . . . . . . . . . . . . . . .  20 
4.8. Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  21   
4.9. Channel Bindings. . . . . . . . . . . . . . . . . . . . . . . .  23    
5. Introduction to GSS-API Classes and Interfaces. . . . . . . . . .  24   
5.1. GSSManager Class. . . . . . . . . . . . . . . . . . . . . . . .  24    
5.2. GSSName Interface . . . . . . . . . . . . . . . . . . . . . . .  25  
5.3. GSSCredential Interface . . . . . . . . . . . . . . . . . . . .  25  
5.4. GSSContext Interface. . . . . . . . . . . . . . . . . . . . . .  26   
5.5. MessageProp Class . . . . . . . . . . . . . . . . . . . . . . .  27  
5.6. GSSException Class. . . . . . . . . . . . . . . . . . . . . . .  27  
5.7. Oid Class . . . . . . . . . . . . . . . . . . . . . . . . . . .  27  
5.8. ChannelBinding Class. . . . . . . . . . . . . . . . . . . . . .  27   
5.9. GSSConstants Class. . . . . . . . . . . . . . . . . . . . . . .  28
5.10. GSSNameTypes Class . . . . . . . . . . . . . . . . . . . . . .  28
5.11. GSSCredentialUsage Enumeration . . . . . . . . . . . . . . . .  28
6. Detailed GSS-API Description. . . . . . . . . . . . . . . . . . .  28   
6.1. public abstract class GSSManager. . . . . . . . . . . . . . . .  28   
6.1.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  29   
6.1.2. getInstance . . . . . . . . . . . . . . . . . . . . . . . . .  29   
6.1.3. getMechs. . . . . . . . . . . . . . . . . . . . . . . . . . .  29    
6.1.4. getNamesForMech . . . . . . . . . . . . . . . . . . . . . . .  29  
6.1.5. getMechsForName . . . . . . . . . . . . . . . . . . . . . . .  29  
6.1.6. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  30  
6.1.7. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  30  
6.1.8. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  31  
6.1.9. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  32  
6.1.10. createCredential . . . . . . . . . . . . . . . . . . . . . .  32   


Luciani                 Expires April 8, 2006                   [Page 2]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.11. createCredential . . . . . . . . . . . . . . . . . . . . . .  33   
6.1.12. createCredential . . . . . . . . . . . . . . . . . . . . . .  33   
6.1.13. createContext. . . . . . . . . . . . . . . . . . . . . . . .  34    
6.1.14. createContext. . . . . . . . . . . . . . . . . . . . . . . .  35 
6.1.15. createContext. . . . . . . . . . . . . . . . . . . . . . . .  35
6.2. public class GSSConstants . . . . . . . . . . . . . . . . . . .  35
6.2.1. DEFAULT_LIFETIME. . . . . . . . . . . . . . . . . . . . . . .  35 
6.2.2. INDEFINITE_LIFETIME . . . . . . . . . . . . . . . . . . . . .  36
6.3. public class GSSNameTypes . . . . . . . . . . . . . . . . . . .  36
6.3.1. NT_HOSTBASED_SERVICE. . . . . . . . . . . . . . . . . . . . .  36 
6.3.2. NT_USER_NAME. . . . . . . . . . . . . . . . . . . . . . . . .  36
6.3.3. NT_MACHINE_UID_NAME . . . . . . . . . . . . . . . . . . . . .  36 
6.3.4. NT_STRING_UID_NAME. . . . . . . . . . . . . . . . . . . . . .  37 
6.3.5. NT_ANONYMOUS. . . . . . . . . . . . . . . . . . . . . . . . .  37 
6.3.6. NT_EXPORT_NAME. . . . . . . . . . . . . . . . . . . . . . . .  37 
6.4. public interface GSSName. . . . . . . . . . . . . . . . . . . .  38
6.4.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  38 
6.4.2. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.3. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.4. canonicalize. . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.5. export. . . . . . . . . . . . . . . . . . . . . . . . . . . .  40 
6.4.6. ToString. . . . . . . . . . . . . . . . . . . . . . . . . . .  40  
6.4.7. stringNameType. . . . . . . . . . . . . . . . . . . . . . . .  40  
6.4.8. isAnonymous . . . . . . . . . . . . . . . . . . . . . . . . .  40 
6.4.9. isMN  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  40
6.5. public enum GSSCredentialUsage. . . . . . . . . . . . . . . . .  41
6.5.1. INITIATE_AND_ACCEPT . . . . . . . . . . . . . . . . . . . . .  41 
6.5.2. INITIATE_ONLY . . . . . . . . . . . . . . . . . . . . . . . .  41
6.5.3. ACCEPT_ONLY . . . . . . . . . . . . . . . . . . . . . . . . .  41
6.6. public interface GSSCredential. . . . . . . . . . . . . . . . .  41
6.6.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  42 
6.6.2. dispose . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.3. getName . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.4. getName . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.5. getRemainingLifetime. . . . . . . . . . . . . . . . . . . . .  43  
6.6.6. getRemainingInitLifetime. . . . . . . . . . . . . . . . . . .  44 
6.6.7. getRemainingAcceptLifetime. . . . . . . . . . . . . . . . . .  44  
6.6.8. getUsage. . . . . . . . . . . . . . . . . . . . . . . . . . .  44  
6.6.9. getUsage. . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.10. getMechs . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.11. add. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.12. Equals . . . . . . . . . . . . . . . . . . . . . . . . . . .  46
6.7. public interface GSSContext . . . . . . . . . . . . . . . . . .  47
6.7.1. Example Context . . . . . . . . . . . . . . . . . . . . . . .  48
6.7.2. initSecContext. . . . . . . . . . . . . . . . . . . . . . . .  50  
6.7.2.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  51 
6.7.3. initSecContext. . . . . . . . . . . . . . . . . . . . . . . .  52  
6.7.3.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  53  
6.7.4. acceptSecContext. . . . . . . . . . . . . . . . . . . . . . .  54


Luciani                 Expires April 8, 2006                   [Page 3]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  55
6.7.5. acceptSecContext. . . . . . . . . . . . . . . . . . . . . . .  56
6.7.5.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  57  
6.7.6. isEstablished . . . . . . . . . . . . . . . . . . . . . . . .  57
6.7.7. dispose . . . . . . . . . . . . . . . . . . . . . . . . . . .  57
6.7.8. getWrapSizeLimit. . . . . . . . . . . . . . . . . . . . . . .  58
6.7.9. wrap. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  59  
6.7.10. wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . .  60 
6.7.11. unWrap . . . . . . . . . . . . . . . . . . . . . . . . . . .  61
6.7.12. unWrap . . . . . . . . . . . . . . . . . . . . . . . . . . .  62
6.7.13. getMIC . . . . . . . . . . . . . . . . . . . . . . . . . . .  63
6.7.14. getMIC . . . . . . . . . . . . . . . . . . . . . . . . . . .  64
6.7.15. verifyMIC. . . . . . . . . . . . . . . . . . . . . . . . . .  65
6.7.16. verifyMIC. . . . . . . . . . . . . . . . . . . . . . . . . .  66
6.7.17. export . . . . . . . . . . . . . . . . . . . . . . . . . . .  67
6.7.18. mutualAuthenitcation . . . . . . . . . . . . . . . . . . . .  67
6.7.19. replayDetection. . . . . . . . . . . . . . . . . . . . . . .  68
6.7.20. sequenceDetection. . . . . . . . . . . . . . . . . . . . . .  68 
6.7.21. credentialDelegation . . . . . . . . . . . . . . . . . . . .  68
6.7.22. anonymity. . . . . . . . . . . . . . . . . . . . . . . . . .  69
6.7.23. confidentiality. . . . . . . . . . . . . . . . . . . . . . .  69
6.7.24. integrity. . . . . . . . . . . . . . . . . . . . . . . . . .  69
6.7.25. lifetime . . . . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.26. channelBinding . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.27. isTransferable . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.28. isProtReady. . . . . . . . . . . . . . . . . . . . . . . . .  70 
6.7.29. srcName. . . . . . . . . . . . . . . . . . . . . . . . . . .  71  
6.7.30. targName . . . . . . . . . . . . . . . . . . . . . . . . . .  71
6.7.31. mechanism. . . . . . . . . . . . . . . . . . . . . . . . . .  71
6.7.32. delegatedCredential. . . . . . . . . . . . . . . . . . . . .  71  
6.7.33. isInitiator. . . . . . . . . . . . . . . . . . . . . . . . .  72 
6.8. public class MessageProp. . . . . . . . . . . . . . . . . . . .  72
6.8.1. Constructors. . . . . . . . . . . . . . . . . . . . . . . . .  73 
6.8.2. QOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
6.8.3. privacy . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
6.8.4. minorStatus . . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.5. minorString . . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.6. isDuplicateToken. . . . . . . . . . . . . . . . . . . . . . .  74
6.8.7. isOldToken. . . . . . . . . . . . . . . . . . . . . . . . . .  74
6.8.8. isUnseqToken. . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.9. isGapToken. . . . . . . . . . . . . . . . . . . . . . . . . .  75
6.9. public class ChannelBinding . . . . . . . . . . . . . . . . . .  75
6.9.1. Constructors. . . . . . . . . . . . . . . . . . . . . . . . .  76 
6.9.2. initiatorAddress. . . . . . . . . . . . . . . . . . . . . . .  76
6.9.3. acceptorAddress . . . . . . . . . . . . . . . . . . . . . . .  77
6.9.4. applicationData . . . . . . . . . . . . . . . . . . . . . . .  77
6.9.5. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  77
6.10. public class Oid . . . . . . . . . . . . . . . . . . . . . . .  77  
6.10.1. Constructor. . . . . . . . . . . . . . . . . . . . . . . . .  78 


Luciani                 Expires April 8, 2006                   [Page 4]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.2. ToString . . . . . . . . . . . . . . . . . . . . . . . . . .  78  
6.10.3. Equals . . . . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.10.4. DER. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.10.5. containedIn. . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.11. public class GSSException. . . . . . . . . . . . . . . . . . .  79 
6.11.1. Constants. . . . . . . . . . . . . . . . . . . . . . . . . .  80
6.11.2. Constructors . . . . . . . . . . . . . . . . . . . . . . . .  82
6.11.3. major. . . . . . . . . . . . . . . . . . . . . . . . . . . .  82  
6.11.4. minor. . . . . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.5. majorString. . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.6. minorString. . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.7. ToString . . . . . . . . . . . . . . . . . . . . . . . . . .  83  
6.11.8. Message. . . . . . . . . . . . . . . . . . . . . . . . . . .  83
7. Sample Applications . . . . . . . . . . . . . . . . . . . . . . .  84
7.1. Simple GSS Context Initiator. . . . . . . . . . . . . . . . . .  84  
7.2. Simple GSS Context Acceptor . . . . . . . . . . . . . . . . . .  89
8. Security Considerations . . . . . . . . . . . . . . . . . . . . .  93
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . .  93
10. Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . .  93
11. Normative References . . . . . . . . . . . . . . . . . . . . . .  94
12. Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .  94
13. Intellectual Property Statement. . . . . . . . . . . . . . . . .  94
14. Disclaimer of Validity . . . . . . . . . . . . . . . . . . . . .  95
15. Copyright Statement. . . . . . . . . . . . . . . . . . . . . . .  95



























Luciani                 Expires April 8, 2006                   [Page 5]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


1.Introduction

   This document specifies the C# language bindings for the Generic
   Security Services Application Programming Interface Version 2
   (GSS-API v2). GSS-API allows a caller application to authenticate a
   principal identity, to delegate rights to a peer, and to apply
   security services such as confidentiality and integrity on a per-
   message basis.

   One of the design goals utilized when defining the C# bindings for
   GSS-API was to emulate the Java bindings specified in RFC 2853 as
   much as possible while still taking advantage of C# features such
   as Properties.  By emulating the Java bindings, we hoped to leverage
   work already done and to make life easier for developers utilizing
   GSS-API under C# and Java.  As a result of this design goal, the C#
   bindings match the Java bindings very closely.

   Because of the similarity between the Java and C# bindings and in the
   spirit of leveraging work already done, this document borrows heavily
   from RFC 2853.

2.GSS-API Operational Paradigm

   The Generic Security Service Application Programming Interface
   Version 2 defines a generic security API to calling applications.  It
   allows a communicating application to authenticate a user associated
   with another application, to delegate rights to another application,
   and to apply security services such as confidentiality and integrity
   on a per-message basis.

      There are four stages to using GSS-API:

      1) The application acquires a set of credentials with which it may
         prove its identity to other processes.  The application's
         credentials vouch for its global identity, which may or may not
         be related to any local username under which it may be running.

      2) A pair of communicating applications establish a joint security
         context using their credentials.  The security context
         encapsulates shared state information, which is required in
         order that per-message security services may be provided.
         Examples of state information that might be shared between
         applications as part of a security context are cryptographic
         keys, and message sequence numbers.  As part of the
         establishment of a security context, the context initiator is
         authenticated to the responder, and may require that the
         responder is authenticated back to the initiator.  The
         initiator may optionally give the responder the right to
         initiate further security contexts, acting as an agent or
         
         
Luciani                 Expires April 8, 2006                   [Page 6]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


         delegate of the initiator.  This transfer of rights is termed
         "delegation", and is achieved by creating a set of credentials,
         similar to those used by the initiating application, but which
         may be used by the responder.

         A GSSContext object is used to establish and maintain the
         shared information that makes up the security context.  Certain
         GSSContext methods will generate a token, which applications
         treat as cryptographically protected, opaque data.  The caller
         of such GSSContext method is responsible for transferring the
         token to the peer application, encapsulated if necessary in an
         application-to-application protocol.  On receipt of such a
         token, the peer application should pass it to a corresponding
         GSSContext method which will decode the token and extract the
         information, updating the security context state information
         accordingly.

      3) Per-message services are invoked on a GSSContext object to
         apply either:

         integrity and data origin authentication, or

         confidentiality, integrity and data origin authentication

         to application data, which are treated by GSS-API as arbitrary
         octet-strings.  An application transmitting a message that it
         wishes to protect will call the appropriate GSSContext method
         (getMIC or wrap) to apply protection, and send the resulting
         token to the receiving application.  The receiver will pass the
         received token (and, in the case of data protected by getMIC,
         the accompanying message-data) to the corresponding decoding
         method of the GSSContext interface (verifyMIC or unwrap) to
         remove the protection and validate the data.

      4) At the completion of a communications session (which may extend
         across several transport connections), each application uses a
         GSSContext method to invalidate the security context and
         release any system or cryptographic resources held.  Multiple
         contexts may also be used (either successively or
         simultaneously) within a single communications association, at
         the discretion of the applications.

3. Additional Controls

   This section discusses the optional services that a context initiator
   may request of the GSS-API before the context establishment.  Each of
   these services is requested by manipulating the appropriate property
   of the GSSContext interface before the first call to init is
   performed.


Luciani                 Expires April 8, 2006                   [Page 7]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Only the context initiator can request context flags.

   The optional services defined are:

   Delegation
         The (usually temporary) transfer of rights from initiator to
         acceptor, enabling the acceptor to authenticate itself as an
         agent of the initiator.

   Mutual Authentication
         In addition to the initiator authenticating its identity to the
         context acceptor, the context acceptor should also authenticate
         itself to the initiator.

   Replay Detection
         In addition to providing message integrity services, GSSContext
         per-message operations of getMIC and wrap should include
         message numbering information to enable verifyMIC and unwrap to
         detect if a message has been duplicated.

   Out-of-Sequence Detection
         In addition to providing message integrity services, GSSContext
         per-message operations (getMIC and wrap) should include
         message sequencing information to enable verifyMIC and unwrap
         to detect if a message has been received out of sequence.

   Anonymous Authentication
         The establishment of the security context should not reveal the
         initiator's identity to the context acceptor.

   Some mechanisms may not support all optional services, and some
   mechanisms may only support some services in conjunction with others.
   The GSSContext interface offers query methods to allow the
   verification by the calling application of which services will be
   available from the context when the establishment phase is complete.
   In general, if the security mechanism is capable of providing a
   requested service, it should do so even if additional services must
   be enabled in order to provide the requested service.  If the
   mechanism is incapable of providing a requested service, it should
   proceed without the service leaving the application to abort the
   context establishment process if it considers the requested service
   to be mandatory.

   Some mechanisms may specify that support for some services is
   optional, and that implementers of the mechanism need not provide it.
   This is most commonly true of the confidentiality service, often
   because of legal restrictions on the use of data-encryption, but may
   apply to any of the services.  Such mechanisms are required to send
   at least one token from acceptor to initiator during context
   

Luciani                 Expires April 8, 2006                   [Page 8]

Internet-Draft          GSS-API V2: C# Bindings            November 2005

   
   establishment when the initiator indicates a desire to use such a
   service, so that the initiating GSS-API can correctly indicate
   whether the service is supported by the acceptor's GSS-API.

3.1. Delegation

   The GSS-API allows delegation to be controlled by the initiating
   application via manipulation of the credential delegation property
   before the first call to init has been issued.  Some mechanisms do
   not support delegation, and for such mechanisms attempts by an
   application to enable delegation are ignored.

   The acceptor of a security context, for which the initiator enabled
   delegation, can check if delegation was enabled by reading the
   credential delegation property of the GSSContext object.  In cases
   when it is, the delegated credential object can be obtained by
   reading the delegated credential property. The obtained GSSCredential
   object may then be used to initiate subsequent GSS-API security
   contexts as an agent or delegate of the initiator.  If the original
   initiator's identity is "A" and the delegate's identity is "B", then,
   depending on the underlying mechanism, the identity embodied by the
   delegated credential may be either "A" or "B acting for A".

   For many mechanisms that support delegation, a simple boolean does
   not provide enough control.  Examples of additional aspects of
   delegation control that a mechanism might provide to an application
   are duration of delegation, network addresses from which delegation
   is valid, and constraints on the tasks that may be performed by a
   delegate.  Such controls are presently outside the scope of the GSS-
   API.  GSS-API implementations supporting mechanisms offering
   additional controls should provide extension routines that allow
   these controls to be exercised (perhaps by modifying the initiator's
   GSS-API credential object prior to its use in establishing a
   context).  However, the simple delegation control provided by GSS-API
   should always be able to over-ride other mechanism-specific
   delegation controls.  If the application instructs the GSSContext
   object that delegation is not desired, then the implementation must
   not permit delegation to occur.  This is an exception to the general
   rule that a mechanism may enable services even if they are not
   requested - delegation may only be provided at the explicit request
   of the application.

3.2. Mutual Authentication

   Usually, a context acceptor will require that a context initiator
   authenticate itself so that the acceptor may make an access-control
   decision prior to performing a service for the initiator.  In some
   cases, the initiator may also request that the acceptor authenticate
   itself.  GSS-API allows the initiating application to request this


Luciani                 Expires April 8, 2006                   [Page 9]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   mutual authentication service by setting the mutual authentication
   property of the GSSContext object to "true" before making the first
   call to init.  The initiating application is informed as to whether
   or not the context acceptor has authenticated itself.  Note that some
   mechanisms may not support mutual authentication, and other
   mechanisms may always perform mutual authentication, whether or not
   the initiating application requests it.  In particular, mutual
   authentication may be required by some mechanisms in order to support
   replay or out-of-sequence message detection, and for such mechanisms
   a request for either of these services will automatically enable
   mutual authentication.

3.3. Replay and Out-of-Sequence Detection

   The GSS-API may provide detection of mis-ordered messages once a
   security context has been established.  Protection may be applied to
   messages by either application, by calling either getMIC or wrap
   methods of the GSSContext object, and verified by the peer
   application by calling verifyMIC or unwrap for the peer's GSSContext
   object.

   The getMIC method calculates a cryptographic checksum of an
   application message, and returns that checksum in a token.  The
   application should pass both the token and the message to the peer
   application, which presents them to the verifyMIC method of the
   peer's GSSContext object.

   The wrap method calculates a cryptographic checksum of an application
   message, and places both the checksum and the message inside a single
   token.  The application should pass the token to the peer
   application, which presents it to the unwrap method of the peer's
   GSSContext object to extract the message and verify the checksum.

   Either pair of routines may be capable of detecting out-of-sequence
   message delivery, or duplication of messages.  Details of such mis-
   ordered messages are indicated through supplementary query methods of
   the MessageProp object that is filled in by each of these routines.

   A mechanism need not maintain a list of all tokens that have been
   processed in order to support these status codes.  A typical
   mechanism might retain information about only the most recent "N"
   tokens processed, allowing it to distinguish duplicates and missing
   tokens within the most recent "N" messages; the receipt of a token
   older than the most recent "N" would result in the isOldToken
   property of the instance of MessageProp to be set to "true".






Luciani                 Expires January 1 2005                 [Page 10]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.4. Anonymous Authentication

   In certain situations, an application may wish to initiate the
   authentication process to authenticate a peer, without revealing its
   own identity.  As an example, consider an application providing
   access to a database containing medical information, and offering
   unrestricted access to the service.  A client of such a service might
   wish to authenticate the service (in order to establish trust in any
   information retrieved from it), but might not wish the service to be
   able to obtain the client's identity (perhaps due to privacy concerns
   about the specific inquiries, or perhaps simply to avoid being placed
   on mailing-lists).

   In normal use of the GSS-API, the initiator's identity is made
   available to the acceptor as a result of the context establishment
   process.  However, context initiators may request that their identity
   not be revealed to the context acceptor.  Many mechanisms do not
   support anonymous authentication, and for such mechanisms the request
   will not be honored.  An authentication token will still be
   generated, but the application is always informed if a requested
   service is unavailable, and has the option to abort context
   establishment if anonymity is valued above the other security
   services that would require a context to be established.

   In addition to informing the application that a context is
   established anonymously (via the isAnonymous property of the
   GSSContext interface), the srcName property of the acceptor's
   GSSContext object will, for such contexts, be set to a reserved
   internal-form name, defined by the implementation.

   The ToString method for a GSSName object representing an anonymous
   entity will return a printable name.  The returned value will be
   syntactically distinguishable from any valid principal name supported
   by the implementation.  The associated name-type object identifier
   will be an oid representing the value of GSSNameTypes.NT_ANONYMOUS.
   This name-type oid will be defined as a public, static Oid object of
   the GSSName interface.  The printable form of an anonymous name
   should be chosen such that it implies anonymity, since this name may
   appear in, for example, audit logs.  For example, the string
   "<anonymous>" might be a good choice, if no valid printable names
   supported by the implementation can begin with "<" and end with ">".

   When using the equal method of the GSSName interface, and one of the
   operands is a GSSName instance representing an anonymous entity, the
   method must return "false".






Luciani                 Expires January 1 2005                 [Page 11]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.5. Confidentiality

   If a GSSContext supports the confidentiality service, wrap method may
   be used to encrypt application messages.  Messages are selectively
   encrypted, under the control of the setPrivacy property of the
   MessageProp object used in the wrap method.

3.6. Inter-process Context Transfer

   GSS-API V2 provides functionality which allows a security context to
   be transferred between processes on a single machine.  These are
   implemented using the export method of GSSContext and a byte array
   constructor of the same interface.  The most common use for such a
   feature is a client-server design where the server is implemented as
   a single process that accepts incoming security contexts, which then
   launches child processes to deal with the data on these contexts.  In
   such a design, the child processes must have access to the security
   context object created within the parent so that they can use per-
   message protection services and delete the security context when the
   communication session ends.

   Since the security context data structure is expected to contain
   sequencing information, it is impractical in general to share a
   context between processes.  Thus GSSContext interface provides an
   export method that the process, which currently owns the context, can
   call to declare that it has no intention to use the context
   subsequently, and to create an inter-process token containing
   information needed by the adopting process to successfully re-create
   the context.  After successful completion of export, the original
   security context is made inaccessible to the calling process by GSS-
   API and any further usage of this object will result in failures.
   The originating process transfers the inter-process token to the
   adopting process, which creates a new GSSContext object using the
   byte array constructor.  The properties of the context are equivalent
   to that of the original context.

   The inter-process token may contain sensitive data from the original
   security context (including cryptographic keys).  Applications using
   inter-process tokens to transfer security contexts must take
   appropriate steps to protect these tokens in transit.

   Implementations are not required to support the inter-process
   transfer of security contexts.  Reading the isTransferable property
   of the GSSContext interface will indicate if the context object is
   transferable.






Luciani                 Expires January 1 2005                 [Page 12]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.7. The Use of Incomplete Contexts

   Some mechanisms may allow the per-message services to be used before
   the context establishment process is complete.  For example, a
   mechanism may include sufficient information in its initial context-
   level tokens for the context acceptor to immediately decode messages
   protected with wrap or getMIC.  For such a mechanism, the initiating
   application need not wait until subsequent context-level tokens have
   been sent and received before invoking the per-message protection
   services.

   An application can read the isProtReady property of the GSSContext
   object to determine if the per-message services are available in
   advance of complete context establishment.  Applications wishing to
   use per-message protection services on partially-established contexts
   should query this method before attempting to invoke wrap or getMIC.

4. C# GSS-API Overview

   The C# GSS-API leverages many of the native C# types as well as
   features of the operating environment such as automatic garbage
   collection, exception handling, and encapsulation. This allows for an
   API that is simpler and with fewer functions than the API described
   in RFC 1509 [RFC1509].

   The assemblies implementing GSS-API are not part of the .NET and Mono
   frameworks.  Because of this, it is necessary for the assemblies to
   be installed before they can be used by applications.

   C# GSS-API, unlike its Java counterpart does not allow applications
   to choose between different security providers. The provider utilized
   by the application is determine at application build time based on
   the C# GSS-API assemblies linked in.  The mechanisms supported by the
   C# GSS-API assemblies are not controlled by the application.  C#
   GSS-API assemblies are vendor specific.

   The GSS-API types are present in the org.ietf.gss namespace.

   Applications need to include the following line at the top of their
   listings to make use of the GSS-API types:

   using org.ietf.gss;









Luciani                 Expires January 1 2005                 [Page 13]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


4.1. Object Identifiers

   An Oid object will be used to represent Universal Object Identifiers
   (Oids).  Oids are ISO-defined, hierarchically globally-interpretable
   identifiers used within the GSS-API framework to identify security
   mechanisms and name formats.  The Oid object can be created from a
   string representation of its dot notation (e.g. "1.3.6.1.5.6.2") as
   well as from its ASN.1 DER encoding.  Methods are also provided to
   test equality and provide the DER representation for the object.

   An important feature of the Oid class is that its instances are
   immutable - i.e.  there are no methods defined that allow one to
   change the contents of an Oid.  This property allows one to treat
   these objects as "statics" without the need to perform copies.

   Certain routines allow the usage of a default oid.  A "null" value
   can be used in those cases.

4.2. Object Identifier Sets

   Object identifiers sets are represented as arrays of Oid
   objects.  C# arrays contain a length field which allows for
   easy manipulation and reference.

   In order to support the full functionality of RFC 2743, the Oid class
   includes a method which checks for existence of an Oid object within
   a specified array.  This is equivalent in functionality to
   gss_test_oid_set_member.  The use of C# arrays and C#'s automatic
   garbage collection has eliminated the need for the following
   routines: gss_create_empty_oid_set, gss_release_oid_set, and
   gss_add_oid_set_member.  C# GSS-API implementations will not
   contain them.  C#'s automatic garbage collection and the immutable
   property of the Oid object eliminates the complicated memory
   management issues of the C counterpart.

   When ever a default value for an Object Identifier Set is required, a
   "null" value can be used.  Please consult the detailed method
   description for details.

4.3. Credentials

   GSS-API credentials are represented by the GSSCredential interface.
   The interface contains several constructs to allow for the creation
   of most common credential objects for the initiator and the acceptor.
   Comparisons are performed using the interface's "Equals" method.  The
   following general description of GSS-API credentials is included from
   the C-bindings specification:

   


Luciani                 Expires January 1 2005                 [Page 14]

Internet-Draft          GSS-API V2: C# Bindings            November 2005

   
   GSS-API credentials can contain mechanism-specific principal
   authentication data for multiple mechanisms.  A GSS-API credential is
   composed of a set of credential-elements, each of which is applicable
   to a single mechanism.  A credential may contain at most one
   credential-element for each supported mechanism.  A credential-
   element identifies the data needed by a single mechanism to
   authenticate a single principal, and conceptually contains two
   credential-references that describe the actual mechanism-specific
   authentication data, one to be used by GSS-API for initiating
   contexts, and one to be used for accepting contexts.  For mechanisms
   that do not distinguish between acceptor and initiator credentials,
   both references would point to the same underlying mechanism-specific
   authentication data.

   Credentials describe a set of mechanism-specific principals, and give
   their holder the ability to act as any of those principals.  All
   principal identities asserted by a single GSS-API credential should
   belong to the same entity, although enforcement of this property is
   an implementation-specific matter.  A single GSSCredential object
   represents all the credential elements that have been acquired.

   The creation's of an GSSContext object allows the value of "null" to
   be specified as the GSSCredential input parameter.  This will
   indicate a desire by the application to act as a default principal.
   While individual GSS-API implementations are free to determine such
   default behavior as appropriate to the mechanism, the following
   default behavior by these routines is recommended for portability:

      For the initiator side of the context:

      1) If there is only a single principal capable of initiating
         security contexts for the chosen mechanism that the application
         is authorized to act on behalf of, then that principal shall be
         used, otherwise

      2) If the platform maintains a concept of a default network-
         identity for the chosen mechanism, and if the application is
         authorized to act on behalf of that identity for the purpose of
         initiating security contexts, then the principal corresponding
         to that identity shall be used, otherwise

      3) If the platform maintains a concept of a default local
         identity, and provides a means to map local identities into
         network-identities for the chosen mechanism, and if the
         application is authorized to act on behalf of the network-
         identity image of the default local identity for the purpose of
         initiating security contexts using the chosen mechanism, then
         the principal corresponding to that identity shall be used,
         otherwise


Luciani                 Expires January 1 2005                 [Page 15]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      4) A user-configurable default identity should be used.

      and for the acceptor side of the context

      1) If there is only a single authorized principal identity capable
         of accepting security contexts for the chosen mechanism, then
         that principal shall be used, otherwise

      2) If the mechanism can determine the identity of the target
         principal by examining the context-establishment token
         processed during the accept method, and if the accepting
         application is authorized to act as that principal for the
         purpose of accepting security contexts using the chosen
         mechanism, then that principal identity shall be used,
         otherwise

      3) If the mechanism supports context acceptance by any principal,
         and if mutual authentication was not requested, any principal
         that the application is authorized to accept security contexts
         under using the chosen mechanism may be used, otherwise

      4) A user-configurable default identity shall be used.

   The purpose of the above rules is to allow security contexts to be
   established by both initiator and acceptor using the default behavior
   whenever possible.  Applications requesting default behavior are
   likely to be more portable across mechanisms and implementations than
   ones that instantiate an GSSCredential object representing a specific
   identity.

4.4. Contexts

   The GSSContext interface is used to represent one end of a GSS-API
   security context, storing state information appropriate to that end
   of the peer communication, including cryptographic state information.
   The instantiation of the context object is done differently by the
   initiator and the acceptor.  After the context has been instantiated,
   the initiator may choose to set various context options which will
   determine the characteristics of the desired security context.  When
   all the application desired characteristics have been set, the
   initiator will call the initSecContext method which will produce a
   token for consumption by the peer's acceptSecContext method.  It is
   the responsibility of the application to deliver the authentication
   token(s) between the peer applications for processing.  Upon
   completion of the context establishment phase, context attributes can
   be retrieved, by both the initiator and acceptor, reading the
   properties of the GSSContext object.  These will reflect the actual
   attributes of the established context.  At this point the context can
   be used by the application to apply cryptographic services to its


Luciani                 Expires January 1 2005                 [Page 16]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   data.

4.5. Authentication Tokens

   A token is a caller-opaque type that GSS-API uses to maintain
   synchronization between each end of the GSS-API security context.
   The token is a cryptographically protected octet-string, generated by
   the underlying mechanism at one end of a GSS-API security context for
   use by the peer mechanism at the other end.  Encapsulation (if
   required) within the application protocol and transfer of the token
   are the responsibility of the peer applications.

   C# GSS-API uses byte arrays to represent authentication tokens.
   Overloaded methods exist which allow the caller to supply streams
   which will be used for the reading and writing of the token data.

4.6. Interprocess Tokens

   Certain GSS-API routines are intended to transfer data between
   processes in multi-process programs.  These routines use a caller-
   opaque octet-string, generated by the GSS-API in one process for use
   by the GSS-API in another process.  The calling application is
   responsible for transferring such tokens between processes.  Note
   that, while GSS-API implementors are encouraged to avoid placing
   sensitive information within interprocess tokens, or to
   cryptographically protect them, many implementations will be unable
   to avoid placing key material or other sensitive data within them.
   It is the application's responsibility to ensure that interprocess
   tokens are protected in transit, and transferred only to processes
   that are trustworthy.  An interprocess token is represented using a
   byte array emitted from the export method of the GSSContext
   interface.  The receiver of the interprocess token would initialize
   a GSSContext object with this token to create a new context.  Once a
   context has been exported, the GSSContext object is invalidated.

4.7. Error Reporting

   RFC 2743 defined the usage of major and minor status values for
   signaling of GSS-API errors.  The major code, also called GSS status
   code, is used to signal errors at the GSS-API level independent of
   the underlying mechanism(s).  The minor status value or Mechanism
   status code, is a mechanism defined error value indicating a
   mechanism specific error code.

   C# GSS-API uses exceptions implemented by the GSSException class to
   signal both minor and major error values.  Both mechanism specific
   errors and GSS-API level errors are signaled through instances of
   this class.  The usage of exceptions replaces the need for major and
   minor codes to be used within the API calls.  GSSException class also


Luciani                 Expires January 1 2005                 [Page 17]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   contains methods to obtain textual representations for both the major
   and minor values, which is equivalent to the functionality of
   gss_display_status.

4.7.1. GSS Status Codes

   GSS status codes indicate errors that are independent of the
   underlying mechanism(s) used to provide the security service.  The
   errors that can be indicated via a GSS status code are generic API
   routine errors (errors that are defined in the GSS-API
   specification).  These bindings take advantage of the C# exceptions
   mechanism, thus eliminating the need for calling errors.

   A GSS status code indicates a single fatal generic API error from the
   routine that has thrown the GSSException.  Using exceptions announces
   that a fatal error has occurred during the execution of the method.
   The GSS-API operational model also allows for the signaling of
   supplementary status information from the per-message calls.  These
   need to be handled as return values since using exceptions is not
   appropriate for informatory or warning-like information.  The methods
   that are capable of producing supplementary information are the two
   per-message methods GSSContext.verifyMIC() and GSSContext.unwrap().
   These methods fill the supplementary status codes in the MessageProp
   object that was passed in.

   GSSException object, along with providing the functionality for
   setting of the various error codes and translating them into textual
   representation, also contains the definitions of all the numeric
   error values.  The following table lists the definitions of error
   codes:

      Table: GSS Status Codes

      Name                   Value   Meaning

      BAD_MECH                 1     An unsupported mechanism
                                     was requested.

      BAD_NAME                 2     An invalid name was supplied.

      BAD_NAMETYPE             3     A supplied name was of an
                                     unsupported type.

      BAD_BINDINGS             4     Incorrect channel bindings were
                                     supplied.

      BAD_STATUS               5     An invalid status code was
                                     supplied.



Luciani                 Expires January 1 2005                 [Page 18]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      BAD_MIC                  6     A token had an invalid MIC.

      NO_CRED                  7     No credentials were supplied, or
                                     the credentials were unavailable
                                     or inaccessible.

      NO_CONTEXT               8     Invalid context has been
                                     supplied.

      DEFECTIVE_TOKEN          9     A supplied token was invalid.

      DEFECTIVE_CREDENTIAL    10     A supplied credential was
                                     invalid.

      CREDENTIALS_EXPIRED     11     The referenced credentials
                                     have expired.

      CONTEXT_EXPIRED         12     The context has expired.

      FAILURE                 13     Miscellaneous failure,
                                     unspecified at the GSS-API level.

      BAD_QOP                 14     The quality-of-protection
                                     requested could not be provided.

      UNAUTHORIZED            15     The operation is forbidden by
                                     local security policy.

      UNAVAILABLE             16     The operation or option is
                                     unavailable.

      DUPLICATE_ELEMENT       17     The requested credential
                                     element already exists.

      NAME_NOT_MN             18     The provided name was not a
                                     mechanism name.

      OLD_TOKEN               19     The token's validity period has
                                     expired.

      DUPLICATE_TOKEN         20     The token was a duplicate of an
                                     earlier version.

   The GSS major status code of FAILURE is used to indicate that the
   underlying mechanism detected an error for which no specific GSS
   status code is defined.  The mechanism-specific status code can
   provide more details about the error.

   The different major status codes that can be contained in the


Luciani                 Expires January 1 2005                 [Page 19]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   GSSException object thrown by the methods in this specification are
   the same as the major status codes returned by the corresponding
   calls in RFC 2743.

4.7.2. Mechanism-specific Status Codes

   Mechanism-specific status codes are communicated in two ways, they
   are part of any GSSException thrown from the mechanism specific layer
   to signal a fatal error, or they are part of the MessageProp object
   that the per-message calls use to signal non-fatal errors.

   A default value of 0 in either the GSSException object or the
   MessageProp object will be used to represent the absence of any
   mechanism specific status code.

4.7.3. Supplementary Status Codes

   Supplementary status codes are confined to the per-message methods of
   the GSSContext interface.  Because of the informative nature of these
   errors it is not appropriate to use exceptions to signal them.
   Instead, the per-message operations of the GSSContext interface
   return these values in a MessageProp object.

   The MessageProp class defines boolean properties indicating the
   following supplementary states:

      Table: Supplementary Status Methods

      Method Name        Meaning when set to "true"

      isDuplicateToken   The token was a duplicate of an
                         earlier token.

      isOldToken         The token's validity period has
                         expired.

      isUnseqToken       A later token has already been
                         processed.

      isGapToken         An expected per-message token was
                         not received.

   A "true" value for any of the above properties indicates that the
   token exhibited the specified property.  The application must
   determine the appropriate course of action for these supplementary
   values.  They are not treated as errors by the GSS-API.





Luciani                 Expires January 1 2005                 [Page 20]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


4.8. Names

   A name is used to identify a person or entity.  GSS-API authenticates
   the relationship between a name and the entity claiming the name.

   Since different authentication mechanisms may employ different
   namespaces for identifying their principals, GSS-API's naming support
   is necessarily complex in multi-mechanism environments (or even in
   some single-mechanism environments where the underlying mechanism
   supports multiple namespaces).

   Two distinct conceptual representations are defined for names:

   1) A GSS-API form represented by implementations of the GSSName
      interface: A single GSSName object may contain multiple names from
      different namespaces, but all names should refer to the same
      entity.  An example of such an internal name would be the name
      returned from a call to the getName method of the GSSCredential
      interface, when applied to a credential containing credential
      elements for multiple authentication mechanisms employing
      different namespaces.  This GSSName object will contain a distinct
      name for the entity for each authentication mechanism.

      For GSS-API implementations supporting multiple namespaces,
      GSSName implementations must contain sufficient information to
      determine the namespace to which each primitive name belongs.

   2) Mechanism-specific contiguous byte array and string forms:
      Different GSSName initialization methods are provided to handle
      both byte array and string formats and to accommodate various
      calling applications and name types.  These formats are capable of
      containing only a single name (from a single namespace).
      Contiguous string names are always accompanied by an object
      identifier specifying the namespace to which the name belongs, and
      their format is dependent on the authentication mechanism that
      employs that name.  The string name forms are assumed to be
      printable, and may therefore be used by GSS-API applications for
      communication with their users.  The byte array name formats are
      assumed to be in non-printable formats (e.g. the byte array
      returned from the export method of the GSSName interface).

   A GSSName object can be converted to a contiguous representation by
   using the ToString method.  This will guarantee that the name will be
   converted to a printable format.  Different initialization methods in
   the GSSName interface are defined allowing support for multiple
   syntaxes for each supported namespace, and allowing users the freedom
   to choose a preferred name representation.  The ToString method
   should use an implementation-chosen printable syntax for each
   supported name-type.  To obtain the printable name type, the


Luciani                 Expires January 1 2005                 [Page 21]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   getStringNameType method can be used.

   There is no guarantee that calling the ToString method on the GSSName
   interface will produce the same string form as the original imported
   string name.  Furthermore, it is possible that the name was not even
   constructed from a string representation.  The same applies to name-
   space identifiers which may not necessarily survive unchanged after a
   journey through the internal name-form.  An example of this might be
   a mechanism that authenticates X.500 names, but provides an
   algorithmic mapping of Internet DNS names into X.500.  That
   mechanism's implementation of GSSName might, when presented with a
   DNS name, generate an internal name that contained both the original
   DNS name and the equivalent X.500 name.  Alternatively, it might only
   store the X.500 name.  In the latter case, the ToString method of
   GSSName would most likely generate a printable X.500 name, rather
   than the original DNS name.

   The context acceptor can obtain a GSSName object representing the
   entity performing the context initiation (by reading the srcName
   property).  Since this name has been authenticated by a
   single mechanism, it contains only a single name (even if the
   internal name presented by the context initiator to the GSSContext
   object had multiple components).  Such names are termed internal
   mechanism names, or "MN"s and the property values srcName and
   targName of the GSSContext interface are always of this type.
   Since some applications may require MNs without wanting to incur the
   overhead of an authentication operation, creation methods are
   provided that take not only the name buffer and name type, but also
   the mechanism oid for which this name should be created.  When
   dealing with an existing GSSName object, the canonicalize method may
   be invoked to convert a general internal name into an MN.

   GSSName objects can be compared using their Equal method, which
   returns "true" if the two names being compared refer to the same
   entity.  This is the preferred way to perform name comparisons
   instead of using the printable names that a given GSS-API
   implementation may support.  Since GSS-API assumes that all primitive
   names contained within a given internal name refer to the same
   entity, equal can return "true" if the two names have at least one
   primitive name in common.  If the implementation embodies knowledge
   of equivalence relationships between names taken from different
   namespaces, this knowledge may also allow successful comparisons of
   internal names containing no overlapping primitive elements.

   When used in large access control lists, the overhead of creating an
   GSSName object on each name and invoking the equal method on each
   name from the ACL may be prohibitive.  As an alternative way of
   supporting this case, GSS-API defines a special form of the
   contiguous byte array name which may be compared directly (byte by


Luciani                 Expires January 1 2005                 [Page 22]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   byte).  Contiguous names suitable for comparison are generated by the
   export method.  Exported names may be re-imported by using the byte
   array constructor and specifying the GSSNameTypes.NT_EXPORT_NAME as
   the name type object identifier.  The resulting GSSName name will
   also be a MN.  The GSSName interface defines public static Oid
   objects representing the standard name types.  Structurally, an
   exported name object consists of a header containing an OID
   identifying the mechanism that authenticated the name, and a trailer
   containing the name itself, where the syntax of the trailer is
   defined by the individual mechanism specification.  Detailed
   description of the format is specified in the language-independent
   GSS-API specification [RFC2743].

   Note that the results obtained by using the Equals method will in
   general be different from those obtained by invoking canonicalize and
   export, and then comparing the byte array output.  The first series
   of operation determines whether two (unauthenticated) names identify
   the same principal; the second whether a particular mechanism would
   authenticate them as the same principal.  These two operations will
   in general give the same results only for MNs.

   It is important to note that the above are guidelines as how GSSName
   implementations should behave, and are not intended to be specific
   requirements of how names objects must be implemented.  The mechanism
   designers are free to decide on the details of their implementations
   of the GSSName interface as long as the behavior satisfies the above
   guidelines.

4.9. Channel Bindings

   GSS-API supports the use of user-specified tags to identify a given
   context to the peer application.  These tags are intended to be used
   to identify the particular communications channel that carries the
   context.  Channel bindings are communicated to the GSS-API using the
   ChannelBinding object.  The application may use byte arrays to
   specify the application data to be used in the channel binding as
   well as using instances of the EndPoint class.  The EndPoint for the
   initiator and/or acceptor can be used within an instance of a
   ChannelBinding.  ChannelBinding can be set for the GSSContext object
   by setting the channelBinding property before the first call to init
   or accept has been performed.  The channelBinding property of a
   GSSContext object defaults to "null".  Currently the ChannelBinding
   class only supports addresses of type IP.  Applications that use
   other types of addresses can include them as part of the application
   specific data.

   Conceptually, the GSS-API concatenates the initiator and acceptor
   address information, and the application supplied byte array to form
   an octet string.  The mechanism calculates a MIC over this octet


Luciani                 Expires January 1 2005                 [Page 23]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   string and binds the MIC to the context establishment token emitted
   by init method of the GSSContext interface.  The same bindings are
   set by the context acceptor for its GSSContext object and during
   processing of the accept method a MIC is calculated in the same way.
   The calculated MIC is compared with that found in the token, and if
   the MICs differ, accept will throw a GSSException with the major
   code set to BAD_BINDINGS, and the context will not be established.
   Some mechanisms may include the actual channel binding data in the
   token (rather than just a MIC); applications should therefore not use
   confidential data as channel-binding components.

   Individual mechanisms may impose additional constraints on addresses
   that may appear in channel bindings.  For example, a mechanism may
   verify that the initiator address field of the channel binding
   contains the correct network address of the host system.  Portable
   applications should therefore ensure that they either provide correct
   information for the address fields, or omit setting of the addressing
   information.

5. Introduction to GSS-API Classes and Interfaces

   This section presents a brief description of the classes and
   interfaces that constitute the GSS-API.
 
   This section also shows the corresponding RFC 2743 functionality
   implemented by each of the classes.  Detailed description of these
   classes and their methods is presented in section 6.

5.1. GSSManager Class

   This abstract class serves as a factory to instantiate
   implementations of the GSS-API interfaces and also provides methods
   to make queries about underlying security mechanisms.

   A default implementation can be obtained using the static method
   getInstance().  Applications that desire to provide their own
   implementation of the GSSManager class can simply extend the abstract
   class themselves.

   This class contains equivalents of the following RFC 2743 routines:

   gss_import_name              Create an internal name from the
                                supplied information.
 
   gss_acquire_cred             Acquire credential for use.

   gss_import_sec_context       Create a previously exported context.




Luciani                 Expires January 1 2005                 [Page 24]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   gss_indicate_mechs           List the mechanisms supported by this
                                GSS-API implementation.

   gss_inquire_mechs_for_name   List the mechanisms supporting the
                                specified name type.

   gss_inquire_names_for_mech   List the name types supported by the
                                specified mechanism.

5.2. GSSName Interface

   GSS-API names are represented in the C# bindings through the
   GSSName interface.  Different name formats and their definitions are
   identified with universal Object Identifiers (oids).  The format of
   the names can be derived based on the unique oid of each name type.
   The following GSS-API routines are provided by the GSSName interface:

   RFC 2743 Routine                 Function

   gss_display_name        Covert internal name representation to text
                           format.

   gss_compare_name        Compare two internal names.
 
   gss_canonicalize_name   Convert an internal name to a mechanism name.

   gss_export_name         Convert a mechanism name to export format.

   The gss_release_name call is not provided as C# does its own
   garbage collection.  The gss_duplicate_name call is also redundant;
   the GSSName interface has no methods that can change the state of the
   object so it is safe for sharing.

5.3. GSSCredential Interface

   The GSSCredential interface is responsible for the encapsulation of
   GSS-API credentials.  Credentials identify a single entity and
   provide the necessary cryptographic information to enable the
   creation of a context on behalf of that entity.  A single credential
   may contain multiple mechanism specific credentials, each referred to
   as a credential element.  The GSSCredential interface provides the
   functionality of the following GSS-API routines:

   RFC 2743 Routine               Function

   gss_add_cred               Constructs credentials incrementally.

   gss_inquire_cred           Obtain information about credential.



Luciani                 Expires January 1 2005                 [Page 25]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   gss_inquire_cred_by_mech   Obtain per-mechanism information about
                              a credential.

   gss_release_cred           Disposes of credentials after use.

5.4. GSSContext Interface

   This interface encapsulates the functionality of context-level calls
   required for security context establishment and management between
   peers as well as the per-message services offered to applications.  A
   context is established between a pair of peers and allows the usage
   of security services on a per-message basis on application data.  It
   is created over a single security mechanism.  The GSSContext
   interface provides the functionality of the following GSS-API
   routines:

   RFC 2743 Routine                 Function
   
   gss_init_sec_context     Initiate the creation of a security context
                            with a peer.
 
   gss_accept_sec_context   Accept a security context initiated by a
                            peer.
 
   gss_delete_sec_context   Destroy a security context.
 
   gss_context_time         Obtain remaining context time.

   gss_inquire_context      Obtain context characteristics.
 
   gss_wrap_size_limit      Determine token-size limit for gss_wrap.

   gss_export_sec_context   Transfer security context to another
                            process.

   gss_get_mic              Calculate a cryptographic Message Integrity
                            Code (MIC) for a message.

   gss_verify_mic           Verify integrity on a received message.
 
   gss_wrap                 Attach a MIC to a message and optionally
                            encrypt the message content.

   gss_unwrap               Obtain a previously wrapped application
                            message verifying its integrity and
                            optionally decrypting it.

   The functionality offered by the gss_process_context_token routine
   has not been included in the C# bindings specification.  The


Luciani                 Expires January 1 2005                 [Page 26]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   corresponding functionality of gss_delete_sec_context has also been
   modified to not return any peer tokens.  This has been proposed in
   accordance to the recommendations stated in RFC 2743.  GSSContext
   does offer the functionality of destroying the locally-stored context
   information.

5.5. MessageProp Class

   This helper class is used in the per-message operations on the
   context.  An instance of this class is created by the application and
   then passed into the per-message calls.  In some cases, the
   application conveys information to the GSS-API implementation through
   this object and in other cases the GSS-API returns information to the
   application by setting it in this object.  See the description of the
   per-message operations wrap, unwrap, getMIC, and verifyMIC in the
   GSSContext interface for details.

5.6. GSSException Class

   Exceptions are used in the C# bindings to signal fatal errors to
   the calling applications.  This replaces the major and minor codes
   used in the C-bindings specification as a method of signaling
   failures.  The GSSException class handles both minor and major codes,
   as well as their translation into textual representation.  All GSS-
   API methods can throw this exception.

   RFC 2743 Routine           Function
   
   gss_display_status   Retrieve textual representation of
                        error codes.

5.7. Oid Class

   This utility class is used to represent Universal Object Identifiers
   and their associated operations.  GSS-API uses object identifiers to
   distinguish between security mechanisms and name types.  This class,
   aside from being used whenever an object identifier is needed,
   implements the following GSS-API functionality:

   RFC 2743 Routine                  Function

   gss_test_oid_set_member   Determine if the specified oid is part of a
                             set of oids.

5.8. ChannelBinding Class

   An instance of this class is used to specify channel binding
   information to the GSSContext object before the start of a security
   context establishment.  The application may use a byte array to


Luciani                 Expires January 1 2005                 [Page 27]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   specify application data to be used in the channel binding as well as
   use instances of the EndPoint.  Currently the ChannelBinding class
   only supports addresses of type IP.  Applications that use other
   types of addresses can include them as part of the application
   specific data.
   
5.9. GSSConstants Class

   This utility class defines various constants utilized throughout the
   API.
   
5.10. GSSNameTypes Class

   This class defines OIDs which specify different types of GSSNames.
   
5.11. GSSCredentialUsage Enumeration

   This enumeration defines the usage categories for GSSCredentials.
   GSSCredentials can be used for context initiation and context
   acceptance or only one of those functions.


6. Detailed GSS-API Description

   This section lists a detailed description of all the public methods
   that each of the GSS-API classes and interfaces must provide.

6.1. public abstract class GSSManager

   The GSSManager class is an abstract class that serves as a factory
   for three GSS interfaces: GSSName, GSSCredential, and GSSContext.  It
   also provides methods for applications to determine what mechanisms
   are available from the GSS implementation and what nametypes these
   mechanisms support.  An instance of the default GSSManager subclass
   may be obtained through the static method getInstance(), but
   applications are free to instantiate other subclasses of GSSManager.

   All but one method in this class are declared abstract.  This means
   that subclasses have to provide the complete implementation for those
   methods.  The only exception to this is the static method
   getInstance() which will have platform specific code to return an
   instance of the default subclass.

   Platform providers of GSS are required not to add any constructors to
   this class, private, public, or protected.  This will ensure that all
   subclasses invoke only the default constructor provided to the base
   class by the compiler.




Luciani                 Expires January 1 2005                 [Page 28]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.1. Example Code

   GSSManager mgr = GSSManager.getInstance();

   // What mechs are available to us?
   Oid[] supportedMechs = mgr.getMechs();

   // What name types does this spkm implementation support?
   Oid[] nameTypes = mgr.getNamesForMech(spkm1);

6.1.2. getInstance

   public static GSSManager getInstance();

   Returns the default GSSManager implementation.

   Throws GSSException if an error is detected.

6.1.3. getMechs

   public abstract Oid[] getMechs();

   Returns an array of Oid objects indicating mechanisms available to
   GSS-API callers.  A "null" value is returned when no mechanism are
   available (an example of this would be when mechanism are dynamically
   configured, and currently no mechanisms are installed).

   Throws GSSException if an error is detected.

6.1.4. getNamesForMech

   public abstract Oid[] getNamesForMech(Oid mech);

   Returns name type Oid's supported by the specified mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      mech      The Oid object for the mechanism to query.

6.1.5. getMechsForName

   public abstract  Oid[] getMechsForName(Oid nameType);

   Returns an array of Oid objects corresponding to the mechanisms that
   support the specific name type.  "null" is returned when no
   mechanisms are found to support the specified name type.



Luciani                 Expires January 1 2005                 [Page 29]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Throws GSSException if an error is detected.

   Parameters:

      nameType  The Oid object for the name type.

6.1.6. createName

   public abstract GSSName createName(string nameStr,
                                      Oid nameType);

   Factory method to convert a contiguous string name from the specified
   namespace to a GSSName object.  In general, the GSSName object
   created will not be an MN; two examples that are exceptions to this
   are when the namespace type parameter indicates
   GSSNameTypes.NT_EXPORT_NAME or when the GSS-API implementation is not
   multi-mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      nameStr   The string representing a printable form of the name
                to create.

      nameType  The Oid specifying the namespace of the printable name
                supplied.  Note that nameType serves to describe and
                qualify the interpretation of the input nameStr, it
                does not necessarily imply a type for the output
                GSSName implementation.  "null" value specifies that a
                mechanism specific default printable syntax should be
                assumed by each mechanism that examines nameStr.

6.1.7. createName

   public abstract GSSName createName(byte[] name,
                                      Oid nameType);

   Factory method to convert a contiguous byte array containing a name
   from the specified namespace to a GSSName object.  In general, the
   GSSName object created will not be an MN; two examples that are
   exceptions to this are when the namespace type parameter indicates
   GSSNameTypes.NT_EXPORT_NAME or when the GSS-API implementation is not
   multi-mechanism.

   Throws GSSException if an error is detected.





Luciani                 Expires January 1 2005                 [Page 30]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Parameters:

      name      The byte array containing the name to create.
      
      nameType  The Oid specifying the namespace of the name supplied
                in the byte array.  Note that nameType serves to
                describe and qualify the interpretation of the input
                name byte array, it does not necessarily imply a type
                for the output GSSName implementation.  "null" value can
                be used to specify that a mechanism specific default
                syntax should be assumed by each mechanism that examines
                the byte array.

6.1.8. createName

   public abstract GSSName createName(string nameStr,
                                      Oid nameType,
                                      Oid mech);
 
   Factory method to convert a contiguous string name from the specified
   namespace to an GSSName object that is a mechanism name (MN).  In
   other words, this method is a utility that does the equivalent of two
   steps: the createName described in 6.1.6 and then also the
   GSSName.canonicalize() described in 6.2.5.

   Throws GSSException if an error is detected.

   Parameters:

      nameStr   The string representing a printable form of the name
                to create.

      nameType  The Oid specifying the namespace of the printable name
                supplied.  Note that nameType serves to describe and
                qualify the interpretation of the input nameStr, it
                does not necessarily imply a type for the output
                GSSName implementation.  "null" value can be used to
                specify that a mechanism specific default printable
                syntax should be assumed when the mechanism examines
                nameStr.

      mech      Oid specifying the mechanism for which this name
                should be created.








Luciani                 Expires January 1 2005                 [Page 31]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.9. createName

   public abstract GSSName createName(byte[] name,
                                      Oid nameType,
                                      Oid mech);

   Throws GSSException if an error is detected.

   Factory method to convert a contiguous byte array containing a name
   from the specified namespace to a GSSName object that is an MN.  In
   other words, this method is a utility that does the equivalent of two
   steps: the createName described in 6.1.7 and then also the
   GSSName.canonicalize() described in 6.2.5.

   Parameters:

      name      The byte array representing the name to create.

      nameType  The Oid specifying the namespace of the name supplied
                in the byte array.  Note that nameType serves to
                describe and qualify the interpretation of the input
                name byte array, it does not necessarily imply a type
                for the output GSSName implementation.  "null" value
                can be used to specify that a mechanism specific
                default syntax should be assumed by each mechanism
                that examines the byte array.

      mech      Oid specifying the mechanism for which this name
                should be created.

6.1.10. createCredential

   public abstract GSSCredential createCredential(int usage);

   Factory method for acquiring default credentials.  This will cause
   the GSS-API to use system specific defaults for the set of
   mechanisms, name, and a DEFAULT lifetime.

   Throws GSSException if an error is detected.

   Parameters:

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY



Luciani                 Expires January 1 2005                 [Page 32]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.11. createCredential

   public abstract GSSCredential createCredential(GSSName aName,
                                                  int lifetime,
                                                  Oid mech,
                                                  int usage);

   Throws GSSException if an error is detected.

   Factory method for acquiring a single mechanism credential.

   Parameters:

      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.

      lifetime  The number of seconds that credentials should remain
                valid.  Use GSSCredential.INDEFINITE_LIFETIME to
                request that the credentials have the maximum
                permitted lifetime.  Use GSSCredential.DEFAULT_LIFETIME
                to request default credential lifetime.

      mech      The oid of the desired mechanism.  Use "(Oid) null" to
                request the default mechanism(s).

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY

6.1.12. createCredential

   public abstract GSSCredential createCredential(GSSName aName,
                                                  int lifetime,
                                                  Oid mechs[],
                                                  int usage);

   Factory method for acquiring credentials over a set of mechanisms.
   Acquires credentials for each of the mechanisms specified in the
   array called mechs.  To determine the list of mechanisms for which
   the acquisition of credentials succeeded, the caller should use the
   GSSCredential.getMechs() method.

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 33]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Parameters:
   
      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.

      lifetime  The number of seconds that credentials should remain
                valid.  Use GSSCredential.INDEFINITE_LIFETIME to
                request that the credentials have the maximum
                permitted lifetime.  Use GSSCredential.DEFAULT_LIFETIME
                to request default credential lifetime.

      mechs     The array of mechanisms over which the credential is
                to be acquired.  Use "(Oid[]) null" for requesting a
                system specific default set of mechanisms.

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY

6.1.13. createContext

   public abstract GSSContext createContext(GSSName peer,
                                            Oid mech,
                                            GSSCredential myCred,
                                            int lifetime);

   Factory method for creating a context on the initiator's side.
   Context flags may be modified through the mutator methods prior to
   calling GSSContext.initSecContext().

   Throws GSSException if an error is detected.

   Parameters:

      peer      Name of the target peer.

      mech      Oid of the desired mechanism.  Use "(Oid) null" to
                request default mechanism.

      myCred    Credentials of the initiator.  Use "null" to act as a
                default initiator principal.






Luciani                 Expires January 1 2005                 [Page 34]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      lifetime  The request lifetime, in seconds, for the context.
                Use GSSContext.INDEFINITE_LIFETIME and
                GSSContext.DEFAULT_LIFETIME to request indefinite or
                default context lifetime.

6.1.14. createContext

   public abstract GSSContext createContext(GSSCredential myCred);

   Factory method for creating a context on the acceptor' side.  The
   context's properties will be determined from the input token supplied
   to the accept method.

   Throws GSSException if an error is detected.

   Parameters:

      myCred    Credentials for the acceptor.  Use "null" to act as a
                default acceptor principal.

6.1.15. createContext

   public abstract GSSContext createContext(byte[] interProcessToken);

   Factory method for creating a previously exported context.  The
   context properties will be determined from the input token and can't
   be modified through the set methods.

   Throws GSSException if an error is detected.

   Parameters:                               

      interProcessToken  The token previously emitted from the export
                         method.

6.2. public class GSSConstants

   This class defines constants that are common among various interfaces
   and/or classes of the API.

6.2.1. DEFAULT_LIFETIME

   const int DEFAULT_LIFETIME = 0;

   A constant representing the default lifetime for a context or
   credential.




   
Luciani                 Expires January 1 2005                 [Page 35]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.2.2. INDEFINITE_LIFETIME

   const int INDEFINITE_LIFETIME = Int32.MaxValue;

   A constant representing indefinite lifetime for a context or
   credential.

6.3. public class GSSNameTypes

   This class defines the various types of GSSNames.

6.3.1. NT_HOSTBASED_SERVICE

   public static Oid NT_HOSTBASED_SERVICE;

   Property which indicates Oid of name type of a host-based service
   name form.  It is used to represent services associated with host
   computers.  This name form is constructed using two elements,
   "service" and "hostname", as follows:

        service@hostname

   Values for the "service" element are registered with the IANA. It
   represents the following value: { 1(iso), 3(org), 6(dod),
   1(internet), 5(security), 6(nametypes), 2(gss-host-based-services) }
   
6.3.2. NT_USER_NAME

   public static Oid NT_USER_NAME;

   Property which indicates Oid of name type of a named user on a local
   system.  It represents the following value: { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   1(user_name) }
   
6.3.3. NT_MACHINE_UID_NAME

   public static Oid NT_MACHINE_UID_NAME;

   Property which indicates Oid of name type of a numeric user
   identifier corresponding to a user on a local system. (e.g. Uid).
   It represents the following value: { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   2(machine_uid_name) }






   
Luciani                 Expires January 1 2005                 [Page 36]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.3.4. NT_STRING_UID_NAME

   public static Oid NT_STRING_UID_NAME;

   Property which indicates Oid of name type of a string of digits
   representing the numeric user identifier of a user on a local system.
   It represents the following value:  { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   3(string_uid_name) }
   
6.3.5. NT_ANONYMOUS

   public static Oid NT_ANONYMOUS;

   Property which indicates Oid of name type of an anonymous entity.
   It represents the following value: { 1(iso), 3(org), 6(dod),
   1(internet), 5(security), 6(nametypes), 3(gss-anonymous-name) }
   
6.3.6. NT_EXPORT_NAME

   public static Oid NT_EXPORT_NAME;

   Property which indicates Oid of name type of an exported name
   produced by the export method.  It represents the following value:
   { 1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
   4(gss-api-exported-name) }

























Luciani                 Expires January 1 2005                 [Page 37]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4. public interface GSSName

   This interface encapsulates a single GSS-API principal entity.
   Different name formats and their definitions are identified with
   universal Object Identifiers (Oids).  The format of the names can be
   derived based on the unique oid of its namespace type.
   
6.4.1. Example Code

   Included below are code examples utilizing the GSSName interface.
   The code below creates a GSSName, converts it to a mechanism name
   (MN), performs a comparison, obtains a printable representation of
   the name, exports it and then re-imports to obtain a new GSSName.

   GSSManager mgr = GSSManager.getInstance();

   // create a host based service name
   GSSName name = mgr.createName("service@host",
                                 GSSNameTypes.NT_HOSTBASED_SERVICE);

   Oid krb5 = new Oid("1.2.840.113554.1.2.2");

   GSSName mechName = name.canonicalize(krb5);

   // the above two steps are equivalent to the following
   GSSName mechName = mgr.createName("service@host",
                                     GSSNameTypes.NT_HOSTBASED_SERVICE,
                                     krb5);

   // perform name comparison
   if (name.Equals(mechName))
      Console.WriteLine("Names are equals.");

   // obtain textual representation of name and its printable
   // name type
   Console.WriteLine(mechName.ToString() +
                     mechName.getStringNameType().ToString());

   // export and re-import the name
   byte[] exportName = mechName.export();

   // create a new name object from the exported buffer
   GSSName newName = mgr.createName(exportName,
                                    GSSNameTypes.NT_EXPORT_NAME);







Luciani                 Expires January 1 2005                 [Page 38]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4.2. Equals

   bool Equals(GSSName another);
 
   Compares two GSSName objects to determine whether they refer to the
   same entity.  If either of the names represents an anonymous
   entity, the method will return "false".

   Throws GSSException if an error is detected.

   Parameters:

      another   GSSName object to compare with.

6.4.3. Equals

   bool Equals(Object another);

   A variation of the equals method described in 6.2.3 that is provided
   to override the Object.Equals() method that the implementing class
   will inherit.  The behavior is exactly the same as that in 6.2.3
   except that no GSSException is thrown; instead, false will be
   returned in the situation where an error occurs.  (Note that the C#
   language specification requires that two objects that are equal
   according to the Equals(Object) method must return the same integer
   result when the GetHashCode() method is called on them.)

   Parameters:

      another   GSSName object to compare with.

6.4.4. canonicalize

   GSSName canonicalize(Oid mech);
 
   Creates a mechanism name (MN) from an arbitrary internal name.  This
   is equivalent to using the factory methods described in 6.1.8 or
   6.1.9 that take the mechanism name as one of their parameters.

   Throws GSSException if an error is detected.

   Parameters:

      mech      The oid for the mechanism for which the canonical form
                of the name is requested.






Luciani                 Expires January 1 2005                 [Page 39]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4.5. export

   byte[] export();

   Returns a canonical contiguous byte representation of a mechanism
   name (MN), suitable for direct, byte by byte comparison by
   authorization functions.  If the name is not an MN, implementations
   may throw a GSSException with the NAME_NOT_MN status code.  If an
   implementation chooses not to throw an exception, it should use some
   system specific default mechanism to canonicalize the name and then
   export it.  The format of the header of the output buffer is
   specified in RFC 2743.

6.4.6. ToString

   string ToString();

   Returns a textual representation of the GSSName object.  To retrieve
   the printed name format, which determines the syntax of the returned
   string, the getStringNameType method can be used.

   Throws GSSException if an error is detected.

6.4.7. stringNameType

   Oid stringNameType;

   Property of the object containing the oid representing the type of
   name returned through the ToString method.  Using this oid, the
   syntax of the printable name can be determined.

   Throws GSSException if an error is detected.

6.4.8. isAnonymous

   bool isAnonymous;

   Property which indicates whether the name object represents an
   anonymous entity or not.  If "true" then it is an anonymous name.

6.4.9. isMN

   bool isMN;

   Property which indicates whether the name object contains only one
   mechanism element and is a mechanism name as defined by RFC 2743.





Luciani                 Expires January 1 2005                 [Page 40]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.5. public enum GSSCredentialUsage

   This enumeration defines the usage categories for credentials.

6.5.1. INITIATE_AND_ACCEPT

   Credentials of this type can be used for both context initiation
   and acceptance.
   
6.5.2. INITIATE_ONLY

   Credentials of this type can be used for context initiation only.
   
6.5.3. ACCEPT_ONLY

   Credentials of this type can be used for context acceptance only.
   
6.6. public interface GSSCredential: ICloneable

   This interface encapsulates the GSS-API credentials for an entity.  A
   credential contains all the necessary cryptographic information to
   enable the creation of a context on behalf of the entity that it
   represents.  It may contain multiple, distinct, mechanism specific
   credential elements, each containing information for a specific
   security mechanism, but all referring to the same entity.

   A credential may be used to perform context initiation, acceptance,
   or both.

   GSS-API implementations must impose a local access-control policy on
   callers to prevent unauthorized callers from acquiring credentials to
   which they are not entitled.  GSS-API credential creation is not
   intended to provide a "login to the network" function, as such a
   function would involve the creation of new credentials rather than
   merely acquiring a handle to existing credentials.  Such functions,
   if required, should be defined in implementation-specific extensions
   to the API.

   If credential acquisition is time-consuming for a mechanism, the
   mechanism may choose to delay the actual acquisition until the
   credential is required (e.g.  by GSSContext).  Such mechanism-
   specific implementation decisions should be invisible to the calling
   application; thus the query methods immediately following the
   creation of a credential object must return valid credential data,
   and may therefore incur the overhead of a deferred credential
   acquisition.




   
Luciani                 Expires January 1 2005                 [Page 41]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Applications will create a credential object passing the desired
   parameters.  The application can then use the query methods to obtain
   specific information about the instantiated credential object
   (equivalent to the gss_inquire routines).  When the credential is no
   longer needed, the application should call the dispose (equivalent to
   gss_release_cred) method to release any resources held by the
   credential object and to destroy any cryptographically sensitive
   information.

   Classes implementing this interface also implement the ICloneable
   interface.  This indicates that the class will support the Clone()
   method that will allow the creation of duplicate credentials.  This
   is useful when called just before the add() call to retain a copy of
   the original credential.

6.6.1. Example Code

   This example code demonstrates the creation of a GSSCredential
   implementation for a specific entity, querying of its fields, and its
   release when it is no longer needed.

   GSSManager mgr = GSSManager.getInstance();

   // start by creating a name object for the entity
   GSSName name = mgr.createName("userName", GSSNameTypes.NT_USER_NAME);

   // now acquire credentials for the entity
   GSSCredential cred = mgr.createCredential(name,
                                        GSSCredentialUsage.ACCEPT_ONLY);

   // display credential information - name, remaining lifetime,
   // and the mechanisms it has been acquired over
   Console.WriteLine(cred.getName().ToString());
   Console.WriteLine(cred.getRemainingLifetime());

   Oid[] mechs = cred.getMechs();
   if (mechs != null) {
      for (int i = 0; i < mechs.length; i++)
         Console.WriteLine(mechs[i].ToString());
   }

   // release system resources held by the credential
   cred.dispose();








Luciani                 Expires January 1 2005                 [Page 42]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.2. dispose

   void dispose();

   Releases any sensitive information that the GSSCredential object may
   be containing.  Applications should call this method as soon as the
   credential is no longer needed to minimize the time any sensitive
   information is maintained.

   Throws GSSException if an error is detected.

6.6.3. getName

   GSSName getName();
 
   Retrieves the name of the entity that the credential asserts.

   Throws GSSException if an error is detected.

6.6.4. getName

   GSSName getName(Oid mechOID);
 
   Retrieves a mechanism name of the entity that the credential asserts.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.5. getRemainingLifetime

   int getRemainingLifetime();

   Returns the remaining lifetime in seconds for a credential.  The
   remaining lifetime is the minimum lifetime for any of the underlying
   credential mechanisms.  A return value of
   GSSConstants.INDEFINITE_LIFETIME indicates that the credential does
   not expire.  A return value of 0 indicates that the credential is
   already expired.

   Throws GSSException if an error is detected.







Luciani                 Expires January 1 2005                 [Page 43]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.6. getRemainingInitLifetime

   int getRemainingInitLifetime(Oid mech);
 
   Returns the remaining lifetime is seconds for the credential to
   remain capable of initiating security contexts under the specified
   mechanism.  A return value of GSSConstants.INDEFINITE_LIFETIME
   indicates that the credential does not expire for context initiation.
   A return value of 0 indicates that the credential is already expired.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.7. getRemainingAcceptLifetime

   int getRemainingAcceptLifetime(Oid mech);
 
   Returns the remaining lifetime is seconds for the credential to
   remain capable of accepting security contexts under the specified
   mechanism.  A return value of GSSConstants.INDEFINITE_LIFETIME
   indicates that the credential does not expire for context acceptance.
   A return value of 0 indicates that the credential is already expired.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.8. getUsage

   GSSCredentialUsage getUsage();

   Returns the usage category for the credential.

   Throws GSSException if an error is detected.










Luciani                 Expires January 1 2005                 [Page 44]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.9. getUsage

   GSSCredentialUsage getUsage(Oid mechOID);
 
   Returns the usage category for the specified credential mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.10. getMechs

   Oid[] getMechs();

   Returns an array of mechanisms supported by this credential.

   Throws GSSException if an error is detected.

6.6.11. add

   void add(GSSName aName,
            int initLifetime,
            int acceptLifetime,
            Oid mech,
            int usage);
 
   Adds a mechanism specific credential-element to an existing
   credential.  This method allows the construction of credentials one
   mechanism at a time.

   This routine is envisioned to be used mainly by context acceptors
   during the creation of acceptance credentials which are to be used
   with a variety of clients using different security mechanisms.

   This routine adds the new credential element "in-place".  To add the
   element in a new credential, first call Clone() to obtain a copy of
   this credential, then call its add() method.

   Throws GSSException if an error is detected.

   Parameters:

      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.



Luciani                 Expires January 1 2005                 [Page 45]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      initLifetime
                The number of seconds that credentials should remain
                valid for initiating of security contexts.  Use
                GSSCredential.INDEFINITE_LIFETIME to request that the
                credentials have the maximum permitted lifetime.  Use
                GSSCredential.DEFAULT_LIFETIME to request default
                credential lifetime.

      acceptLifetime
                The number of seconds that credentials should remain
                valid for accepting of security contexts.  Use
                GSSCredential.INDEFINITE_LIFETIME to request that the
                credentials have the maximum permitted lifetime.  Use
                GSSCredential.DEFAULT_LIFETIME to request default
                credential lifetime.

      mech      The mechanisms over which the credential is to be
                acquired.

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:
                GSSCredential.ACCEPT_AND_INITIATE,
                GSSCredential.ACCEPT_ONLY, GSSCredential.INITIATE_ONLY

6.6.12. Equals

   bool Equals(Object another);

   Tests if this GSSCredential refers to the same entity as the supplied
   object.  The two credentials must be acquired over the same
   mechanisms and must refer to the same principal.  Returns "true" if
   the two GSSCredentials refer to the same entity; "false" otherwise.

   Parameters:

      another   Another GSSCredential object for comparison.















Luciani                 Expires January 1 2005                 [Page 46]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7. public interface GSSContext

   This interface encapsulates the GSS-API security context and provides
   the security services (wrap, unwrap, getMIC, verifyMIC) that are
   available over the context.  Security contexts are established
   between peers using locally acquired credentials.  Multiple contexts
   may exist simultaneously between a pair of peers, using the same or
   different set of credentials.  GSS-API functions in a manner
   independent of the underlying transport protocol and depends on its
   calling application to transport its tokens between peers.

   Before the context establishment phase is initiated, the context
   initiator may request specific characteristics desired of the
   established context.  These can be set by manipulating the
   GSSContext properties.  After the context is established, the caller
   can check the actual characteristic and services offered by the
   context by examining the GSSContext properties.

   The context establishment phase begins with the first call to the
   init method by the context initiator.  During this phase the
   initSecContext and acceptSecContext methods will produce GSS-API
   authentication tokens which the calling application needs to send to
   its peer.  If an error occurs at any point, an exception will get
   thrown and the code will start executing in a catch block.  If not,
   the normal flow of code continues and the application can read the
   isEstablished property.  If this property is false it indicates that
   a token is needed from its peer in order to continue the context
   establishment phase.  A setting of true signals that the local end of
   the context is established.  This may still require that a token be
   sent to the peer, if one is produced by GSS-API.  During the context
   establishment phase, the isProtReady property indicates whether or
   not the context can be used for the per-message operations.  This
   allows applications to use per-message operations on contexts which
   aren't fully established.

   After the context has been established or the isProtReady property is
   "true", the query routines can be invoked to determine the actual
   characteristics and services of the established context.  The
   application can also start using the per-message methods of wrap and
   getMIC to obtain cryptographic operations on application supplied
   data.

   When the context is no longer needed, the application should call
   dispose to release any system resources the context may be using.







Luciani                 Expires January 1 2005                 [Page 47]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.1. Example Code

   The example code presented below demonstrates the usage of the
   GSSContext interface for the initiating peer.  Different operations
   on the GSSContext object are presented, including: object
   instantiation, setting of desired flags, context establishment, query
   of actual context flags, per-message operations on application data,
   and finally context deletion.

   GSSManager mgr = GSSManager.getInstance();

   // start by creating the name for a service entity
   GSSName targetName = mgr.createName("service@host",
                                     GSSNameTypes.NT_HOSTBASED_SERVICE);

   // create a context using default credentials for the above entity
   // and the implementation specific default mechanism
   GSSContext context = mgr.createContext(targetName,
                                     null, /* default mechanism */
                                     null, /* default credentials */
                                     GSSConstants.INDEFINITE_LIFETIME);

   // set desired context options - all others are false by default
   context.confidentiality = true;
   context.mutualAuthentication = true;
   context.replayDetection = true;
   context.sequenceDetection = true;

   // establish a context between peers - using byte arrays
   byte[] inTok = new byte[0];

   try {
      do {
         byte[] outTok = context.initSecContext(inTok,
                                                0,
                                                inTok.length);

         // send the token if present
         if (outTok != null)
            sendToken(outTok);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         inTok = readToken();

      } while (true);


Luciani                 Expires January 1 2005                 [Page 48]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }

   // display context information
   Console.Writeline("Remaining lifetime in seconds = " +
                     context.lifetime);
   Console.Writeline("Context mechanism = " + context.Mech.ToString());
   Console.Writeline("Initiator = " + context.srcName.ToString());
   Console.Writeline("Acceptor = " + context.targName.ToString());

   if (context.confidentiality)
      Console.Writeline("Confidentiality security service available"); 

   if (context.integrity)
      Console.Writeline("Integrity security service available");

   // perform wrap on an application supplied message, appMsg,
   // using QOP = 0, and requesting privacy service
   byte[] appMsg ...

   MessageProp mProp = new MessageProp(0, true);

   byte[] tok = context.wrap(appMsg, 0, appMsg.length, mProp);

   if (mProp.privacy)
      Console.Writeline("Message protected with privacy.");

   sendToken(tok);

   // release the local-end of the context
   context.dispose();



















Luciani                 Expires January 1 2005                 [Page 49]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.2. initSecContext

   byte[] initSecContext(byte[] inputBuf,
                         int offset,
                         int len);

   Called by the context initiator to start the context creation
   process.  This is equivalent to the stream based method except that
   the token buffers are handled as byte arrays instead of using stream
   objects.  This method may return an output token which the
   application will need to send to the peer for processing by the
   accept call.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to the initSecContext method.
   Note that it is possible for the initSecContext() method to return a
   token for the peer when isEstablished is set to "true".  This
   indicates that the token needs to be sent to the peer, but the local
   end of the context is now fully established.

   Throws GSSException if an error is detected.

   Parameters:

      inputBuf  Token generated by the peer.  This parameter is ignored
                on the first call.

      offset    The offset within the inputBuf where the token begins.

      len       The length of the token within the inputBuf (starting
                at the offset).




















Luciani                 Expires January 1 2005                 [Page 50]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.2.1. Example Code

   // Create a new GSSContext implementation object.
   // GSSContext wrapper implements interface GSSContext.
   GSSContext context = mgr.createContext(...);

   byte[] inTok = new byte[0];

   try {
      do {
         byte[] outTok = context.initSecContext(inTok,
                                                0,
                                                inTok.length);

         // send the token if present
         if (outTok != null)
            sendToken(outTok);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         inTok = readToken();

      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }





















Luciani                 Expires January 1 2005                 [Page 51]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.3. initSecContext

   void initSecContext(Stream inStream,
                       Stream outStream);
 
   Called by the context initiator to start the context creation
   process.  This is equivalent to the byte array based method.  This
   method may write an output token to the outStream, which the
   application will need to send to the peer for processing by the
   accept call.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to the initSecContext method.
   Note that it is possible that the initSecContext() method to return a
   token for the peer when isEstablished is set to "true".  This
   indicates that the token needs to be sent to the peer, but the local
   end of the context is now fully established.

   The GSS-API authentication tokens contain a definitive start and end.
   This method will attempt to read one of these tokens per invocation,
   and may block on the stream if only part of the token is available.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream to read the token generated by the peer.  This
                parameter is ignored on the first call.

      outStream Stream where the output token will be written.
                During the final stage of context establishment, there
                may be no bytes written.



















Luciani                 Expires January 1 2005                 [Page 52]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.3.1. Example Code

   // Create a new GSSContext implementation object.

   // GSSContext wrapper implements interface GSSContext.
   GSSContext context = mgr.createContext(...);

   MemoryStream os = new MemoryStream();
   Stream is = null;

   try {
      do {
         context.initSecContext(is, os);

         // send token if present
         if (os.Length > 0)
            sendToken(os);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         is = recvToken();

      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }





















Luciani                 Expires January 1 2005                 [Page 53]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4. acceptSecContext

   byte[] acceptSecContext(byte[] inTok,
                           int offset,
                           int len);

   Called by the context acceptor upon receiving a token from the peer.
   This call is equivalent to the stream based method except that the
   token buffers are handled as byte arrays instead of using stream
   objects.

   This method may return an output token which the application will
   need to send to the peer for further processing by the init call.

   A "null" return value indicates that no token needs to be sent to the
   peer.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to this method.  Note that it is
   possible that the acceptSecContext() method to return a token for the
   peer when isEstablished is set to "true".  This indicates that the
   token needs to be sent to the peer, but the local end of the context
   is now fully established.

   Upon completion of the context establishment, the available context
   options may be queried through the get methods.

   Throws GSSException if an error is detected.

   Parameters:

      inTok     Token generated by the peer.

      offset    The offset within the inTok where the token begins.

      len       The length of the token within the inTok (starting at
                the offset).














Luciani                 Expires January 1 2005                 [Page 54]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4.1. Example Code

   // acquire server credentials
   GSSCredential server = mgr.createCredential(...);

   // create acceptor GSS-API context from the default provider
   GSSContext context = mgr.createContext(server, null);

   try {
      do {
         byte[] inTok = readToken();

         byte[] outTok = context.acceptSecContext(inTok,
                                                  0,
                                                  inTok.length);

         // possibly send token to peer
         if (outTok != null)
            sendToken(outTok);

         // check if local context establishment is complete
         if (context.isEstablished)
            break;
      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSS-API error: " + e.Message);
   }























Luciani                 Expires January 1 2005                 [Page 55]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.5. acceptSecContext

   void acceptSecContext(Stream inStream,
                         Stream outStream);

   Called by the context acceptor upon receiving a token from the peer.
   This call is equivalent to the byte array method.  It may write an
   output token to the outStream, which the application will need to
   send to the peer for processing by its initSecContext method.  The
   application can check the isEstablished property to determine if the
   context establishment phase is complete for this peer.  A value of
   "false" for isEstablished indicates that more tokens are expected to
   be supplied to this method.  Note that it is possible for the
   acceptSecContext() method to return a token for the peer when
   isEstablished is set to "true".  This indicates that the token needs
   to be sent to the peer, but the local end of the context is now fully
   established.

   The GSS-API authentication tokens contain a definitive start and end.
   This method will attempt to read one of these tokens per invocation,
   and may block on the stream if only part of the token is available.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Contains the token generated by the peer.

      outStream Stream where the output token will be written.
                During the final stage of context establishment, there
                may be no bytes written.




















Luciani                 Expires January 1 2005                 [Page 56]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.5.1. Example Code

   // acquire server credentials
   GSSCredential server = mgr.createCredential(...);

   // create acceptor GSS-API context from the default provider
   GSSContext context = mgr.createContext(server, null);

   MemoryStream os = new MemoryStream();
   Stream is = null;

   try {
      do {
         is = recvToken();

         context.acceptSecContext(is, os);

         // possibly send token to peer
         if (os.Length > 0)
            sendToken(os);

         // check if local context establishment is complete
         if (context.isEstablished)
            break;
      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSS-API error: " + e.Message);
   }

6.7.6. isEstablished

   bool isEstablished;

   Property which indicates the state of the context.  A setting of
   "true" for the property indicates that the context has been fully
   established on the caller's side and no more tokens are needed from
   the peer.  The property should be examined after calls to
   initSecContext() or acceptSecContext() when no GSSException is
   thrown.

6.7.7. dispose

   void dispose();

   Releases any system resources and cryptographic information stored in
   the context object.  This will invalidate the context.

   Throws GSSException if an error is detected.


Luciani                 Expires January 1 2005                 [Page 57]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.8. getWrapSizeLimit

   int getWrapSizeLimit(int qop,
                        bool confReq,
                        int maxTokenSize);
 
   Returns the maximum message size that, if presented to the wrap
   method with the same confReq and qop parameters, will result in an
   output token containing no more than the maxTokenSize bytes.

   This call is intended for use by applications that communicate over
   protocols that impose a maximum message size.  It enables the
   application to fragment messages prior to applying protection.

   GSS-API implementations are recommended but not required to detect
   invalid QOP values when getWrapSizeLimit is called.  This routine
   guarantees only a maximum message size, not the availability of
   specific QOP values for message protection.
		        
   Successful completion of this call does not guarantee that wrap will
   be able to protect a message of the computed length, since this
   ability may depend on the availability of system resources at the
   time that wrap is called.  However, if the implementation itself
   imposes an upper limit on the length of messages that may be
   processed by wrap, the implementation should not return a value that
   is greater than this length.

   Throws GSSException if an error is detected.

   Parameters:

      qop       Indicates the level of protection wrap will be asked
                to provide.

      confReq   Indicates if wrap will be asked to provide privacy
                service.

      maxTokenSize
                The desired maximum size of the token emitted by wrap.












Luciani                 Expires January 1 2005                 [Page 58]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.9. wrap

   byte[] wrap(byte[] inBuf,
               int offset,
               int len,
               MessageProp msgProp);
 
   Applies per-message security services over the established security
   context.  The method will return a token with a cryptographic MIC and
   may optionally encrypt the specified inBuf.  This method is
   equivalent in functionality to its stream counterpart.  The returned
   byte array will contain both the MIC and the message.

   The MessageProp object is instantiated by the application and used to
   specify a QOP value which selects cryptographic algorithms, and a
   privacy service to optionally encrypt the message.  The underlying
   mechanism that is used in the call may not be able to provide the
   privacy service.  It sets the actual privacy service that it does
   provide in this MessageProp object which the caller should then query
   upon return.  If the mechanism is not able to provide the requested
   QOP, it throws a GSSException with the BAD_QOP code.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping of zero-length messages.

   The application will be responsible for sending the token to the
   peer.

   Throws GSSException if an error is detected.

   Parameters:

      inBuf     Application data to be protected.

      offset    The offset within the inBuf where the data begins.

      len       The length of the data within the inBuf (starting at
                the offset).

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP and privacy state.
                Set the desired QOP to 0 to request the default QOP.
                Upon return from this method, this object will contain
                the actual privacy state that was applied to the
                message by the underlying mechanism.





Luciani                 Expires January 1 2005                 [Page 59]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.10. wrap

   void wrap(Stream inStream,
             Stream outStream,
             MessageProp msgProp);
 
   Applies per-message security services over the established
   security context.  The method will produce a token with a
   cryptographic MIC and may optionally encrypt the message in inStream.
   The outStream will contain both the MIC and the message.

   The MessageProp object is instantiated by the application and used to
   specify a QOP value which selects cryptographic algorithms, and a
   privacy service to optionally encrypt the message.  The underlying
   mechanism that is used in the call may not be able to provide the
   privacy service.  It sets the actual privacy service that it does
   provide in this MessageProp object which the caller should then query
   upon return.  If the mechanism is not able to provide the requested
   QOP, it throws a GSSException with the BAD_QOP code.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping of zero-length messages.

   The application will be responsible for sending the token to the
   peer.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the application data to be
                protected.

      outStream The stream to write the protected message to.
                The application is responsible for sending this to the
                other peer for processing in its unwrap method.

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP and privacy state.
                Set the desired QOP to 0 to request the default QOP.
                Upon return from this method, this object will contain
                the the actual privacy state that was applied to the
                message by the underlying mechanism.







Luciani                 Expires January 1 2005                 [Page 60]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.11. unwrap

   byte[] unwrap(byte[] inBuf,
                        int offset,
                        int len,
                        MessageProp msgProp);
 
   Used by the peer application to process tokens generated with the
   wrap call.  This call is equal in functionality to its stream
   counterpart.  The method will return the message supplied in the peer
   application to the wrap call, verifying the embedded MIC.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP, whether confidentiality was applied to the message, and
   other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping and unwrapping of zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inBuf     GSS-API wrap token received from peer.

      offset    The offset within the inBuf where the token begins.

      len       The length of the token within the inBuf (starting at
                the offset).

      msgProp   Upon return from the method, this object will contain
                the applied QOP, the privacy state of the message, and
                supplementary information stating whether the token was
                a duplicate, old, out of sequence or arriving after a
                gap.














Luciani                 Expires January 1 2005                 [Page 61]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.12. unwrap

   void unwrap(Stream inStream,
               Stream outStream,
               MessageProp msgProp);

   Used by the peer application to process tokens generated with the
   wrap call.  This call is equal in functionality to its byte array
   counterpart.  It will produce the message supplied in the peer
   application to the wrap call, verifying the embedded MIC.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP, whether confidentiality was applied to the message, and
   other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping and unwrapping of zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the GSS-API wrap token received from
                the peer.

      outStream The stream to write the application message to.

      msgProp   Upon return from the method, this object will contain
                the applied QOP, the privacy state of the message, and
                supplementary information stating whether the token was
                a duplicate, old, out of sequence or arriving after a
                gap.

















Luciani                 Expires January 1 2005                 [Page 62]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.13. getMIC

   byte[] getMIC(byte[] inMsg,
                 int offset,
                 int len,
                 MessageProp msgProp);
 
   Produces a token containing a cryptographic MIC for the supplied
   message, for transfer to the peer application.  Unlike wrap, which
   encapsulates the user message in the returned token, only the message
   MIC is returned in the output token.  This method is identical in
   functionality to its stream counterpart.

   Note that privacy can only be applied through the wrap call.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   derivation of MICs from zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inMsg     Message to generate MIC over.

      offset    The offset within the inMsg where the token begins.

      len       The length of the token within the inMsg (starting at
                the offset).

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP.  Set the desired
                QOP to 0 in msgProp to request the default QOP.
                Alternatively pass in "null" for msgProp to request
                default QOP.
















Luciani                 Expires January 1 2005                 [Page 63]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.14. getMIC

   void getMIC(Stream inStream,
               Stream outStream,
               MessageProp msgProp);
 
   Produces a token containing a cryptographic MIC for the supplied
   message, for transfer to the peer application.  Unlike wrap, which
   encapsulates the user message in the returned token, only the message
   MIC is produced in the output token.  This method is identical in
   functionality to its byte array counterpart.

   Note that privacy can only be applied through the wrap call.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   derivation of MICs from zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the message to generate MIC over.

      outStream Stream to write the GSS-API output token to.

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP.  Set the desired
                QOP to 0 in msgProp to request the default QOP.
                Alternatively pass in "null" for msgProp to request
                default QOP.




















Luciani                 Expires January 1 2005                 [Page 64]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.15. verifyMIC

   void verifyMIC(byte[] inTok,
                  int tokOffset,
                  int tokLen,
                  byte[] inMsg,
                  int msgOffset,
                  int msgLen,
                  MessageProp msgProp);
 
   Verifies the cryptographic MIC, contained in the token parameter,
   over the supplied message.  This method is equivalent in
   functionality to its stream counterpart.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP indicating the strength of protection that was applied to
   the message and other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   the calculation and verification of MICs over zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inTok     Token generated by peer's getMIC method.

      tokOffset The offset within the inTok where the token begins.

      tokLen    The length of the token within the inTok (starting at
                the offset).

      inMsg     Application message to verify the cryptographic MIC
                over.

      msgOffset The offset within the inMsg where the message begins.

      msgLen    The length of the message within the inMsg (starting
                at the offset).

      msgProp   Upon return from the method, this object will contain
                the applied QOP and supplementary information stating
                whether the token was a duplicate, old, out of sequence
                or arriving after a gap.  The confidentiality state will
                be set to "false".




Luciani                 Expires January 1 2005                 [Page 65]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.16. verifyMIC

   void verifyMIC(Stream tokStream,
                  Stream msgStream,
                  MessageProp msgProp);
 
   Verifies the cryptographic MIC, contained in the token parameter,
   over the supplied message.  This method is equivalent in
   functionality to its byte array counterpart.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP indicating the strength of protection that was applied to
   the message and other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   the calculation and verification of MICs over zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      tokStream Stream containing the token generated by peer's
                getMIC method.

      msgStream Stream containing the application message to
                verify the cryptographic MIC over.

      msgProp   Upon return from the method, this object will contain
                the applied QOP and supplementary information stating
                whether the token was a duplicate, old, out of sequence
                or arriving after a gap.  The confidentiality state will
                be set to "false".

















Luciani                 Expires January 1 2005                 [Page 66]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.17. export

   byte[] export();

   Provided to support the sharing of work between multiple processes.
   This routine will typically be used by the context-acceptor, in an
   application where a single process receives incoming connection
   requests and accepts security contexts over them, then passes the
   established context to one or more other processes for message
   exchange.

   This method deactivates the security context and creates an
   interprocess token which, when passed to the byte array constructor
   of the GSSContext interface in another process, will re-activate the
   context in the second process.  Only a single instantiation of a
   given context may be active at any one time; a subsequent attempt by
   a context exporter to access the exported security context will fail.

   The implementation may constrain the set of processes by which the
   interprocess token may be imported, either as a function of local
   security policy, or as a result of implementation decisions.  For
   example, some implementations may constrain contexts to be passed
   only between processes that run under the same account, or which are
   part of the same process group.

   The interprocess token may contain security-sensitive information
   (for example cryptographic keys).  While mechanisms are encouraged to
   either avoid placing such sensitive information within interprocess
   tokens, or to encrypt the token before returning it to the
   application, in a typical GSS-API implementation this may not be
   possible.  Thus the application must take care to protect the
   interprocess token, and ensure that any process to which the token is
   transferred is trustworthy.

   Throws GSSException if an error is detected.

6.7.18. mutualAuthentication

   bool mutualAuthentication;
 
   Mutual Authentication context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that mutual
   authentication should be requested during context establishment.
   The value of this property after context establishment is completed
   indicates whether or not mutual authentication was performed when
   the context was established.

   Throws GSSException if an error is detected.


Luciani                 Expires January 1 2005                 [Page 67]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.19. replayDetection

   bool replayDetection;

   Replay Detection context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   replay detection service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the replay
   detection service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.20. sequenceDetection

   bool sequenceDetection;

   Sequence Detection context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   sequence checking service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the sequence
   checking service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.21. credentialDelegation

   bool credentialDelegation;
 
   Credential Delegate context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that
   credential delegation is desired.  The value of this property after
   context establishment is completed or after the value of the
   isProtReady property becomes "true" indicates whether or not
   credential delegation was performed when the context was established.

   Throws GSSException if an error is detected.








Luciani                 Expires January 1 2005                 [Page 68]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.22. anonymity

   bool anonymity;
 
   Anonimity context property.  When the value of this property is set
   to "true" before the context creation process begins then it
   indicates to the underlying mechanisms that anonymity has been
   requested.  The value of this property after context establishment is
   completed or after the value of the isProtReady property becomes
   "true" indicates whether or not anonymity was used during the
   establishment of the context.

   Throws GSSException if an error is detected.

6.7.23. confidentiality

   bool confidentiality;
 
   Confidentiality context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   confidentiality service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the confidentiality
   service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.24. integrity

   bool integrity;
 
   Integrity context property.  When the value of this property is set
   to "true" before the context creation process begins then it
   indicates to the underlying mechanisms that the integrity service
   should be requested during context establishment.  The value of this
   property after context establishment is completed or after the value
   of the isProtReady property becomes "true" indicates whether or not
   the integrity service is in effect for the context.

   Throws GSSException if an error is detected.









Luciani                 Expires January 1 2005                 [Page 69]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.25. lifetime

   int lifetime;
 
   Lifetime context property.  The value of this property indicates
   the lifetime in seconds for the context.  This property can only be
   set by the initiator before the context creation process is
   started.  Set the property to GSSConstants.INDEFINITE_LIFETIME and
   GSSConstants.DEFAULT_LIFETIME to request indefinite or default
   context lifetime.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates the remaining lifetime for the
   context.

   Throws GSSException if an error is detected.

6.7.26. channelBinding

   ChannelBinding channelBinding;
 
   Channel Binding context property.  This value of this property can be
   set to specify a Channel Binding to be used during context
   establishment.  This property can only be set before the context
   creation process begins.

   Throws GSSException if an error is detected.

6.7.27. isTransferable

   bool isTransferable;

   Property which indicates whether or not the context can be
   transferred to other processes.  The value of this property is only
   valid on fully established contexts.

   Throws GSSException if an error is detected.

6.7.28. isProtReady

   bool isProtReady;

   Property which indicates whether or not per message operations can
   be applied over the context.  Some mechanisms may allow the usage of
   per-message operations before the context is fully established.

   Throws GSSException if an error is detected.





Luciani                 Expires January 1 2005                 [Page 70]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.29. srcName

   GSSName srcName;
 
   Property which contains the name of the context initiator.  The
   value of this property is valid only after the context is fully
   established or the isProtReady property is set to "true".  The
   property is guaranteed to be set to an MN after it becomes valid.

   Throws GSSException if an error is detected.

6.7.30. targName

   GSSName targName;
 
   Property which contains the name of the context target (acceptor).
   The value of this property is valid only after the context is fully
   established or the isProtReady property is set to "true".  The
   property is guaranteed to be set to an MN after it becomes valid.

   Throws GSSException if an error is detected.

6.7.31. mechanism

   Oid mechanism;
 
   Property which contains the mechanism oid for the context.
   The value of this property may change from time to time if mechanism
   negotiation takes place.

   Throws GSSException if an error is detected.

6.7.32. delegatedCredential

   GSSCredential delegatedCredential;

   Property which contains the credential delegated by the context
   initiator.  The value of this property is only valid on the
   acceptors side after the context has been fully established and if
   the credentialDelegation property is set to "true".

   Throws GSSException if an error is detected.









Luciani                 Expires January 1 2005                 [Page 71]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.33. isInitiator

   bool isInitiator; 

   Property which contains indication of whether or not the context
   creation process started on this side.  The value of this property
   is only valid after the context creation process has started.

   Throws GSSException if an error is detected.

6.8. public class MessageProp

   This is a utility class used within the per-message GSSContext
   methods to convey per-message properties.

   When used with the GSSContext interface's wrap and getMIC methods, an
   instance of this class is used to indicate the desired QOP and to
   request if confidentiality services are to be applied to caller
   supplied data (wrap only).  To request default QOP, the value of 0
   should be used for QOP.

   When used with the unwrap and verifyMIC methods of the GSSContext
   interface, an instance of this class will be used to indicate the
   applied QOP and confidentiality services over the supplied message.
   In the case of verifyMIC, the confidentiality state will always be
   "false".  Upon return from these methods, this object will also
   contain any supplementary status values applicable to the processed
   token.  The supplementary status values can indicate old tokens, out
   of sequence tokens, gap tokens or duplicate tokens.






















Luciani                 Expires January 1 2005                 [Page 72]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.1. Constructors

   public MessageProp(bool privState);

   Constructor which sets QOP to 0 indicating that the default QOP is
   requested.

   Throws GSSException if an error is detected.

   Parameters:

      privState The desired privacy state.  "true" for privacy and
                "false" for integrity only.

   public MessageProp(int qop, bool privState);

   Constructor which sets the values for the qop and privacy state.

   Throws GSSException if an error is detected.

   Parameters:

      qop       The desired QOP.  Use 0 to request a default QOP.

      privState The desired privacy state.  "true" for privacy and
                "false" for integrity only.

6.8.2. QOP

   public int QOP;

   QOP property.  Use this to set or get the value of the QOP property.
   Set to 0 to request the default value.

   Throws GSSException if an error is detected.

6.8.3. privacy

   public bool privacy;

   Privacy property.  Use this to set or get the value of the privacy
   property.

   Throws GSSException if an error is detected.







Luciani                 Expires January 1 2005                 [Page 73]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.4. minorStatus

   public int minorStatus;

   Minor Status property.  This property maintains the minor status that
   the underlying mechanism might have set.

   Throws GSSException if an error is detected.

6.8.5. minorString

   public string minorString;

   Minor String property.  This property maintains a string explaining
   the mechanism specific error code.  The string will be empty if no
   mechanism error code has been set.

   Throws GSSException if an error is detected.

6.8.6. isDuplicateToken

   public bool isDuplicateToken;

   Is Duplicate Token property.  The value of this property indicates
   whether or not the token is a duplicate of an earlier token.

   Throws GSSException if an error is detected.

6.8.7. isOldToken

   public bool isOldToken;

   Is Old Token property.  The value of this property indicates whether
   or not the token's validity period has expired.

   Throws GSSException if an error is detected.

6.8.8. isUnseqToken

   public bool isUnseqToken;

   Is Un-sequenced Token property.  The value of this property indicates
   whether or not the token is being processed out of sequence.

   Throws GSSException if an error is detected.






Luciani                 Expires January 1 2005                 [Page 74]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.9. isGapToken

   public bool isGapToken;

   Is Gap Token property.  The value of this property indicates
   whether or not an expected per-message was not received.

   Throws GSSException if an error is detected.


6.9.  public class ChannelBinding

   The GSS-API accommodates the concept of caller-provided channel
   binding information.  Channel bindings are used to strengthen the
   quality with which peer entity authentication is provided during
   context establishment.  They enable the GSS-API callers to bind the
   establishment of the security context to relevant characteristics
   like addresses or to application specific data.

   The caller initiating the security context must determine the
   appropriate channel binding values to set in the GSSContext object.
   The acceptor must provide an identical binding in order to validate
   that received tokens possess correct channel-related characteristics.

   Use of channel bindings is optional in GSS-API.  Since channel-
   binding information may be transmitted in context establishment
   tokens, applications should therefore not use confidential data as
   channel-binding components.























Luciani                 Expires January 1 2005                 [Page 75]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.9.1. Constructors

   public ChannelBinding(EndPoint initAddr,
                         EndPoint acceptAddr,
                         byte[] appData);

   Create a ChannelBinding object with user supplied address information
   and data.  "null" values can be used for any fields which the
   application does not want to specify.

   Throws GSSException if an error is detected.

   Parameters:

      initAddr  The address of the context initiator.  "null" value
                can be supplied to indicate that the application does
                not want to set this value.

      acceptAddrThe address of the context acceptor.  "null" value can
                be supplied to indicate that the application does not
                want to set this value.

      appData   Application supplied data to be used as part of the
                channel bindings.  "null" value can be supplied to
                indicate that the application does not want to set
                this value.

   public ChannelBinding(byte[] appData);

   Creates a ChannelBinding object without any addressing information.

   Throws GSSException if an error is detected.

   Parameters:

      appData   Application supplied data to be used as part of the
                channel bindings.

6.9.2. initiatorAddress

   public EndPoint initiatorAddress;

   Initiator Address property.  The value of this property indicates
   the initiator's address for the channel binding.  The property value
   will be set to "null" if not set.

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 76]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.9.3. acceptorAddress

   public EndPoint acceptorAddress;

   Acceptor Address property.  The value of this property indicates
   the acceptor's address for the channel binding.  The property value
   will be set to "null" if not set.

   Throws GSSException if an error is detected.

6.9.4. applicationData

   public byte[] applicationData;

   Application Data property.  The value of this property indicates
   the application data being used for the channel binding.  The
   property value will be set to "null" if not set.

   Throws GSSException if an error is detected.

6.9.8. Equals

   public override bool Equals(Object obj);

   Tests whether or not two channel binding objects match.

   Throws GSSException if an error is detected.

   Parameters:

      obj       Another channel binding to compare with.

6.10. public class Oid

   This class represents Universal Object Identifiers (Oids) and their
   associated operations.

   Oids are hierarchically globally-interpretable identifiers used
   within the GSS-API framework to identify mechanisms and name formats.

   The structure and encoding of Oids is defined in ISOIEC-8824 and
   ISOIEC-8825.  For example the Oid representation of Kerberos V5
   mechanism is "1.2.840.113554.1.2.2"

   The GSSName name class contains public static Oid objects
   representing the standard name types defined in GSS-API.





Luciani                 Expires January 1 2005                 [Page 77]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.1. Constructors

   public Oid(string strOid);

   Creates an Oid object from a string representation of its integer
   components (e.g. "1.2.840.113554.1.2.2").

   Throws GSSException if an error is detected.

   Parameters:

      strOid    The string representation for the oid.

   public Oid(Stream derOid);

   Creates an Oid object from its DER encoding.  This refers to the full
   encoding including tag and length.  The structure and encoding of
   Oids is defined in ISOIEC-8824 and ISOIEC-8825.  This method is
   identical in functionality to its byte array counterpart.

   Throws GSSException if an error is detected.

   Parameters:

      derOid    Stream containing the DER encoded oid.

   public Oid(byte[] DEROid);

   Creates an Oid object from its DER encoding.  This refers to the full
   encoding including tag and length.  The structure and encoding of
   Oids is defined in ISOIEC-8824 and ISOIEC-8825.  This method is
   identical in functionality to its byte array counterpart.

   Throws GSSException if an error is detected.

   Parameters:

      derOid    Byte array storing a DER encoded oid.

6.10.2. ToString

   public override string ToString();

   Returns a string representation of the oid's integer components in
   dot separated notation (e.g. "1.2.840.113554.1.2.2").

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 78]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.3. Equals

   public override bool Equals(Object Obj);

   Tests if two OID objects represent the same oid value.

   Throws GSSException if an error is detected.

   Parameters:

      obj       Another Oid object to compare with.

6.10.4. DER

   public byte[] DER;

   DER property. Property of the object which refers to its full ASN.1
   DER encoding, the property includes the tag and length.

   Throws GSSException if an error is detected.

6.10.5. containedIn

   public bool containedIn(Oid[] oids);

   Method to test if an Oid object is contained within the
   supplied Oid object array.

   Throws GSSException if an error is detected.

   Parameters:

      oids      An array of oids to search.

6.11. public class GSSException : Exception

   This exception is thrown whenever a fatal GSS-API error occurs
   including mechanism specific errors.  It may contain both, the major
   and minor, GSS-API status codes.  The mechanism implementers are
   responsible for setting appropriate minor status codes when throwing
   this exception.  Aside from delivering the numeric error code(s) to
   the caller, this class performs the mapping from their numeric values
   to textual representations.  All C# GSS-API methods and properties
   are declared throwing this exception.







Luciani                 Expires January 1 2005                 [Page 79]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.11.1. Constants

   All valid major GSS-API error code values are declared as constants
   in this class.

   public const int BAD_BINDINGS

   Channel bindings mismatch error.

   public const int BAD_MECH

   Unsupported mechanism requested error.

   public const int BAD_NAME

   Invalid name provided error.

   public const int BAD_NAMETYPE

   Name of unsupported type provided error.

   public const int BAD_STATUS

   Invalid status code error - this is the default status value.

   public const int BAD_MIC

   Token had invalid integrity check error.

   public const int CONTEXT_EXPIRED

   Specified security context expired error.

   public const int CREDENTIALS_EXPIRED

   Expired credentials detected error.

   public const int DEFECTIVE_CREDENTIAL

   Defective credential error.

   public const int DEFECTIVE_TOKEN

   Defective token error.

   public const int FAILURE

   General failure, unspecified at GSS-API level.



Luciani                 Expires January 1 2005                 [Page 80]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   public const int NO_CONTEXT

   Invalid security context error.

   public const int NO_CRED

   Invalid credentials error.

   public const int BAD_QOP

   Unsupported QOP value error.

   public const int UNAUTHORIZED

   Operation unauthorized error.

   public const int UNAVAILABLE

   Operation unavailable error.

   public const int DUPLICATE_ELEMENT

   Duplicate credential element requested error.

   public const int NAME_NOT_MN

   Name contains multi-mechanism elements error.

   public const int DUPLICATE_TOKEN

   The token was a duplicate of an earlier token.  This is a fatal error
   code that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.

   public const int OLD_TOKEN

   The token's validity period has expired.  This is a fatal error code
   that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.

   public const int UNSEQ_TOKEN

   A later token has already been processed.  This is a fatal error code
   that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.



Luciani                 Expires January 1 2005                 [Page 81]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   public const int GAP_TOKEN

   An expected per-message token was not received.  This is a fatal
   error code that may occur during context establishment.  It is not
   used to indicate supplementary status values.  The MessageProp object
   is used for that purpose.

6.11.2. Constructors

   public GSSException(int majorCode);

   Creates a GSSException object with a specified major code.

   Parameters:

      majorCode The GSS error code causing this exception to be
                thrown.

   public GSSException(int majorCode, int minorCode,
                       string minorString);

   Creates a GSSException object with the specified major code, minor
   code, and minor code textual explanation.  This constructor is to be
   used when the exception is originating from the security mechanism.
   It allows to specify the GSS code and the mechanism code.

   Parameters:

      majorCode      The GSS error code causing this exception to be
                     thrown.

      minorCode      The mechanism error code causing this exception
                     to be thrown.

      minorString    The textual explanation of the mechanism error
                     code.

6.11.3. major

   public int major;

   Major code property.  Property of the object representing the GSS
   error code that caused the exception to be thrown.








Luciani                 Expires January 1 2005                 [Page 82]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.11.4. minor

   public int minor;

   Minor code property.  Property of the object representing the
   mechanism error code that caused the exception to be thrown.  The
   minor code property is set by the underlying mechanism.  A setting of
   0 for this property indicates that the mechanism error code is not
   set.

6.11.5. majorString

   public string majorString;

   Major string property.  Property of the object explaining the GSS
   major error code causing the exception to be thrown.

6.11.6. minorString

   public string minorString;

   Minor string property.  Property of the object explaining the
   mechanism specific error code causing the exception to be thrown.
   The string will be empty if no mechanism error code has been set.

6.11.7. ToString

   public override string ToString();

   Returns a textual representation of both the major and minor status
   codes.

6.11.8. Message

   public string Message;

   Message property.  Error message explaining the reason for the
   exception.













Luciani                 Expires January 1 2005                 [Page 83]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


7. Sample Applications

7.1. Simple GSS Context Initiator

   using org.ietf.gss;

   /**
    * This is a partial sketch for a simple client program that acts
    * as a GSS context initiator.  It illustrates how to use the C#
    * bindings for the GSS-API specified in
    * Generic Security Service API Version 2 : C# bindings
    *
    *
    * This code sketch assumes the existence of a GSS-API
    * implementation that supports the mechanism that it will need and
    * is present as a library package (org.ietf.jgss) either as part of
    * the standard JRE or in the CLASSPATH the application specifies.
    */

   public class SimpleClient {

      private string serviceName; // name of peer (ie. server)
      private GSSCredential clientCred = null;
      private GSSContext context = null;
      private Oid mech; // underlying mechanism to use

      private GSSManager mgr = GSSManager.getInstance();

      ...
      ...

      private void clientActions() {

         initializeGSS();
         establishContext();
         doCommunication();
      }














Luciani                 Expires January 1 2005                 [Page 84]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Acquire credentials for the client.
       */
      private void initializeGSS() {

         try {

            clientCred = mgr.createCredential(null /*default princ*/,
                 GSSConstants.INDEFINITE_LIFETIME /* max lifetime */,
                 mech /* mechanism to use */,
                 GSSCredentialUsage.INITIATE_ONLY /* init context */);

            Console.Writeline("GSSCredential created for " +
                              cred.getName().ToString());
            Console.Writeline("Credential lifetime (sec)=" +
                              cred.getRemainingLifetime());

         } catch (GSSException e) {
            Console.Writeline("GSS-API error in credential acquisition:"
                              + e.Message);
                   ...
                   ...
           }

           ...
           ...
      }
























Luciani                 Expires January 1 2005                 [Page 85]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Does the security context establishment with the
       * server.
       */
      private void establishContext() {

         byte[] inToken = new byte[0];
         byte[] outToken = null;

         try {

            GSSName peer = mgr.createName(
                                     serviceName,
                                     GSSNameTypes.NT_HOSTBASED_SERVICE);

            context = mgr.createContext(
                          peer,
                          mech,
                          gssCred,
                          GSSConstants.INDEFINITE_LIFETIME/*lifetime*/);

            // Will need to support confidentiality
            context.confidentiality = true;

            while (!context.isEstablished) {

               outToken = context.initSecContext(inToken,
                                                 0,
                                                 inToken.length);

               if (outToken != null)
                  writeGSSToken(outToken);

               if (!context.isEstablished)
                  inToken = readGSSToken();
            }

            GSSName peer = context.srcName;
            Console.Writeline(
                     "Security context established with " +
                     peer +
                     " using underlying mechanism " + mech.toString());

         } catch (GSSException e) {
            Console.Writeline(
               "GSS-API error during context establishment: " +
               e.Message);
         }
           ...
      }

Luciani                 Expires January 1 2005                 [Page 86]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Sends some data to the server and reads back the
       * response.
       */
      private void doCommunication()  {

         byte[] inToken = null;
         byte[] outToken = null;
         byte[] buffer;

         // Container for multiple input-output arguments to and
         // from the per-message routines (e.g., wrap/unwrap).
         MessageProp messgInfo = new MessageProp();

         try {

            /*
             * Now send some bytes to the server to be
             * processed. They will be integrity protected but
             * not encrypted for privacy.
             */

            buffer = readFromFile();

            // Set privacy to false and use the default QOP
            messgInfo.privacy = false;

            outToken = context.wrap(buffer,
                                    0,
                                    buffer.length,
                                    messgInfo);

            writeGSSToken(outToken);

            /*
             * Now read the response from the server.
             */

            inToken = readGSSToken();
            buffer = context.unwrap(inToken,
                                    0,
                                    inToken.length,
                                    messgInfo);








Luciani                 Expires January 1 2005                 [Page 87]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


            // All ok if no exception was thrown!

            GSSName peer = context.srcName;

            Console.Writeline("Message from " +
                              peer.ToString() +
                              " arrived.");
            Console.Writeline("Was it encrypted? " +
                              messgInfo.privacy);
            Console.Writeline("Duplicate Token? " +
                              messgInfo.isDuplicateToken);
            Console.Writeline("Old Token? " +
                              messgInfo.isOldToken);
            Console.Writeline("Unsequenced Token? " +
                              messgInfo.isUnseqToken);
            Console.Writeline("Gap Token? " +
                              messgInfo.isGapToken);

            ...
            ...

         } catch (GSSException e) {
            Console.Writeline("GSS-API error in per-message calls: " +
                              e.Message);
            ...
            ...

         }

         ...
         ...

      } // end of doCommunication method

      ...
      ...

   } // end of class SimpleClient













Luciani                 Expires January 1 2005                 [Page 88]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


7.2. Simple GSS Context Acceptor

   using org.ietf.gss;

   /**
    * This is a partial sketch for a simple server program that acts
    * as a GSS context acceptor. It illustrates how to use the C#
    * bindings for the GSS-API specified in
    * Generic Security Service API Version 2 : C# bindings
    *
    * This code sketch assumes the existence of a GSS-API
    * implementation that supports the mechanisms that it will need and
    * is present as a library package (org.ietf.jgss) either as part of
    * the standard JRE or in the CLASSPATH the application specifies.
    */

   public class SimpleServer {

      private string serviceName;
      private GSSName name;
      private GSSCredential cred;

      private GSSManager mgr;

      ...
      ...

      /**
       * Wait for client connections, establish security contexts and
       * provide service.
       */
      private void loop() {

         ...
         ...

         mgr = GSSManager.getInstance();

         name = mgr.createName(serviceName,
                               GSSNameTypes.NT_HOSTBASED_SERVICE);

         cred = mgr.createCredential(name,
                                     GSSConstants.INDEFINITE_LIFETIME,
                                     null,
                                     GSSCredentialUsage.ACCEPT_ONLY);






Luciani                 Expires January 1 2005                 [Page 89]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


         // Loop infinitely
         while (true) {

            Socket s = serverSock.accept();

            // Start a new thread to serve this connection
            Thread serverThread = new ServerThread(s);
            serverThread.start();

         }
      }

      /**
       * Inner class ServerThread whose run() method provides the
       * secure service to a connection.
       */

      private class ServerThread extends Thread {

         ...
         ...

         /**
          * Deals with the connection from one client. It also
          * handles all GSSException's thrown while talking to
          * this client.
          */
         public void run() {

            byte[] inToken = null;
            byte[] outToken = null;
            byte[] buffer;

            GSSName peer;

            // Container for multiple input-output arguments to and
            // from the per-message routines (ie. wrap/unwrap).
            MessageProp supplInfo = new MessageProp();

            GSSContext secContext = null;

            try {

               // Now do the context establishment loop

               GSSContext context = mgr.createContext(cred);





Luciani                 Expires January 1 2005                 [Page 90]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


               while (!context.isEstablished) {

                  inToken = readGSSToken();

                  outToken = context.acceptSecContext(inToken,
                                                      0,
                                                      inToken.length);

                  if (outToken != null)
                     writeGSSToken(outToken);

               }

               // SimpleServer wants confidentiality to be
               // available. Check for it.
               if (!context.confidentiality) {
                  ...
                  ...
               }

               GSSName peer = context.srcName;
               Oid mech = context.getMech();
               Console.Writeline("Security context established with " +
                                 peer.ToString() +
                                 " using underlying mechanism " +
                                 mech.ToString());

               // Now read the bytes sent by the client to be
               // processed.
               inToken = readGSSToken();

               // Unwrap the message
               buffer = context.unwrap(inToken,
                                       0,
                                       inToken.length,
                                       supplInfo);

               // All ok if no exception was thrown!













Luciani                 Expires January 1 2005                 [Page 91]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


               // Print other supplementary per-message status
               // information
               Console.Writeline("Message from " +
                                 peer.ToString() +
                                 " arrived.");
               Console.Writeline("Was it encrypted? " +
                                 supplInfo.privacy);
               Console.Writeline("Duplicate Token? " +
                                 supplInfo.isDuplicateToken);
               Console.Writeline("Old Token? "  + supplInfo.isOldToken);
               Console.Writeline("Unsequenced Token? " +
                                 supplInfo.isUnseqToken);
               Console.Writeline("Gap Token? "  + supplInfo.isGapToken);

               /*
                * Now process the bytes and send back an encrypted
                * response.
                */

               buffer = serverProcess(buffer);

               // Encipher it and send it across
               supplInfo.privacy = true; // privacy requested
               supplInfo.QOP = 0; // default QOP
               outToken = context.wrap(buffer,
                                       0,
                                       buffer.length,
                                       supplInfo);
               writeGSSToken(outToken);

            } catch (GSSException e) {

               Console.Writeline("GSS-API Error: " + e.Message);

               // Alternatively, could read the e.majorString
               // and the e.minorString properties.
               
               Console.Writeline("Abandoning security context.");

               ...
               ...
            }

            ...
            ...

         } // end of run method in ServerThread

      } // end of inner class ServerThread


Luciani                 Expires January 1 2005                 [Page 92]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      ...
      ...

   } // end of class SimpleServer


8. Security Considerations

   The level of security that can be obtained by using GSS-API is
   dependent on the following factors:
   
   - The integrity of the libraries being utilized.
   - The integrity of the systems where the application executes.
   - The GSS-API mechanism utilized.
   - The GSS-API services utilized by the application.
   - The way that the application utilizes GSS-API.
   
   Application as well as system installers need to be aware of
   the factors mentioned above to avoid security vulnerabilities.


9. IANA Considerations

   This document has no actions for IANA.


10. Acknowledgments

   The author would like to thank the following:
   
   Kabat, J. and Upadhyay, M. for writing the Generic Security Service
   API Version 2 : Java Bindings specification [RFC2853] that
   constitutes the basis of this work.
   
   Jeff Altman for his support and suggestions.
   
   Corby Morris for his initial implementation.
   
   Funding for the RFC Editor function is currently provided by the
   Internet Society.











Luciani                 Expires January 1 2005                 [Page 93]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


11. Normative References

   [RFC2743]  Linn, J., "Generic Security Service Application Program
              Interface Version 2, Update 1", RFC 2743, January 2000.
              
   [RFC2853]  Kabat, J. and Upadhyay, M., "Generic Security Service API
              Version 2 : Java Bindings", RFC 2853, June 2000.
	      
   [RFC1509]  Wray, J., "Generic Security Service API : C-bindings",
              RFC 1509, September 1993.


12. Authors' Addresses

   Juan Carlos Luciani
   Novell, Inc.
   1800 South Novell Place
   Provo, Utah  84606
   US

   EMail: jluciani@novell.com


13. Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.





Luciani                 Expires January 1 2005                 [Page 94]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


14. Disclaimer of Validity

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


15. Copyright Statement

   Copyright (C) The Internet Society (2004).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.
 


































Luciani                 Expires January 1 2005                 [Page 95]
--=__Part5C7E6088.0__=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten

--=__Part5C7E6088.0__=--




From kitten-bounces@lists.ietf.org Thu Nov 10 11:26:46 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EaFGA-0002jX-Md; Thu, 10 Nov 2005 11:26:46 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EaFG9-0002jM-3M
	for kitten@megatron.ietf.org; Thu, 10 Nov 2005 11:26:45 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id LAA14500
	for <kitten@ietf.org>; Thu, 10 Nov 2005 11:26:16 -0500 (EST)
Received: from furball.foretec.com ([132.151.15.110] helo=foretec.com)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EaFWO-0007C8-PV
	for kitten@ietf.org; Thu, 10 Nov 2005 11:43:32 -0500
Received: from localhost.cnri.reston.va.us ([127.0.0.1]
	helo=furball.foretec.com) by foretec.com with esmtp (Exim 4.30)
	id 1EaFG8-0008Qx-5M; Thu, 10 Nov 2005 11:26:44 -0500
Received: from 10.27.16.5 (SquirrelMail authenticated user ids)
	by furball.foretec.com with HTTP;
	Thu, 10 Nov 2005 11:26:44 -0500 (EST)
Message-ID: <1702.10.27.16.5.1131640004.squirrel@furball.foretec.com>
In-Reply-To: <43722B28.365D.009A.0@novell.com>
References: <43722B28.365D.009A.0@novell.com>
Date: Thu, 10 Nov 2005 11:26:44 -0500 (EST)
From: internet-drafts@ietf.org
To: "Juan Carlos Luciani" <jluciani@novell.com>
User-Agent: SquirrelMail/1.4.4
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
X-Spam-Score: 1.1 (+)
X-Scan-Signature: 9182cfff02fae4f1b6e9349e01d62f32
Content-Transfer-Encoding: 8bit
Cc: kitten@ietf.org
Subject: Re: New draft for Kitten (GSS_API V2: C# Bindings)
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: internet-drafts@ietf.org
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

The Secretariat CANNOT process your Internet-Draft submission due to
following reason(s):

 * All Internet-Drafts must include the following statement:

Copyright (C) The Internet Society (2005).




> This e-mail is being sent to submit the:
>
>   GSS_API V2: C# Bindings
>   draft- ietf- kitten- gssapi- csharp- bindings- 00.txt
>
> as a Kitten working group draft.
>
> Thank you,
>
> Juan Carlos Luciani
> jluciani@novell.com
>
>



_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 10 12:20:08 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EaG5o-0006yn-B6; Thu, 10 Nov 2005 12:20:08 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EaG5k-0006uu-Ql; Thu, 10 Nov 2005 12:20:05 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id MAA19518;
	Thu, 10 Nov 2005 12:19:21 -0500 (EST)
Received: from lucius.provo.novell.com ([137.65.81.172])
	by ietf-mx.ietf.org with esmtp (Exim 4.43)
	id 1EaGLg-0000vc-ST; Thu, 10 Nov 2005 12:36:38 -0500
Received: from INET-PRV1-MTA by lucius.provo.novell.com
	with Novell_GroupWise; Thu, 10 Nov 2005 10:19:31 -0700
Message-Id: <43731E9F.365D.009A.0@novell.com>
X-Mailer: Novell GroupWise Internet Agent 7.0 
Date: Thu, 10 Nov 2005 10:19:11 -0700
From: "Juan Carlos Luciani" <jluciani@novell.com>
To: <internet-drafts@ietf.org>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=__PartC6E4FB1F.0__="
X-Spam-Score: 0.0 (/)
X-Scan-Signature: c1cdf75d37f43a36fea087dd89ae3743
Cc: kitten@ietf.org
Subject: Re-submit of GSS_API:V2 C# Bindings draft
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=__PartC6E4FB1F.0__=
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

This e- mail is being sent to re-submit the:

  GSS_API V2: C# Bindings
  draft-  ietf-  kitten-  gssapi-  csharp-  bindings-  00.txt

as a Kitten working group draft. The draft is being
re-submitted to correct the copyright date.

Thank you,

Juan Carlos Luciani
jluciani@novell.com


--=__PartC6E4FB1F.0__=
Content-Type: text/plain;
	name="draft-ietf-kitten-gssapi-csharp-bindings-00.txt"
Content-Disposition: attachment;
	filename="draft-ietf-kitten-gssapi-csharp-bindings-00.txt"
Content-Transfer-Encoding: 8bit

NETWORK WORKING GROUP                                      J. C. Luciani
INTERNET-DRAFT                                              Novell, Inc.
Expires: April 8, 2006                                  November 8, 2005

                        GSS_API V2: C# Bindings
               draft-ietf-kitten-gssapi-csharp-bindings-00.txt


Status of this Memo

   This document is an Internet-Draft and is subject to all provisions
   of section 3 of RFC 3667.  By submitting this Internet-Draft, each
   author represents that any applicable patent or other IPR claims of
   which he or she is aware have been or will be disclosed, and any of
   which he or she becomes aware will be disclosed, in accordance with
   Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

Abstract

   The Generic Security Services Application Program Interface (GSS-API)
   offers application programmers uniform access to security services
   atop a variety of underlying cryptographic mechanisms.  This document
   specifies the C# language bindings for GSS-API which is described at
   a language independent conceptual level in RFC 2743 [RFC2743].

   The GSS-API C# bindings were designed to emulate the Java bindings as
   defined in RFC 2853 [RFC2853].










Luciani                 Expires April 8, 2006                   [Page 1]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


Table of Contents

1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2. GSS-API Operational Paradigm. . . . . . . . . . . . . . . . . . . . 6  
3. Additional Controls . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1. Delegation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9   
3.2. Mutual Authentication . . . . . . . . . . . . . . . . . . . . . . 9
3.3. Replay and Out-of-Sequence Detection. . . . . . . . . . . . . .  10 
3.4. Anonymous Authentication. . . . . . . . . . . . . . . . . . . .  11  
3.5. Confidentiality . . . . . . . . . . . . . . . . . . . . . . . .  12    
3.6. Inter-process Context Transfer. . . . . . . . . . . . . . . . .  12  
3.7. The Use of Incomplete Contexts. . . . . . . . . . . . . . . . .  13  
4. C# GSS-API Overview . . . . . . . . . . . . . . . . . . . . . . .  13  
4.1. Object Identifiers. . . . . . . . . . . . . . . . . . . . . . .  14  
4.2. Object Identifier Sets. . . . . . . . . . . . . . . . . . . . .  14    
4.3. Credentials . . . . . . . . . . . . . . . . . . . . . . . . . .  14   
4.4. Contexts. . . . . . . . . . . . . . . . . . . . . . . . . . . .  16   
4.5. Authentication Tokens . . . . . . . . . . . . . . . . . . . . .  17 
4.6. Interprocess Tokens . . . . . . . . . . . . . . . . . . . . . .  17   
4.7. Error Reporting . . . . . . . . . . . . . . . . . . . . . . . .  17 
4.7.1. GSS Status Codes. . . . . . . . . . . . . . . . . . . . . . .  18  
4.7.2. Mechanism-specific Codes. . . . . . . . . . . . . . . . . . .  20   
4.7.3. Suplementary Status Codes . . . . . . . . . . . . . . . . . .  20 
4.8. Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  21   
4.9. Channel Bindings. . . . . . . . . . . . . . . . . . . . . . . .  23    
5. Introduction to GSS-API Classes and Interfaces. . . . . . . . . .  24   
5.1. GSSManager Class. . . . . . . . . . . . . . . . . . . . . . . .  24    
5.2. GSSName Interface . . . . . . . . . . . . . . . . . . . . . . .  25  
5.3. GSSCredential Interface . . . . . . . . . . . . . . . . . . . .  25  
5.4. GSSContext Interface. . . . . . . . . . . . . . . . . . . . . .  26   
5.5. MessageProp Class . . . . . . . . . . . . . . . . . . . . . . .  27  
5.6. GSSException Class. . . . . . . . . . . . . . . . . . . . . . .  27  
5.7. Oid Class . . . . . . . . . . . . . . . . . . . . . . . . . . .  27  
5.8. ChannelBinding Class. . . . . . . . . . . . . . . . . . . . . .  27   
5.9. GSSConstants Class. . . . . . . . . . . . . . . . . . . . . . .  28
5.10. GSSNameTypes Class . . . . . . . . . . . . . . . . . . . . . .  28
5.11. GSSCredentialUsage Enumeration . . . . . . . . . . . . . . . .  28
6. Detailed GSS-API Description. . . . . . . . . . . . . . . . . . .  28   
6.1. public abstract class GSSManager. . . . . . . . . . . . . . . .  28   
6.1.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  29   
6.1.2. getInstance . . . . . . . . . . . . . . . . . . . . . . . . .  29   
6.1.3. getMechs. . . . . . . . . . . . . . . . . . . . . . . . . . .  29    
6.1.4. getNamesForMech . . . . . . . . . . . . . . . . . . . . . . .  29  
6.1.5. getMechsForName . . . . . . . . . . . . . . . . . . . . . . .  29  
6.1.6. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  30  
6.1.7. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  30  
6.1.8. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  31  
6.1.9. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  32  
6.1.10. createCredential . . . . . . . . . . . . . . . . . . . . . .  32   


Luciani                 Expires April 8, 2006                   [Page 2]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.11. createCredential . . . . . . . . . . . . . . . . . . . . . .  33   
6.1.12. createCredential . . . . . . . . . . . . . . . . . . . . . .  33   
6.1.13. createContext. . . . . . . . . . . . . . . . . . . . . . . .  34    
6.1.14. createContext. . . . . . . . . . . . . . . . . . . . . . . .  35 
6.1.15. createContext. . . . . . . . . . . . . . . . . . . . . . . .  35
6.2. public class GSSConstants . . . . . . . . . . . . . . . . . . .  35
6.2.1. DEFAULT_LIFETIME. . . . . . . . . . . . . . . . . . . . . . .  35 
6.2.2. INDEFINITE_LIFETIME . . . . . . . . . . . . . . . . . . . . .  36
6.3. public class GSSNameTypes . . . . . . . . . . . . . . . . . . .  36
6.3.1. NT_HOSTBASED_SERVICE. . . . . . . . . . . . . . . . . . . . .  36 
6.3.2. NT_USER_NAME. . . . . . . . . . . . . . . . . . . . . . . . .  36
6.3.3. NT_MACHINE_UID_NAME . . . . . . . . . . . . . . . . . . . . .  36 
6.3.4. NT_STRING_UID_NAME. . . . . . . . . . . . . . . . . . . . . .  37 
6.3.5. NT_ANONYMOUS. . . . . . . . . . . . . . . . . . . . . . . . .  37 
6.3.6. NT_EXPORT_NAME. . . . . . . . . . . . . . . . . . . . . . . .  37 
6.4. public interface GSSName. . . . . . . . . . . . . . . . . . . .  38
6.4.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  38 
6.4.2. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.3. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.4. canonicalize. . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.5. export. . . . . . . . . . . . . . . . . . . . . . . . . . . .  40 
6.4.6. ToString. . . . . . . . . . . . . . . . . . . . . . . . . . .  40  
6.4.7. stringNameType. . . . . . . . . . . . . . . . . . . . . . . .  40  
6.4.8. isAnonymous . . . . . . . . . . . . . . . . . . . . . . . . .  40 
6.4.9. isMN  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  40
6.5. public enum GSSCredentialUsage. . . . . . . . . . . . . . . . .  41
6.5.1. INITIATE_AND_ACCEPT . . . . . . . . . . . . . . . . . . . . .  41 
6.5.2. INITIATE_ONLY . . . . . . . . . . . . . . . . . . . . . . . .  41
6.5.3. ACCEPT_ONLY . . . . . . . . . . . . . . . . . . . . . . . . .  41
6.6. public interface GSSCredential. . . . . . . . . . . . . . . . .  41
6.6.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  42 
6.6.2. dispose . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.3. getName . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.4. getName . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.5. getRemainingLifetime. . . . . . . . . . . . . . . . . . . . .  43  
6.6.6. getRemainingInitLifetime. . . . . . . . . . . . . . . . . . .  44 
6.6.7. getRemainingAcceptLifetime. . . . . . . . . . . . . . . . . .  44  
6.6.8. getUsage. . . . . . . . . . . . . . . . . . . . . . . . . . .  44  
6.6.9. getUsage. . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.10. getMechs . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.11. add. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.12. Equals . . . . . . . . . . . . . . . . . . . . . . . . . . .  46
6.7. public interface GSSContext . . . . . . . . . . . . . . . . . .  47
6.7.1. Example Context . . . . . . . . . . . . . . . . . . . . . . .  48
6.7.2. initSecContext. . . . . . . . . . . . . . . . . . . . . . . .  50  
6.7.2.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  51 
6.7.3. initSecContext. . . . . . . . . . . . . . . . . . . . . . . .  52  
6.7.3.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  53  
6.7.4. acceptSecContext. . . . . . . . . . . . . . . . . . . . . . .  54


Luciani                 Expires April 8, 2006                   [Page 3]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  55
6.7.5. acceptSecContext. . . . . . . . . . . . . . . . . . . . . . .  56
6.7.5.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  57  
6.7.6. isEstablished . . . . . . . . . . . . . . . . . . . . . . . .  57
6.7.7. dispose . . . . . . . . . . . . . . . . . . . . . . . . . . .  57
6.7.8. getWrapSizeLimit. . . . . . . . . . . . . . . . . . . . . . .  58
6.7.9. wrap. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  59  
6.7.10. wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . .  60 
6.7.11. unWrap . . . . . . . . . . . . . . . . . . . . . . . . . . .  61
6.7.12. unWrap . . . . . . . . . . . . . . . . . . . . . . . . . . .  62
6.7.13. getMIC . . . . . . . . . . . . . . . . . . . . . . . . . . .  63
6.7.14. getMIC . . . . . . . . . . . . . . . . . . . . . . . . . . .  64
6.7.15. verifyMIC. . . . . . . . . . . . . . . . . . . . . . . . . .  65
6.7.16. verifyMIC. . . . . . . . . . . . . . . . . . . . . . . . . .  66
6.7.17. export . . . . . . . . . . . . . . . . . . . . . . . . . . .  67
6.7.18. mutualAuthenitcation . . . . . . . . . . . . . . . . . . . .  67
6.7.19. replayDetection. . . . . . . . . . . . . . . . . . . . . . .  68
6.7.20. sequenceDetection. . . . . . . . . . . . . . . . . . . . . .  68 
6.7.21. credentialDelegation . . . . . . . . . . . . . . . . . . . .  68
6.7.22. anonymity. . . . . . . . . . . . . . . . . . . . . . . . . .  69
6.7.23. confidentiality. . . . . . . . . . . . . . . . . . . . . . .  69
6.7.24. integrity. . . . . . . . . . . . . . . . . . . . . . . . . .  69
6.7.25. lifetime . . . . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.26. channelBinding . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.27. isTransferable . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.28. isProtReady. . . . . . . . . . . . . . . . . . . . . . . . .  70 
6.7.29. srcName. . . . . . . . . . . . . . . . . . . . . . . . . . .  71  
6.7.30. targName . . . . . . . . . . . . . . . . . . . . . . . . . .  71
6.7.31. mechanism. . . . . . . . . . . . . . . . . . . . . . . . . .  71
6.7.32. delegatedCredential. . . . . . . . . . . . . . . . . . . . .  71  
6.7.33. isInitiator. . . . . . . . . . . . . . . . . . . . . . . . .  72 
6.8. public class MessageProp. . . . . . . . . . . . . . . . . . . .  72
6.8.1. Constructors. . . . . . . . . . . . . . . . . . . . . . . . .  73 
6.8.2. QOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
6.8.3. privacy . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
6.8.4. minorStatus . . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.5. minorString . . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.6. isDuplicateToken. . . . . . . . . . . . . . . . . . . . . . .  74
6.8.7. isOldToken. . . . . . . . . . . . . . . . . . . . . . . . . .  74
6.8.8. isUnseqToken. . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.9. isGapToken. . . . . . . . . . . . . . . . . . . . . . . . . .  75
6.9. public class ChannelBinding . . . . . . . . . . . . . . . . . .  75
6.9.1. Constructors. . . . . . . . . . . . . . . . . . . . . . . . .  76 
6.9.2. initiatorAddress. . . . . . . . . . . . . . . . . . . . . . .  76
6.9.3. acceptorAddress . . . . . . . . . . . . . . . . . . . . . . .  77
6.9.4. applicationData . . . . . . . . . . . . . . . . . . . . . . .  77
6.9.5. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  77
6.10. public class Oid . . . . . . . . . . . . . . . . . . . . . . .  77  
6.10.1. Constructor. . . . . . . . . . . . . . . . . . . . . . . . .  78 


Luciani                 Expires April 8, 2006                   [Page 4]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.2. ToString . . . . . . . . . . . . . . . . . . . . . . . . . .  78  
6.10.3. Equals . . . . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.10.4. DER. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.10.5. containedIn. . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.11. public class GSSException. . . . . . . . . . . . . . . . . . .  79 
6.11.1. Constants. . . . . . . . . . . . . . . . . . . . . . . . . .  80
6.11.2. Constructors . . . . . . . . . . . . . . . . . . . . . . . .  82
6.11.3. major. . . . . . . . . . . . . . . . . . . . . . . . . . . .  82  
6.11.4. minor. . . . . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.5. majorString. . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.6. minorString. . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.7. ToString . . . . . . . . . . . . . . . . . . . . . . . . . .  83  
6.11.8. Message. . . . . . . . . . . . . . . . . . . . . . . . . . .  83
7. Sample Applications . . . . . . . . . . . . . . . . . . . . . . .  84
7.1. Simple GSS Context Initiator. . . . . . . . . . . . . . . . . .  84  
7.2. Simple GSS Context Acceptor . . . . . . . . . . . . . . . . . .  89
8. Security Considerations . . . . . . . . . . . . . . . . . . . . .  93
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . .  93
10. Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . .  93
11. Normative References . . . . . . . . . . . . . . . . . . . . . .  94
12. Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .  94
13. Intellectual Property Statement. . . . . . . . . . . . . . . . .  94
14. Disclaimer of Validity . . . . . . . . . . . . . . . . . . . . .  95
15. Copyright Statement. . . . . . . . . . . . . . . . . . . . . . .  95



























Luciani                 Expires April 8, 2006                   [Page 5]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


1.Introduction

   This document specifies the C# language bindings for the Generic
   Security Services Application Programming Interface Version 2
   (GSS-API v2). GSS-API allows a caller application to authenticate a
   principal identity, to delegate rights to a peer, and to apply
   security services such as confidentiality and integrity on a per-
   message basis.

   One of the design goals utilized when defining the C# bindings for
   GSS-API was to emulate the Java bindings specified in RFC 2853 as
   much as possible while still taking advantage of C# features such
   as Properties.  By emulating the Java bindings, we hoped to leverage
   work already done and to make life easier for developers utilizing
   GSS-API under C# and Java.  As a result of this design goal, the C#
   bindings match the Java bindings very closely.

   Because of the similarity between the Java and C# bindings and in the
   spirit of leveraging work already done, this document borrows heavily
   from RFC 2853.

2.GSS-API Operational Paradigm

   The Generic Security Service Application Programming Interface
   Version 2 defines a generic security API to calling applications.  It
   allows a communicating application to authenticate a user associated
   with another application, to delegate rights to another application,
   and to apply security services such as confidentiality and integrity
   on a per-message basis.

      There are four stages to using GSS-API:

      1) The application acquires a set of credentials with which it may
         prove its identity to other processes.  The application's
         credentials vouch for its global identity, which may or may not
         be related to any local username under which it may be running.

      2) A pair of communicating applications establish a joint security
         context using their credentials.  The security context
         encapsulates shared state information, which is required in
         order that per-message security services may be provided.
         Examples of state information that might be shared between
         applications as part of a security context are cryptographic
         keys, and message sequence numbers.  As part of the
         establishment of a security context, the context initiator is
         authenticated to the responder, and may require that the
         responder is authenticated back to the initiator.  The
         initiator may optionally give the responder the right to
         initiate further security contexts, acting as an agent or
         
         
Luciani                 Expires April 8, 2006                   [Page 6]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


         delegate of the initiator.  This transfer of rights is termed
         "delegation", and is achieved by creating a set of credentials,
         similar to those used by the initiating application, but which
         may be used by the responder.

         A GSSContext object is used to establish and maintain the
         shared information that makes up the security context.  Certain
         GSSContext methods will generate a token, which applications
         treat as cryptographically protected, opaque data.  The caller
         of such GSSContext method is responsible for transferring the
         token to the peer application, encapsulated if necessary in an
         application-to-application protocol.  On receipt of such a
         token, the peer application should pass it to a corresponding
         GSSContext method which will decode the token and extract the
         information, updating the security context state information
         accordingly.

      3) Per-message services are invoked on a GSSContext object to
         apply either:

         integrity and data origin authentication, or

         confidentiality, integrity and data origin authentication

         to application data, which are treated by GSS-API as arbitrary
         octet-strings.  An application transmitting a message that it
         wishes to protect will call the appropriate GSSContext method
         (getMIC or wrap) to apply protection, and send the resulting
         token to the receiving application.  The receiver will pass the
         received token (and, in the case of data protected by getMIC,
         the accompanying message-data) to the corresponding decoding
         method of the GSSContext interface (verifyMIC or unwrap) to
         remove the protection and validate the data.

      4) At the completion of a communications session (which may extend
         across several transport connections), each application uses a
         GSSContext method to invalidate the security context and
         release any system or cryptographic resources held.  Multiple
         contexts may also be used (either successively or
         simultaneously) within a single communications association, at
         the discretion of the applications.

3. Additional Controls

   This section discusses the optional services that a context initiator
   may request of the GSS-API before the context establishment.  Each of
   these services is requested by manipulating the appropriate property
   of the GSSContext interface before the first call to init is
   performed.


Luciani                 Expires April 8, 2006                   [Page 7]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Only the context initiator can request context flags.

   The optional services defined are:

   Delegation
         The (usually temporary) transfer of rights from initiator to
         acceptor, enabling the acceptor to authenticate itself as an
         agent of the initiator.

   Mutual Authentication
         In addition to the initiator authenticating its identity to the
         context acceptor, the context acceptor should also authenticate
         itself to the initiator.

   Replay Detection
         In addition to providing message integrity services, GSSContext
         per-message operations of getMIC and wrap should include
         message numbering information to enable verifyMIC and unwrap to
         detect if a message has been duplicated.

   Out-of-Sequence Detection
         In addition to providing message integrity services, GSSContext
         per-message operations (getMIC and wrap) should include
         message sequencing information to enable verifyMIC and unwrap
         to detect if a message has been received out of sequence.

   Anonymous Authentication
         The establishment of the security context should not reveal the
         initiator's identity to the context acceptor.

   Some mechanisms may not support all optional services, and some
   mechanisms may only support some services in conjunction with others.
   The GSSContext interface offers query methods to allow the
   verification by the calling application of which services will be
   available from the context when the establishment phase is complete.
   In general, if the security mechanism is capable of providing a
   requested service, it should do so even if additional services must
   be enabled in order to provide the requested service.  If the
   mechanism is incapable of providing a requested service, it should
   proceed without the service leaving the application to abort the
   context establishment process if it considers the requested service
   to be mandatory.

   Some mechanisms may specify that support for some services is
   optional, and that implementers of the mechanism need not provide it.
   This is most commonly true of the confidentiality service, often
   because of legal restrictions on the use of data-encryption, but may
   apply to any of the services.  Such mechanisms are required to send
   at least one token from acceptor to initiator during context
   

Luciani                 Expires April 8, 2006                   [Page 8]

Internet-Draft          GSS-API V2: C# Bindings            November 2005

   
   establishment when the initiator indicates a desire to use such a
   service, so that the initiating GSS-API can correctly indicate
   whether the service is supported by the acceptor's GSS-API.

3.1. Delegation

   The GSS-API allows delegation to be controlled by the initiating
   application via manipulation of the credential delegation property
   before the first call to init has been issued.  Some mechanisms do
   not support delegation, and for such mechanisms attempts by an
   application to enable delegation are ignored.

   The acceptor of a security context, for which the initiator enabled
   delegation, can check if delegation was enabled by reading the
   credential delegation property of the GSSContext object.  In cases
   when it is, the delegated credential object can be obtained by
   reading the delegated credential property. The obtained GSSCredential
   object may then be used to initiate subsequent GSS-API security
   contexts as an agent or delegate of the initiator.  If the original
   initiator's identity is "A" and the delegate's identity is "B", then,
   depending on the underlying mechanism, the identity embodied by the
   delegated credential may be either "A" or "B acting for A".

   For many mechanisms that support delegation, a simple boolean does
   not provide enough control.  Examples of additional aspects of
   delegation control that a mechanism might provide to an application
   are duration of delegation, network addresses from which delegation
   is valid, and constraints on the tasks that may be performed by a
   delegate.  Such controls are presently outside the scope of the GSS-
   API.  GSS-API implementations supporting mechanisms offering
   additional controls should provide extension routines that allow
   these controls to be exercised (perhaps by modifying the initiator's
   GSS-API credential object prior to its use in establishing a
   context).  However, the simple delegation control provided by GSS-API
   should always be able to over-ride other mechanism-specific
   delegation controls.  If the application instructs the GSSContext
   object that delegation is not desired, then the implementation must
   not permit delegation to occur.  This is an exception to the general
   rule that a mechanism may enable services even if they are not
   requested - delegation may only be provided at the explicit request
   of the application.

3.2. Mutual Authentication

   Usually, a context acceptor will require that a context initiator
   authenticate itself so that the acceptor may make an access-control
   decision prior to performing a service for the initiator.  In some
   cases, the initiator may also request that the acceptor authenticate
   itself.  GSS-API allows the initiating application to request this


Luciani                 Expires April 8, 2006                   [Page 9]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   mutual authentication service by setting the mutual authentication
   property of the GSSContext object to "true" before making the first
   call to init.  The initiating application is informed as to whether
   or not the context acceptor has authenticated itself.  Note that some
   mechanisms may not support mutual authentication, and other
   mechanisms may always perform mutual authentication, whether or not
   the initiating application requests it.  In particular, mutual
   authentication may be required by some mechanisms in order to support
   replay or out-of-sequence message detection, and for such mechanisms
   a request for either of these services will automatically enable
   mutual authentication.

3.3. Replay and Out-of-Sequence Detection

   The GSS-API may provide detection of mis-ordered messages once a
   security context has been established.  Protection may be applied to
   messages by either application, by calling either getMIC or wrap
   methods of the GSSContext object, and verified by the peer
   application by calling verifyMIC or unwrap for the peer's GSSContext
   object.

   The getMIC method calculates a cryptographic checksum of an
   application message, and returns that checksum in a token.  The
   application should pass both the token and the message to the peer
   application, which presents them to the verifyMIC method of the
   peer's GSSContext object.

   The wrap method calculates a cryptographic checksum of an application
   message, and places both the checksum and the message inside a single
   token.  The application should pass the token to the peer
   application, which presents it to the unwrap method of the peer's
   GSSContext object to extract the message and verify the checksum.

   Either pair of routines may be capable of detecting out-of-sequence
   message delivery, or duplication of messages.  Details of such mis-
   ordered messages are indicated through supplementary query methods of
   the MessageProp object that is filled in by each of these routines.

   A mechanism need not maintain a list of all tokens that have been
   processed in order to support these status codes.  A typical
   mechanism might retain information about only the most recent "N"
   tokens processed, allowing it to distinguish duplicates and missing
   tokens within the most recent "N" messages; the receipt of a token
   older than the most recent "N" would result in the isOldToken
   property of the instance of MessageProp to be set to "true".






Luciani                 Expires January 1 2005                 [Page 10]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.4. Anonymous Authentication

   In certain situations, an application may wish to initiate the
   authentication process to authenticate a peer, without revealing its
   own identity.  As an example, consider an application providing
   access to a database containing medical information, and offering
   unrestricted access to the service.  A client of such a service might
   wish to authenticate the service (in order to establish trust in any
   information retrieved from it), but might not wish the service to be
   able to obtain the client's identity (perhaps due to privacy concerns
   about the specific inquiries, or perhaps simply to avoid being placed
   on mailing-lists).

   In normal use of the GSS-API, the initiator's identity is made
   available to the acceptor as a result of the context establishment
   process.  However, context initiators may request that their identity
   not be revealed to the context acceptor.  Many mechanisms do not
   support anonymous authentication, and for such mechanisms the request
   will not be honored.  An authentication token will still be
   generated, but the application is always informed if a requested
   service is unavailable, and has the option to abort context
   establishment if anonymity is valued above the other security
   services that would require a context to be established.

   In addition to informing the application that a context is
   established anonymously (via the isAnonymous property of the
   GSSContext interface), the srcName property of the acceptor's
   GSSContext object will, for such contexts, be set to a reserved
   internal-form name, defined by the implementation.

   The ToString method for a GSSName object representing an anonymous
   entity will return a printable name.  The returned value will be
   syntactically distinguishable from any valid principal name supported
   by the implementation.  The associated name-type object identifier
   will be an oid representing the value of GSSNameTypes.NT_ANONYMOUS.
   This name-type oid will be defined as a public, static Oid object of
   the GSSName interface.  The printable form of an anonymous name
   should be chosen such that it implies anonymity, since this name may
   appear in, for example, audit logs.  For example, the string
   "<anonymous>" might be a good choice, if no valid printable names
   supported by the implementation can begin with "<" and end with ">".

   When using the equal method of the GSSName interface, and one of the
   operands is a GSSName instance representing an anonymous entity, the
   method must return "false".






Luciani                 Expires January 1 2005                 [Page 11]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.5. Confidentiality

   If a GSSContext supports the confidentiality service, wrap method may
   be used to encrypt application messages.  Messages are selectively
   encrypted, under the control of the setPrivacy property of the
   MessageProp object used in the wrap method.

3.6. Inter-process Context Transfer

   GSS-API V2 provides functionality which allows a security context to
   be transferred between processes on a single machine.  These are
   implemented using the export method of GSSContext and a byte array
   constructor of the same interface.  The most common use for such a
   feature is a client-server design where the server is implemented as
   a single process that accepts incoming security contexts, which then
   launches child processes to deal with the data on these contexts.  In
   such a design, the child processes must have access to the security
   context object created within the parent so that they can use per-
   message protection services and delete the security context when the
   communication session ends.

   Since the security context data structure is expected to contain
   sequencing information, it is impractical in general to share a
   context between processes.  Thus GSSContext interface provides an
   export method that the process, which currently owns the context, can
   call to declare that it has no intention to use the context
   subsequently, and to create an inter-process token containing
   information needed by the adopting process to successfully re-create
   the context.  After successful completion of export, the original
   security context is made inaccessible to the calling process by GSS-
   API and any further usage of this object will result in failures.
   The originating process transfers the inter-process token to the
   adopting process, which creates a new GSSContext object using the
   byte array constructor.  The properties of the context are equivalent
   to that of the original context.

   The inter-process token may contain sensitive data from the original
   security context (including cryptographic keys).  Applications using
   inter-process tokens to transfer security contexts must take
   appropriate steps to protect these tokens in transit.

   Implementations are not required to support the inter-process
   transfer of security contexts.  Reading the isTransferable property
   of the GSSContext interface will indicate if the context object is
   transferable.






Luciani                 Expires January 1 2005                 [Page 12]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.7. The Use of Incomplete Contexts

   Some mechanisms may allow the per-message services to be used before
   the context establishment process is complete.  For example, a
   mechanism may include sufficient information in its initial context-
   level tokens for the context acceptor to immediately decode messages
   protected with wrap or getMIC.  For such a mechanism, the initiating
   application need not wait until subsequent context-level tokens have
   been sent and received before invoking the per-message protection
   services.

   An application can read the isProtReady property of the GSSContext
   object to determine if the per-message services are available in
   advance of complete context establishment.  Applications wishing to
   use per-message protection services on partially-established contexts
   should query this method before attempting to invoke wrap or getMIC.

4. C# GSS-API Overview

   The C# GSS-API leverages many of the native C# types as well as
   features of the operating environment such as automatic garbage
   collection, exception handling, and encapsulation. This allows for an
   API that is simpler and with fewer functions than the API described
   in RFC 1509 [RFC1509].

   The assemblies implementing GSS-API are not part of the .NET and Mono
   frameworks.  Because of this, it is necessary for the assemblies to
   be installed before they can be used by applications.

   C# GSS-API, unlike its Java counterpart does not allow applications
   to choose between different security providers. The provider utilized
   by the application is determine at application build time based on
   the C# GSS-API assemblies linked in.  The mechanisms supported by the
   C# GSS-API assemblies are not controlled by the application.  C#
   GSS-API assemblies are vendor specific.

   The GSS-API types are present in the org.ietf.gss namespace.

   Applications need to include the following line at the top of their
   listings to make use of the GSS-API types:

   using org.ietf.gss;









Luciani                 Expires January 1 2005                 [Page 13]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


4.1. Object Identifiers

   An Oid object will be used to represent Universal Object Identifiers
   (Oids).  Oids are ISO-defined, hierarchically globally-interpretable
   identifiers used within the GSS-API framework to identify security
   mechanisms and name formats.  The Oid object can be created from a
   string representation of its dot notation (e.g. "1.3.6.1.5.6.2") as
   well as from its ASN.1 DER encoding.  Methods are also provided to
   test equality and provide the DER representation for the object.

   An important feature of the Oid class is that its instances are
   immutable - i.e.  there are no methods defined that allow one to
   change the contents of an Oid.  This property allows one to treat
   these objects as "statics" without the need to perform copies.

   Certain routines allow the usage of a default oid.  A "null" value
   can be used in those cases.

4.2. Object Identifier Sets

   Object identifiers sets are represented as arrays of Oid
   objects.  C# arrays contain a length field which allows for
   easy manipulation and reference.

   In order to support the full functionality of RFC 2743, the Oid class
   includes a method which checks for existence of an Oid object within
   a specified array.  This is equivalent in functionality to
   gss_test_oid_set_member.  The use of C# arrays and C#'s automatic
   garbage collection has eliminated the need for the following
   routines: gss_create_empty_oid_set, gss_release_oid_set, and
   gss_add_oid_set_member.  C# GSS-API implementations will not
   contain them.  C#'s automatic garbage collection and the immutable
   property of the Oid object eliminates the complicated memory
   management issues of the C counterpart.

   When ever a default value for an Object Identifier Set is required, a
   "null" value can be used.  Please consult the detailed method
   description for details.

4.3. Credentials

   GSS-API credentials are represented by the GSSCredential interface.
   The interface contains several constructs to allow for the creation
   of most common credential objects for the initiator and the acceptor.
   Comparisons are performed using the interface's "Equals" method.  The
   following general description of GSS-API credentials is included from
   the C-bindings specification:

   


Luciani                 Expires January 1 2005                 [Page 14]

Internet-Draft          GSS-API V2: C# Bindings            November 2005

   
   GSS-API credentials can contain mechanism-specific principal
   authentication data for multiple mechanisms.  A GSS-API credential is
   composed of a set of credential-elements, each of which is applicable
   to a single mechanism.  A credential may contain at most one
   credential-element for each supported mechanism.  A credential-
   element identifies the data needed by a single mechanism to
   authenticate a single principal, and conceptually contains two
   credential-references that describe the actual mechanism-specific
   authentication data, one to be used by GSS-API for initiating
   contexts, and one to be used for accepting contexts.  For mechanisms
   that do not distinguish between acceptor and initiator credentials,
   both references would point to the same underlying mechanism-specific
   authentication data.

   Credentials describe a set of mechanism-specific principals, and give
   their holder the ability to act as any of those principals.  All
   principal identities asserted by a single GSS-API credential should
   belong to the same entity, although enforcement of this property is
   an implementation-specific matter.  A single GSSCredential object
   represents all the credential elements that have been acquired.

   The creation's of an GSSContext object allows the value of "null" to
   be specified as the GSSCredential input parameter.  This will
   indicate a desire by the application to act as a default principal.
   While individual GSS-API implementations are free to determine such
   default behavior as appropriate to the mechanism, the following
   default behavior by these routines is recommended for portability:

      For the initiator side of the context:

      1) If there is only a single principal capable of initiating
         security contexts for the chosen mechanism that the application
         is authorized to act on behalf of, then that principal shall be
         used, otherwise

      2) If the platform maintains a concept of a default network-
         identity for the chosen mechanism, and if the application is
         authorized to act on behalf of that identity for the purpose of
         initiating security contexts, then the principal corresponding
         to that identity shall be used, otherwise

      3) If the platform maintains a concept of a default local
         identity, and provides a means to map local identities into
         network-identities for the chosen mechanism, and if the
         application is authorized to act on behalf of the network-
         identity image of the default local identity for the purpose of
         initiating security contexts using the chosen mechanism, then
         the principal corresponding to that identity shall be used,
         otherwise


Luciani                 Expires January 1 2005                 [Page 15]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      4) A user-configurable default identity should be used.

      and for the acceptor side of the context

      1) If there is only a single authorized principal identity capable
         of accepting security contexts for the chosen mechanism, then
         that principal shall be used, otherwise

      2) If the mechanism can determine the identity of the target
         principal by examining the context-establishment token
         processed during the accept method, and if the accepting
         application is authorized to act as that principal for the
         purpose of accepting security contexts using the chosen
         mechanism, then that principal identity shall be used,
         otherwise

      3) If the mechanism supports context acceptance by any principal,
         and if mutual authentication was not requested, any principal
         that the application is authorized to accept security contexts
         under using the chosen mechanism may be used, otherwise

      4) A user-configurable default identity shall be used.

   The purpose of the above rules is to allow security contexts to be
   established by both initiator and acceptor using the default behavior
   whenever possible.  Applications requesting default behavior are
   likely to be more portable across mechanisms and implementations than
   ones that instantiate an GSSCredential object representing a specific
   identity.

4.4. Contexts

   The GSSContext interface is used to represent one end of a GSS-API
   security context, storing state information appropriate to that end
   of the peer communication, including cryptographic state information.
   The instantiation of the context object is done differently by the
   initiator and the acceptor.  After the context has been instantiated,
   the initiator may choose to set various context options which will
   determine the characteristics of the desired security context.  When
   all the application desired characteristics have been set, the
   initiator will call the initSecContext method which will produce a
   token for consumption by the peer's acceptSecContext method.  It is
   the responsibility of the application to deliver the authentication
   token(s) between the peer applications for processing.  Upon
   completion of the context establishment phase, context attributes can
   be retrieved, by both the initiator and acceptor, reading the
   properties of the GSSContext object.  These will reflect the actual
   attributes of the established context.  At this point the context can
   be used by the application to apply cryptographic services to its


Luciani                 Expires January 1 2005                 [Page 16]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   data.

4.5. Authentication Tokens

   A token is a caller-opaque type that GSS-API uses to maintain
   synchronization between each end of the GSS-API security context.
   The token is a cryptographically protected octet-string, generated by
   the underlying mechanism at one end of a GSS-API security context for
   use by the peer mechanism at the other end.  Encapsulation (if
   required) within the application protocol and transfer of the token
   are the responsibility of the peer applications.

   C# GSS-API uses byte arrays to represent authentication tokens.
   Overloaded methods exist which allow the caller to supply streams
   which will be used for the reading and writing of the token data.

4.6. Interprocess Tokens

   Certain GSS-API routines are intended to transfer data between
   processes in multi-process programs.  These routines use a caller-
   opaque octet-string, generated by the GSS-API in one process for use
   by the GSS-API in another process.  The calling application is
   responsible for transferring such tokens between processes.  Note
   that, while GSS-API implementors are encouraged to avoid placing
   sensitive information within interprocess tokens, or to
   cryptographically protect them, many implementations will be unable
   to avoid placing key material or other sensitive data within them.
   It is the application's responsibility to ensure that interprocess
   tokens are protected in transit, and transferred only to processes
   that are trustworthy.  An interprocess token is represented using a
   byte array emitted from the export method of the GSSContext
   interface.  The receiver of the interprocess token would initialize
   a GSSContext object with this token to create a new context.  Once a
   context has been exported, the GSSContext object is invalidated.

4.7. Error Reporting

   RFC 2743 defined the usage of major and minor status values for
   signaling of GSS-API errors.  The major code, also called GSS status
   code, is used to signal errors at the GSS-API level independent of
   the underlying mechanism(s).  The minor status value or Mechanism
   status code, is a mechanism defined error value indicating a
   mechanism specific error code.

   C# GSS-API uses exceptions implemented by the GSSException class to
   signal both minor and major error values.  Both mechanism specific
   errors and GSS-API level errors are signaled through instances of
   this class.  The usage of exceptions replaces the need for major and
   minor codes to be used within the API calls.  GSSException class also


Luciani                 Expires January 1 2005                 [Page 17]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   contains methods to obtain textual representations for both the major
   and minor values, which is equivalent to the functionality of
   gss_display_status.

4.7.1. GSS Status Codes

   GSS status codes indicate errors that are independent of the
   underlying mechanism(s) used to provide the security service.  The
   errors that can be indicated via a GSS status code are generic API
   routine errors (errors that are defined in the GSS-API
   specification).  These bindings take advantage of the C# exceptions
   mechanism, thus eliminating the need for calling errors.

   A GSS status code indicates a single fatal generic API error from the
   routine that has thrown the GSSException.  Using exceptions announces
   that a fatal error has occurred during the execution of the method.
   The GSS-API operational model also allows for the signaling of
   supplementary status information from the per-message calls.  These
   need to be handled as return values since using exceptions is not
   appropriate for informatory or warning-like information.  The methods
   that are capable of producing supplementary information are the two
   per-message methods GSSContext.verifyMIC() and GSSContext.unwrap().
   These methods fill the supplementary status codes in the MessageProp
   object that was passed in.

   GSSException object, along with providing the functionality for
   setting of the various error codes and translating them into textual
   representation, also contains the definitions of all the numeric
   error values.  The following table lists the definitions of error
   codes:

      Table: GSS Status Codes

      Name                   Value   Meaning

      BAD_MECH                 1     An unsupported mechanism
                                     was requested.

      BAD_NAME                 2     An invalid name was supplied.

      BAD_NAMETYPE             3     A supplied name was of an
                                     unsupported type.

      BAD_BINDINGS             4     Incorrect channel bindings were
                                     supplied.

      BAD_STATUS               5     An invalid status code was
                                     supplied.



Luciani                 Expires January 1 2005                 [Page 18]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      BAD_MIC                  6     A token had an invalid MIC.

      NO_CRED                  7     No credentials were supplied, or
                                     the credentials were unavailable
                                     or inaccessible.

      NO_CONTEXT               8     Invalid context has been
                                     supplied.

      DEFECTIVE_TOKEN          9     A supplied token was invalid.

      DEFECTIVE_CREDENTIAL    10     A supplied credential was
                                     invalid.

      CREDENTIALS_EXPIRED     11     The referenced credentials
                                     have expired.

      CONTEXT_EXPIRED         12     The context has expired.

      FAILURE                 13     Miscellaneous failure,
                                     unspecified at the GSS-API level.

      BAD_QOP                 14     The quality-of-protection
                                     requested could not be provided.

      UNAUTHORIZED            15     The operation is forbidden by
                                     local security policy.

      UNAVAILABLE             16     The operation or option is
                                     unavailable.

      DUPLICATE_ELEMENT       17     The requested credential
                                     element already exists.

      NAME_NOT_MN             18     The provided name was not a
                                     mechanism name.

      OLD_TOKEN               19     The token's validity period has
                                     expired.

      DUPLICATE_TOKEN         20     The token was a duplicate of an
                                     earlier version.

   The GSS major status code of FAILURE is used to indicate that the
   underlying mechanism detected an error for which no specific GSS
   status code is defined.  The mechanism-specific status code can
   provide more details about the error.

   The different major status codes that can be contained in the


Luciani                 Expires January 1 2005                 [Page 19]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   GSSException object thrown by the methods in this specification are
   the same as the major status codes returned by the corresponding
   calls in RFC 2743.

4.7.2. Mechanism-specific Status Codes

   Mechanism-specific status codes are communicated in two ways, they
   are part of any GSSException thrown from the mechanism specific layer
   to signal a fatal error, or they are part of the MessageProp object
   that the per-message calls use to signal non-fatal errors.

   A default value of 0 in either the GSSException object or the
   MessageProp object will be used to represent the absence of any
   mechanism specific status code.

4.7.3. Supplementary Status Codes

   Supplementary status codes are confined to the per-message methods of
   the GSSContext interface.  Because of the informative nature of these
   errors it is not appropriate to use exceptions to signal them.
   Instead, the per-message operations of the GSSContext interface
   return these values in a MessageProp object.

   The MessageProp class defines boolean properties indicating the
   following supplementary states:

      Table: Supplementary Status Methods

      Method Name        Meaning when set to "true"

      isDuplicateToken   The token was a duplicate of an
                         earlier token.

      isOldToken         The token's validity period has
                         expired.

      isUnseqToken       A later token has already been
                         processed.

      isGapToken         An expected per-message token was
                         not received.

   A "true" value for any of the above properties indicates that the
   token exhibited the specified property.  The application must
   determine the appropriate course of action for these supplementary
   values.  They are not treated as errors by the GSS-API.





Luciani                 Expires January 1 2005                 [Page 20]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


4.8. Names

   A name is used to identify a person or entity.  GSS-API authenticates
   the relationship between a name and the entity claiming the name.

   Since different authentication mechanisms may employ different
   namespaces for identifying their principals, GSS-API's naming support
   is necessarily complex in multi-mechanism environments (or even in
   some single-mechanism environments where the underlying mechanism
   supports multiple namespaces).

   Two distinct conceptual representations are defined for names:

   1) A GSS-API form represented by implementations of the GSSName
      interface: A single GSSName object may contain multiple names from
      different namespaces, but all names should refer to the same
      entity.  An example of such an internal name would be the name
      returned from a call to the getName method of the GSSCredential
      interface, when applied to a credential containing credential
      elements for multiple authentication mechanisms employing
      different namespaces.  This GSSName object will contain a distinct
      name for the entity for each authentication mechanism.

      For GSS-API implementations supporting multiple namespaces,
      GSSName implementations must contain sufficient information to
      determine the namespace to which each primitive name belongs.

   2) Mechanism-specific contiguous byte array and string forms:
      Different GSSName initialization methods are provided to handle
      both byte array and string formats and to accommodate various
      calling applications and name types.  These formats are capable of
      containing only a single name (from a single namespace).
      Contiguous string names are always accompanied by an object
      identifier specifying the namespace to which the name belongs, and
      their format is dependent on the authentication mechanism that
      employs that name.  The string name forms are assumed to be
      printable, and may therefore be used by GSS-API applications for
      communication with their users.  The byte array name formats are
      assumed to be in non-printable formats (e.g. the byte array
      returned from the export method of the GSSName interface).

   A GSSName object can be converted to a contiguous representation by
   using the ToString method.  This will guarantee that the name will be
   converted to a printable format.  Different initialization methods in
   the GSSName interface are defined allowing support for multiple
   syntaxes for each supported namespace, and allowing users the freedom
   to choose a preferred name representation.  The ToString method
   should use an implementation-chosen printable syntax for each
   supported name-type.  To obtain the printable name type, the


Luciani                 Expires January 1 2005                 [Page 21]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   getStringNameType method can be used.

   There is no guarantee that calling the ToString method on the GSSName
   interface will produce the same string form as the original imported
   string name.  Furthermore, it is possible that the name was not even
   constructed from a string representation.  The same applies to name-
   space identifiers which may not necessarily survive unchanged after a
   journey through the internal name-form.  An example of this might be
   a mechanism that authenticates X.500 names, but provides an
   algorithmic mapping of Internet DNS names into X.500.  That
   mechanism's implementation of GSSName might, when presented with a
   DNS name, generate an internal name that contained both the original
   DNS name and the equivalent X.500 name.  Alternatively, it might only
   store the X.500 name.  In the latter case, the ToString method of
   GSSName would most likely generate a printable X.500 name, rather
   than the original DNS name.

   The context acceptor can obtain a GSSName object representing the
   entity performing the context initiation (by reading the srcName
   property).  Since this name has been authenticated by a
   single mechanism, it contains only a single name (even if the
   internal name presented by the context initiator to the GSSContext
   object had multiple components).  Such names are termed internal
   mechanism names, or "MN"s and the property values srcName and
   targName of the GSSContext interface are always of this type.
   Since some applications may require MNs without wanting to incur the
   overhead of an authentication operation, creation methods are
   provided that take not only the name buffer and name type, but also
   the mechanism oid for which this name should be created.  When
   dealing with an existing GSSName object, the canonicalize method may
   be invoked to convert a general internal name into an MN.

   GSSName objects can be compared using their Equal method, which
   returns "true" if the two names being compared refer to the same
   entity.  This is the preferred way to perform name comparisons
   instead of using the printable names that a given GSS-API
   implementation may support.  Since GSS-API assumes that all primitive
   names contained within a given internal name refer to the same
   entity, equal can return "true" if the two names have at least one
   primitive name in common.  If the implementation embodies knowledge
   of equivalence relationships between names taken from different
   namespaces, this knowledge may also allow successful comparisons of
   internal names containing no overlapping primitive elements.

   When used in large access control lists, the overhead of creating an
   GSSName object on each name and invoking the equal method on each
   name from the ACL may be prohibitive.  As an alternative way of
   supporting this case, GSS-API defines a special form of the
   contiguous byte array name which may be compared directly (byte by


Luciani                 Expires January 1 2005                 [Page 22]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   byte).  Contiguous names suitable for comparison are generated by the
   export method.  Exported names may be re-imported by using the byte
   array constructor and specifying the GSSNameTypes.NT_EXPORT_NAME as
   the name type object identifier.  The resulting GSSName name will
   also be a MN.  The GSSName interface defines public static Oid
   objects representing the standard name types.  Structurally, an
   exported name object consists of a header containing an OID
   identifying the mechanism that authenticated the name, and a trailer
   containing the name itself, where the syntax of the trailer is
   defined by the individual mechanism specification.  Detailed
   description of the format is specified in the language-independent
   GSS-API specification [RFC2743].

   Note that the results obtained by using the Equals method will in
   general be different from those obtained by invoking canonicalize and
   export, and then comparing the byte array output.  The first series
   of operation determines whether two (unauthenticated) names identify
   the same principal; the second whether a particular mechanism would
   authenticate them as the same principal.  These two operations will
   in general give the same results only for MNs.

   It is important to note that the above are guidelines as how GSSName
   implementations should behave, and are not intended to be specific
   requirements of how names objects must be implemented.  The mechanism
   designers are free to decide on the details of their implementations
   of the GSSName interface as long as the behavior satisfies the above
   guidelines.

4.9. Channel Bindings

   GSS-API supports the use of user-specified tags to identify a given
   context to the peer application.  These tags are intended to be used
   to identify the particular communications channel that carries the
   context.  Channel bindings are communicated to the GSS-API using the
   ChannelBinding object.  The application may use byte arrays to
   specify the application data to be used in the channel binding as
   well as using instances of the EndPoint class.  The EndPoint for the
   initiator and/or acceptor can be used within an instance of a
   ChannelBinding.  ChannelBinding can be set for the GSSContext object
   by setting the channelBinding property before the first call to init
   or accept has been performed.  The channelBinding property of a
   GSSContext object defaults to "null".  Currently the ChannelBinding
   class only supports addresses of type IP.  Applications that use
   other types of addresses can include them as part of the application
   specific data.

   Conceptually, the GSS-API concatenates the initiator and acceptor
   address information, and the application supplied byte array to form
   an octet string.  The mechanism calculates a MIC over this octet


Luciani                 Expires January 1 2005                 [Page 23]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   string and binds the MIC to the context establishment token emitted
   by init method of the GSSContext interface.  The same bindings are
   set by the context acceptor for its GSSContext object and during
   processing of the accept method a MIC is calculated in the same way.
   The calculated MIC is compared with that found in the token, and if
   the MICs differ, accept will throw a GSSException with the major
   code set to BAD_BINDINGS, and the context will not be established.
   Some mechanisms may include the actual channel binding data in the
   token (rather than just a MIC); applications should therefore not use
   confidential data as channel-binding components.

   Individual mechanisms may impose additional constraints on addresses
   that may appear in channel bindings.  For example, a mechanism may
   verify that the initiator address field of the channel binding
   contains the correct network address of the host system.  Portable
   applications should therefore ensure that they either provide correct
   information for the address fields, or omit setting of the addressing
   information.

5. Introduction to GSS-API Classes and Interfaces

   This section presents a brief description of the classes and
   interfaces that constitute the GSS-API.
 
   This section also shows the corresponding RFC 2743 functionality
   implemented by each of the classes.  Detailed description of these
   classes and their methods is presented in section 6.

5.1. GSSManager Class

   This abstract class serves as a factory to instantiate
   implementations of the GSS-API interfaces and also provides methods
   to make queries about underlying security mechanisms.

   A default implementation can be obtained using the static method
   getInstance().  Applications that desire to provide their own
   implementation of the GSSManager class can simply extend the abstract
   class themselves.

   This class contains equivalents of the following RFC 2743 routines:

   gss_import_name              Create an internal name from the
                                supplied information.
 
   gss_acquire_cred             Acquire credential for use.

   gss_import_sec_context       Create a previously exported context.




Luciani                 Expires January 1 2005                 [Page 24]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   gss_indicate_mechs           List the mechanisms supported by this
                                GSS-API implementation.

   gss_inquire_mechs_for_name   List the mechanisms supporting the
                                specified name type.

   gss_inquire_names_for_mech   List the name types supported by the
                                specified mechanism.

5.2. GSSName Interface

   GSS-API names are represented in the C# bindings through the
   GSSName interface.  Different name formats and their definitions are
   identified with universal Object Identifiers (oids).  The format of
   the names can be derived based on the unique oid of each name type.
   The following GSS-API routines are provided by the GSSName interface:

   RFC 2743 Routine                 Function

   gss_display_name        Covert internal name representation to text
                           format.

   gss_compare_name        Compare two internal names.
 
   gss_canonicalize_name   Convert an internal name to a mechanism name.

   gss_export_name         Convert a mechanism name to export format.

   The gss_release_name call is not provided as C# does its own
   garbage collection.  The gss_duplicate_name call is also redundant;
   the GSSName interface has no methods that can change the state of the
   object so it is safe for sharing.

5.3. GSSCredential Interface

   The GSSCredential interface is responsible for the encapsulation of
   GSS-API credentials.  Credentials identify a single entity and
   provide the necessary cryptographic information to enable the
   creation of a context on behalf of that entity.  A single credential
   may contain multiple mechanism specific credentials, each referred to
   as a credential element.  The GSSCredential interface provides the
   functionality of the following GSS-API routines:

   RFC 2743 Routine               Function

   gss_add_cred               Constructs credentials incrementally.

   gss_inquire_cred           Obtain information about credential.



Luciani                 Expires January 1 2005                 [Page 25]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   gss_inquire_cred_by_mech   Obtain per-mechanism information about
                              a credential.

   gss_release_cred           Disposes of credentials after use.

5.4. GSSContext Interface

   This interface encapsulates the functionality of context-level calls
   required for security context establishment and management between
   peers as well as the per-message services offered to applications.  A
   context is established between a pair of peers and allows the usage
   of security services on a per-message basis on application data.  It
   is created over a single security mechanism.  The GSSContext
   interface provides the functionality of the following GSS-API
   routines:

   RFC 2743 Routine                 Function
   
   gss_init_sec_context     Initiate the creation of a security context
                            with a peer.
 
   gss_accept_sec_context   Accept a security context initiated by a
                            peer.
 
   gss_delete_sec_context   Destroy a security context.
 
   gss_context_time         Obtain remaining context time.

   gss_inquire_context      Obtain context characteristics.
 
   gss_wrap_size_limit      Determine token-size limit for gss_wrap.

   gss_export_sec_context   Transfer security context to another
                            process.

   gss_get_mic              Calculate a cryptographic Message Integrity
                            Code (MIC) for a message.

   gss_verify_mic           Verify integrity on a received message.
 
   gss_wrap                 Attach a MIC to a message and optionally
                            encrypt the message content.

   gss_unwrap               Obtain a previously wrapped application
                            message verifying its integrity and
                            optionally decrypting it.

   The functionality offered by the gss_process_context_token routine
   has not been included in the C# bindings specification.  The


Luciani                 Expires January 1 2005                 [Page 26]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   corresponding functionality of gss_delete_sec_context has also been
   modified to not return any peer tokens.  This has been proposed in
   accordance to the recommendations stated in RFC 2743.  GSSContext
   does offer the functionality of destroying the locally-stored context
   information.

5.5. MessageProp Class

   This helper class is used in the per-message operations on the
   context.  An instance of this class is created by the application and
   then passed into the per-message calls.  In some cases, the
   application conveys information to the GSS-API implementation through
   this object and in other cases the GSS-API returns information to the
   application by setting it in this object.  See the description of the
   per-message operations wrap, unwrap, getMIC, and verifyMIC in the
   GSSContext interface for details.

5.6. GSSException Class

   Exceptions are used in the C# bindings to signal fatal errors to
   the calling applications.  This replaces the major and minor codes
   used in the C-bindings specification as a method of signaling
   failures.  The GSSException class handles both minor and major codes,
   as well as their translation into textual representation.  All GSS-
   API methods can throw this exception.

   RFC 2743 Routine           Function
   
   gss_display_status   Retrieve textual representation of
                        error codes.

5.7. Oid Class

   This utility class is used to represent Universal Object Identifiers
   and their associated operations.  GSS-API uses object identifiers to
   distinguish between security mechanisms and name types.  This class,
   aside from being used whenever an object identifier is needed,
   implements the following GSS-API functionality:

   RFC 2743 Routine                  Function

   gss_test_oid_set_member   Determine if the specified oid is part of a
                             set of oids.

5.8. ChannelBinding Class

   An instance of this class is used to specify channel binding
   information to the GSSContext object before the start of a security
   context establishment.  The application may use a byte array to


Luciani                 Expires January 1 2005                 [Page 27]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   specify application data to be used in the channel binding as well as
   use instances of the EndPoint.  Currently the ChannelBinding class
   only supports addresses of type IP.  Applications that use other
   types of addresses can include them as part of the application
   specific data.
   
5.9. GSSConstants Class

   This utility class defines various constants utilized throughout the
   API.
   
5.10. GSSNameTypes Class

   This class defines OIDs which specify different types of GSSNames.
   
5.11. GSSCredentialUsage Enumeration

   This enumeration defines the usage categories for GSSCredentials.
   GSSCredentials can be used for context initiation and context
   acceptance or only one of those functions.


6. Detailed GSS-API Description

   This section lists a detailed description of all the public methods
   that each of the GSS-API classes and interfaces must provide.

6.1. public abstract class GSSManager

   The GSSManager class is an abstract class that serves as a factory
   for three GSS interfaces: GSSName, GSSCredential, and GSSContext.  It
   also provides methods for applications to determine what mechanisms
   are available from the GSS implementation and what nametypes these
   mechanisms support.  An instance of the default GSSManager subclass
   may be obtained through the static method getInstance(), but
   applications are free to instantiate other subclasses of GSSManager.

   All but one method in this class are declared abstract.  This means
   that subclasses have to provide the complete implementation for those
   methods.  The only exception to this is the static method
   getInstance() which will have platform specific code to return an
   instance of the default subclass.

   Platform providers of GSS are required not to add any constructors to
   this class, private, public, or protected.  This will ensure that all
   subclasses invoke only the default constructor provided to the base
   class by the compiler.




Luciani                 Expires January 1 2005                 [Page 28]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.1. Example Code

   GSSManager mgr = GSSManager.getInstance();

   // What mechs are available to us?
   Oid[] supportedMechs = mgr.getMechs();

   // What name types does this spkm implementation support?
   Oid[] nameTypes = mgr.getNamesForMech(spkm1);

6.1.2. getInstance

   public static GSSManager getInstance();

   Returns the default GSSManager implementation.

   Throws GSSException if an error is detected.

6.1.3. getMechs

   public abstract Oid[] getMechs();

   Returns an array of Oid objects indicating mechanisms available to
   GSS-API callers.  A "null" value is returned when no mechanism are
   available (an example of this would be when mechanism are dynamically
   configured, and currently no mechanisms are installed).

   Throws GSSException if an error is detected.

6.1.4. getNamesForMech

   public abstract Oid[] getNamesForMech(Oid mech);

   Returns name type Oid's supported by the specified mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      mech      The Oid object for the mechanism to query.

6.1.5. getMechsForName

   public abstract  Oid[] getMechsForName(Oid nameType);

   Returns an array of Oid objects corresponding to the mechanisms that
   support the specific name type.  "null" is returned when no
   mechanisms are found to support the specified name type.



Luciani                 Expires January 1 2005                 [Page 29]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Throws GSSException if an error is detected.

   Parameters:

      nameType  The Oid object for the name type.

6.1.6. createName

   public abstract GSSName createName(string nameStr,
                                      Oid nameType);

   Factory method to convert a contiguous string name from the specified
   namespace to a GSSName object.  In general, the GSSName object
   created will not be an MN; two examples that are exceptions to this
   are when the namespace type parameter indicates
   GSSNameTypes.NT_EXPORT_NAME or when the GSS-API implementation is not
   multi-mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      nameStr   The string representing a printable form of the name
                to create.

      nameType  The Oid specifying the namespace of the printable name
                supplied.  Note that nameType serves to describe and
                qualify the interpretation of the input nameStr, it
                does not necessarily imply a type for the output
                GSSName implementation.  "null" value specifies that a
                mechanism specific default printable syntax should be
                assumed by each mechanism that examines nameStr.

6.1.7. createName

   public abstract GSSName createName(byte[] name,
                                      Oid nameType);

   Factory method to convert a contiguous byte array containing a name
   from the specified namespace to a GSSName object.  In general, the
   GSSName object created will not be an MN; two examples that are
   exceptions to this are when the namespace type parameter indicates
   GSSNameTypes.NT_EXPORT_NAME or when the GSS-API implementation is not
   multi-mechanism.

   Throws GSSException if an error is detected.





Luciani                 Expires January 1 2005                 [Page 30]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Parameters:

      name      The byte array containing the name to create.
      
      nameType  The Oid specifying the namespace of the name supplied
                in the byte array.  Note that nameType serves to
                describe and qualify the interpretation of the input
                name byte array, it does not necessarily imply a type
                for the output GSSName implementation.  "null" value can
                be used to specify that a mechanism specific default
                syntax should be assumed by each mechanism that examines
                the byte array.

6.1.8. createName

   public abstract GSSName createName(string nameStr,
                                      Oid nameType,
                                      Oid mech);
 
   Factory method to convert a contiguous string name from the specified
   namespace to an GSSName object that is a mechanism name (MN).  In
   other words, this method is a utility that does the equivalent of two
   steps: the createName described in 6.1.6 and then also the
   GSSName.canonicalize() described in 6.2.5.

   Throws GSSException if an error is detected.

   Parameters:

      nameStr   The string representing a printable form of the name
                to create.

      nameType  The Oid specifying the namespace of the printable name
                supplied.  Note that nameType serves to describe and
                qualify the interpretation of the input nameStr, it
                does not necessarily imply a type for the output
                GSSName implementation.  "null" value can be used to
                specify that a mechanism specific default printable
                syntax should be assumed when the mechanism examines
                nameStr.

      mech      Oid specifying the mechanism for which this name
                should be created.








Luciani                 Expires January 1 2005                 [Page 31]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.9. createName

   public abstract GSSName createName(byte[] name,
                                      Oid nameType,
                                      Oid mech);

   Throws GSSException if an error is detected.

   Factory method to convert a contiguous byte array containing a name
   from the specified namespace to a GSSName object that is an MN.  In
   other words, this method is a utility that does the equivalent of two
   steps: the createName described in 6.1.7 and then also the
   GSSName.canonicalize() described in 6.2.5.

   Parameters:

      name      The byte array representing the name to create.

      nameType  The Oid specifying the namespace of the name supplied
                in the byte array.  Note that nameType serves to
                describe and qualify the interpretation of the input
                name byte array, it does not necessarily imply a type
                for the output GSSName implementation.  "null" value
                can be used to specify that a mechanism specific
                default syntax should be assumed by each mechanism
                that examines the byte array.

      mech      Oid specifying the mechanism for which this name
                should be created.

6.1.10. createCredential

   public abstract GSSCredential createCredential(int usage);

   Factory method for acquiring default credentials.  This will cause
   the GSS-API to use system specific defaults for the set of
   mechanisms, name, and a DEFAULT lifetime.

   Throws GSSException if an error is detected.

   Parameters:

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY



Luciani                 Expires January 1 2005                 [Page 32]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.11. createCredential

   public abstract GSSCredential createCredential(GSSName aName,
                                                  int lifetime,
                                                  Oid mech,
                                                  int usage);

   Throws GSSException if an error is detected.

   Factory method for acquiring a single mechanism credential.

   Parameters:

      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.

      lifetime  The number of seconds that credentials should remain
                valid.  Use GSSCredential.INDEFINITE_LIFETIME to
                request that the credentials have the maximum
                permitted lifetime.  Use GSSCredential.DEFAULT_LIFETIME
                to request default credential lifetime.

      mech      The oid of the desired mechanism.  Use "(Oid) null" to
                request the default mechanism(s).

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY

6.1.12. createCredential

   public abstract GSSCredential createCredential(GSSName aName,
                                                  int lifetime,
                                                  Oid mechs[],
                                                  int usage);

   Factory method for acquiring credentials over a set of mechanisms.
   Acquires credentials for each of the mechanisms specified in the
   array called mechs.  To determine the list of mechanisms for which
   the acquisition of credentials succeeded, the caller should use the
   GSSCredential.getMechs() method.

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 33]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Parameters:
   
      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.

      lifetime  The number of seconds that credentials should remain
                valid.  Use GSSCredential.INDEFINITE_LIFETIME to
                request that the credentials have the maximum
                permitted lifetime.  Use GSSCredential.DEFAULT_LIFETIME
                to request default credential lifetime.

      mechs     The array of mechanisms over which the credential is
                to be acquired.  Use "(Oid[]) null" for requesting a
                system specific default set of mechanisms.

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY

6.1.13. createContext

   public abstract GSSContext createContext(GSSName peer,
                                            Oid mech,
                                            GSSCredential myCred,
                                            int lifetime);

   Factory method for creating a context on the initiator's side.
   Context flags may be modified through the mutator methods prior to
   calling GSSContext.initSecContext().

   Throws GSSException if an error is detected.

   Parameters:

      peer      Name of the target peer.

      mech      Oid of the desired mechanism.  Use "(Oid) null" to
                request default mechanism.

      myCred    Credentials of the initiator.  Use "null" to act as a
                default initiator principal.






Luciani                 Expires January 1 2005                 [Page 34]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      lifetime  The request lifetime, in seconds, for the context.
                Use GSSContext.INDEFINITE_LIFETIME and
                GSSContext.DEFAULT_LIFETIME to request indefinite or
                default context lifetime.

6.1.14. createContext

   public abstract GSSContext createContext(GSSCredential myCred);

   Factory method for creating a context on the acceptor' side.  The
   context's properties will be determined from the input token supplied
   to the accept method.

   Throws GSSException if an error is detected.

   Parameters:

      myCred    Credentials for the acceptor.  Use "null" to act as a
                default acceptor principal.

6.1.15. createContext

   public abstract GSSContext createContext(byte[] interProcessToken);

   Factory method for creating a previously exported context.  The
   context properties will be determined from the input token and can't
   be modified through the set methods.

   Throws GSSException if an error is detected.

   Parameters:                               

      interProcessToken  The token previously emitted from the export
                         method.

6.2. public class GSSConstants

   This class defines constants that are common among various interfaces
   and/or classes of the API.

6.2.1. DEFAULT_LIFETIME

   const int DEFAULT_LIFETIME = 0;

   A constant representing the default lifetime for a context or
   credential.




   
Luciani                 Expires January 1 2005                 [Page 35]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.2.2. INDEFINITE_LIFETIME

   const int INDEFINITE_LIFETIME = Int32.MaxValue;

   A constant representing indefinite lifetime for a context or
   credential.

6.3. public class GSSNameTypes

   This class defines the various types of GSSNames.

6.3.1. NT_HOSTBASED_SERVICE

   public static Oid NT_HOSTBASED_SERVICE;

   Property which indicates Oid of name type of a host-based service
   name form.  It is used to represent services associated with host
   computers.  This name form is constructed using two elements,
   "service" and "hostname", as follows:

        service@hostname

   Values for the "service" element are registered with the IANA. It
   represents the following value: { 1(iso), 3(org), 6(dod),
   1(internet), 5(security), 6(nametypes), 2(gss-host-based-services) }
   
6.3.2. NT_USER_NAME

   public static Oid NT_USER_NAME;

   Property which indicates Oid of name type of a named user on a local
   system.  It represents the following value: { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   1(user_name) }
   
6.3.3. NT_MACHINE_UID_NAME

   public static Oid NT_MACHINE_UID_NAME;

   Property which indicates Oid of name type of a numeric user
   identifier corresponding to a user on a local system. (e.g. Uid).
   It represents the following value: { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   2(machine_uid_name) }






   
Luciani                 Expires January 1 2005                 [Page 36]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.3.4. NT_STRING_UID_NAME

   public static Oid NT_STRING_UID_NAME;

   Property which indicates Oid of name type of a string of digits
   representing the numeric user identifier of a user on a local system.
   It represents the following value:  { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   3(string_uid_name) }
   
6.3.5. NT_ANONYMOUS

   public static Oid NT_ANONYMOUS;

   Property which indicates Oid of name type of an anonymous entity.
   It represents the following value: { 1(iso), 3(org), 6(dod),
   1(internet), 5(security), 6(nametypes), 3(gss-anonymous-name) }
   
6.3.6. NT_EXPORT_NAME

   public static Oid NT_EXPORT_NAME;

   Property which indicates Oid of name type of an exported name
   produced by the export method.  It represents the following value:
   { 1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
   4(gss-api-exported-name) }

























Luciani                 Expires January 1 2005                 [Page 37]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4. public interface GSSName

   This interface encapsulates a single GSS-API principal entity.
   Different name formats and their definitions are identified with
   universal Object Identifiers (Oids).  The format of the names can be
   derived based on the unique oid of its namespace type.
   
6.4.1. Example Code

   Included below are code examples utilizing the GSSName interface.
   The code below creates a GSSName, converts it to a mechanism name
   (MN), performs a comparison, obtains a printable representation of
   the name, exports it and then re-imports to obtain a new GSSName.

   GSSManager mgr = GSSManager.getInstance();

   // create a host based service name
   GSSName name = mgr.createName("service@host",
                                 GSSNameTypes.NT_HOSTBASED_SERVICE);

   Oid krb5 = new Oid("1.2.840.113554.1.2.2");

   GSSName mechName = name.canonicalize(krb5);

   // the above two steps are equivalent to the following
   GSSName mechName = mgr.createName("service@host",
                                     GSSNameTypes.NT_HOSTBASED_SERVICE,
                                     krb5);

   // perform name comparison
   if (name.Equals(mechName))
      Console.WriteLine("Names are equals.");

   // obtain textual representation of name and its printable
   // name type
   Console.WriteLine(mechName.ToString() +
                     mechName.getStringNameType().ToString());

   // export and re-import the name
   byte[] exportName = mechName.export();

   // create a new name object from the exported buffer
   GSSName newName = mgr.createName(exportName,
                                    GSSNameTypes.NT_EXPORT_NAME);







Luciani                 Expires January 1 2005                 [Page 38]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4.2. Equals

   bool Equals(GSSName another);
 
   Compares two GSSName objects to determine whether they refer to the
   same entity.  If either of the names represents an anonymous
   entity, the method will return "false".

   Throws GSSException if an error is detected.

   Parameters:

      another   GSSName object to compare with.

6.4.3. Equals

   bool Equals(Object another);

   A variation of the equals method described in 6.2.3 that is provided
   to override the Object.Equals() method that the implementing class
   will inherit.  The behavior is exactly the same as that in 6.2.3
   except that no GSSException is thrown; instead, false will be
   returned in the situation where an error occurs.  (Note that the C#
   language specification requires that two objects that are equal
   according to the Equals(Object) method must return the same integer
   result when the GetHashCode() method is called on them.)

   Parameters:

      another   GSSName object to compare with.

6.4.4. canonicalize

   GSSName canonicalize(Oid mech);
 
   Creates a mechanism name (MN) from an arbitrary internal name.  This
   is equivalent to using the factory methods described in 6.1.8 or
   6.1.9 that take the mechanism name as one of their parameters.

   Throws GSSException if an error is detected.

   Parameters:

      mech      The oid for the mechanism for which the canonical form
                of the name is requested.






Luciani                 Expires January 1 2005                 [Page 39]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4.5. export

   byte[] export();

   Returns a canonical contiguous byte representation of a mechanism
   name (MN), suitable for direct, byte by byte comparison by
   authorization functions.  If the name is not an MN, implementations
   may throw a GSSException with the NAME_NOT_MN status code.  If an
   implementation chooses not to throw an exception, it should use some
   system specific default mechanism to canonicalize the name and then
   export it.  The format of the header of the output buffer is
   specified in RFC 2743.

6.4.6. ToString

   string ToString();

   Returns a textual representation of the GSSName object.  To retrieve
   the printed name format, which determines the syntax of the returned
   string, the getStringNameType method can be used.

   Throws GSSException if an error is detected.

6.4.7. stringNameType

   Oid stringNameType;

   Property of the object containing the oid representing the type of
   name returned through the ToString method.  Using this oid, the
   syntax of the printable name can be determined.

   Throws GSSException if an error is detected.

6.4.8. isAnonymous

   bool isAnonymous;

   Property which indicates whether the name object represents an
   anonymous entity or not.  If "true" then it is an anonymous name.

6.4.9. isMN

   bool isMN;

   Property which indicates whether the name object contains only one
   mechanism element and is a mechanism name as defined by RFC 2743.





Luciani                 Expires January 1 2005                 [Page 40]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.5. public enum GSSCredentialUsage

   This enumeration defines the usage categories for credentials.

6.5.1. INITIATE_AND_ACCEPT

   Credentials of this type can be used for both context initiation
   and acceptance.
   
6.5.2. INITIATE_ONLY

   Credentials of this type can be used for context initiation only.
   
6.5.3. ACCEPT_ONLY

   Credentials of this type can be used for context acceptance only.
   
6.6. public interface GSSCredential: ICloneable

   This interface encapsulates the GSS-API credentials for an entity.  A
   credential contains all the necessary cryptographic information to
   enable the creation of a context on behalf of the entity that it
   represents.  It may contain multiple, distinct, mechanism specific
   credential elements, each containing information for a specific
   security mechanism, but all referring to the same entity.

   A credential may be used to perform context initiation, acceptance,
   or both.

   GSS-API implementations must impose a local access-control policy on
   callers to prevent unauthorized callers from acquiring credentials to
   which they are not entitled.  GSS-API credential creation is not
   intended to provide a "login to the network" function, as such a
   function would involve the creation of new credentials rather than
   merely acquiring a handle to existing credentials.  Such functions,
   if required, should be defined in implementation-specific extensions
   to the API.

   If credential acquisition is time-consuming for a mechanism, the
   mechanism may choose to delay the actual acquisition until the
   credential is required (e.g.  by GSSContext).  Such mechanism-
   specific implementation decisions should be invisible to the calling
   application; thus the query methods immediately following the
   creation of a credential object must return valid credential data,
   and may therefore incur the overhead of a deferred credential
   acquisition.




   
Luciani                 Expires January 1 2005                 [Page 41]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Applications will create a credential object passing the desired
   parameters.  The application can then use the query methods to obtain
   specific information about the instantiated credential object
   (equivalent to the gss_inquire routines).  When the credential is no
   longer needed, the application should call the dispose (equivalent to
   gss_release_cred) method to release any resources held by the
   credential object and to destroy any cryptographically sensitive
   information.

   Classes implementing this interface also implement the ICloneable
   interface.  This indicates that the class will support the Clone()
   method that will allow the creation of duplicate credentials.  This
   is useful when called just before the add() call to retain a copy of
   the original credential.

6.6.1. Example Code

   This example code demonstrates the creation of a GSSCredential
   implementation for a specific entity, querying of its fields, and its
   release when it is no longer needed.

   GSSManager mgr = GSSManager.getInstance();

   // start by creating a name object for the entity
   GSSName name = mgr.createName("userName", GSSNameTypes.NT_USER_NAME);

   // now acquire credentials for the entity
   GSSCredential cred = mgr.createCredential(name,
                                        GSSCredentialUsage.ACCEPT_ONLY);

   // display credential information - name, remaining lifetime,
   // and the mechanisms it has been acquired over
   Console.WriteLine(cred.getName().ToString());
   Console.WriteLine(cred.getRemainingLifetime());

   Oid[] mechs = cred.getMechs();
   if (mechs != null) {
      for (int i = 0; i < mechs.length; i++)
         Console.WriteLine(mechs[i].ToString());
   }

   // release system resources held by the credential
   cred.dispose();








Luciani                 Expires January 1 2005                 [Page 42]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.2. dispose

   void dispose();

   Releases any sensitive information that the GSSCredential object may
   be containing.  Applications should call this method as soon as the
   credential is no longer needed to minimize the time any sensitive
   information is maintained.

   Throws GSSException if an error is detected.

6.6.3. getName

   GSSName getName();
 
   Retrieves the name of the entity that the credential asserts.

   Throws GSSException if an error is detected.

6.6.4. getName

   GSSName getName(Oid mechOID);
 
   Retrieves a mechanism name of the entity that the credential asserts.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.5. getRemainingLifetime

   int getRemainingLifetime();

   Returns the remaining lifetime in seconds for a credential.  The
   remaining lifetime is the minimum lifetime for any of the underlying
   credential mechanisms.  A return value of
   GSSConstants.INDEFINITE_LIFETIME indicates that the credential does
   not expire.  A return value of 0 indicates that the credential is
   already expired.

   Throws GSSException if an error is detected.







Luciani                 Expires January 1 2005                 [Page 43]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.6. getRemainingInitLifetime

   int getRemainingInitLifetime(Oid mech);
 
   Returns the remaining lifetime is seconds for the credential to
   remain capable of initiating security contexts under the specified
   mechanism.  A return value of GSSConstants.INDEFINITE_LIFETIME
   indicates that the credential does not expire for context initiation.
   A return value of 0 indicates that the credential is already expired.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.7. getRemainingAcceptLifetime

   int getRemainingAcceptLifetime(Oid mech);
 
   Returns the remaining lifetime is seconds for the credential to
   remain capable of accepting security contexts under the specified
   mechanism.  A return value of GSSConstants.INDEFINITE_LIFETIME
   indicates that the credential does not expire for context acceptance.
   A return value of 0 indicates that the credential is already expired.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.8. getUsage

   GSSCredentialUsage getUsage();

   Returns the usage category for the credential.

   Throws GSSException if an error is detected.










Luciani                 Expires January 1 2005                 [Page 44]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.9. getUsage

   GSSCredentialUsage getUsage(Oid mechOID);
 
   Returns the usage category for the specified credential mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.10. getMechs

   Oid[] getMechs();

   Returns an array of mechanisms supported by this credential.

   Throws GSSException if an error is detected.

6.6.11. add

   void add(GSSName aName,
            int initLifetime,
            int acceptLifetime,
            Oid mech,
            int usage);
 
   Adds a mechanism specific credential-element to an existing
   credential.  This method allows the construction of credentials one
   mechanism at a time.

   This routine is envisioned to be used mainly by context acceptors
   during the creation of acceptance credentials which are to be used
   with a variety of clients using different security mechanisms.

   This routine adds the new credential element "in-place".  To add the
   element in a new credential, first call Clone() to obtain a copy of
   this credential, then call its add() method.

   Throws GSSException if an error is detected.

   Parameters:

      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.



Luciani                 Expires January 1 2005                 [Page 45]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      initLifetime
                The number of seconds that credentials should remain
                valid for initiating of security contexts.  Use
                GSSCredential.INDEFINITE_LIFETIME to request that the
                credentials have the maximum permitted lifetime.  Use
                GSSCredential.DEFAULT_LIFETIME to request default
                credential lifetime.

      acceptLifetime
                The number of seconds that credentials should remain
                valid for accepting of security contexts.  Use
                GSSCredential.INDEFINITE_LIFETIME to request that the
                credentials have the maximum permitted lifetime.  Use
                GSSCredential.DEFAULT_LIFETIME to request default
                credential lifetime.

      mech      The mechanisms over which the credential is to be
                acquired.

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:
                GSSCredential.ACCEPT_AND_INITIATE,
                GSSCredential.ACCEPT_ONLY, GSSCredential.INITIATE_ONLY

6.6.12. Equals

   bool Equals(Object another);

   Tests if this GSSCredential refers to the same entity as the supplied
   object.  The two credentials must be acquired over the same
   mechanisms and must refer to the same principal.  Returns "true" if
   the two GSSCredentials refer to the same entity; "false" otherwise.

   Parameters:

      another   Another GSSCredential object for comparison.















Luciani                 Expires January 1 2005                 [Page 46]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7. public interface GSSContext

   This interface encapsulates the GSS-API security context and provides
   the security services (wrap, unwrap, getMIC, verifyMIC) that are
   available over the context.  Security contexts are established
   between peers using locally acquired credentials.  Multiple contexts
   may exist simultaneously between a pair of peers, using the same or
   different set of credentials.  GSS-API functions in a manner
   independent of the underlying transport protocol and depends on its
   calling application to transport its tokens between peers.

   Before the context establishment phase is initiated, the context
   initiator may request specific characteristics desired of the
   established context.  These can be set by manipulating the
   GSSContext properties.  After the context is established, the caller
   can check the actual characteristic and services offered by the
   context by examining the GSSContext properties.

   The context establishment phase begins with the first call to the
   init method by the context initiator.  During this phase the
   initSecContext and acceptSecContext methods will produce GSS-API
   authentication tokens which the calling application needs to send to
   its peer.  If an error occurs at any point, an exception will get
   thrown and the code will start executing in a catch block.  If not,
   the normal flow of code continues and the application can read the
   isEstablished property.  If this property is false it indicates that
   a token is needed from its peer in order to continue the context
   establishment phase.  A setting of true signals that the local end of
   the context is established.  This may still require that a token be
   sent to the peer, if one is produced by GSS-API.  During the context
   establishment phase, the isProtReady property indicates whether or
   not the context can be used for the per-message operations.  This
   allows applications to use per-message operations on contexts which
   aren't fully established.

   After the context has been established or the isProtReady property is
   "true", the query routines can be invoked to determine the actual
   characteristics and services of the established context.  The
   application can also start using the per-message methods of wrap and
   getMIC to obtain cryptographic operations on application supplied
   data.

   When the context is no longer needed, the application should call
   dispose to release any system resources the context may be using.







Luciani                 Expires January 1 2005                 [Page 47]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.1. Example Code

   The example code presented below demonstrates the usage of the
   GSSContext interface for the initiating peer.  Different operations
   on the GSSContext object are presented, including: object
   instantiation, setting of desired flags, context establishment, query
   of actual context flags, per-message operations on application data,
   and finally context deletion.

   GSSManager mgr = GSSManager.getInstance();

   // start by creating the name for a service entity
   GSSName targetName = mgr.createName("service@host",
                                     GSSNameTypes.NT_HOSTBASED_SERVICE);

   // create a context using default credentials for the above entity
   // and the implementation specific default mechanism
   GSSContext context = mgr.createContext(targetName,
                                     null, /* default mechanism */
                                     null, /* default credentials */
                                     GSSConstants.INDEFINITE_LIFETIME);

   // set desired context options - all others are false by default
   context.confidentiality = true;
   context.mutualAuthentication = true;
   context.replayDetection = true;
   context.sequenceDetection = true;

   // establish a context between peers - using byte arrays
   byte[] inTok = new byte[0];

   try {
      do {
         byte[] outTok = context.initSecContext(inTok,
                                                0,
                                                inTok.length);

         // send the token if present
         if (outTok != null)
            sendToken(outTok);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         inTok = readToken();

      } while (true);


Luciani                 Expires January 1 2005                 [Page 48]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }

   // display context information
   Console.Writeline("Remaining lifetime in seconds = " +
                     context.lifetime);
   Console.Writeline("Context mechanism = " + context.Mech.ToString());
   Console.Writeline("Initiator = " + context.srcName.ToString());
   Console.Writeline("Acceptor = " + context.targName.ToString());

   if (context.confidentiality)
      Console.Writeline("Confidentiality security service available"); 

   if (context.integrity)
      Console.Writeline("Integrity security service available");

   // perform wrap on an application supplied message, appMsg,
   // using QOP = 0, and requesting privacy service
   byte[] appMsg ...

   MessageProp mProp = new MessageProp(0, true);

   byte[] tok = context.wrap(appMsg, 0, appMsg.length, mProp);

   if (mProp.privacy)
      Console.Writeline("Message protected with privacy.");

   sendToken(tok);

   // release the local-end of the context
   context.dispose();



















Luciani                 Expires January 1 2005                 [Page 49]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.2. initSecContext

   byte[] initSecContext(byte[] inputBuf,
                         int offset,
                         int len);

   Called by the context initiator to start the context creation
   process.  This is equivalent to the stream based method except that
   the token buffers are handled as byte arrays instead of using stream
   objects.  This method may return an output token which the
   application will need to send to the peer for processing by the
   accept call.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to the initSecContext method.
   Note that it is possible for the initSecContext() method to return a
   token for the peer when isEstablished is set to "true".  This
   indicates that the token needs to be sent to the peer, but the local
   end of the context is now fully established.

   Throws GSSException if an error is detected.

   Parameters:

      inputBuf  Token generated by the peer.  This parameter is ignored
                on the first call.

      offset    The offset within the inputBuf where the token begins.

      len       The length of the token within the inputBuf (starting
                at the offset).




















Luciani                 Expires January 1 2005                 [Page 50]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.2.1. Example Code

   // Create a new GSSContext implementation object.
   // GSSContext wrapper implements interface GSSContext.
   GSSContext context = mgr.createContext(...);

   byte[] inTok = new byte[0];

   try {
      do {
         byte[] outTok = context.initSecContext(inTok,
                                                0,
                                                inTok.length);

         // send the token if present
         if (outTok != null)
            sendToken(outTok);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         inTok = readToken();

      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }





















Luciani                 Expires January 1 2005                 [Page 51]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.3. initSecContext

   void initSecContext(Stream inStream,
                       Stream outStream);
 
   Called by the context initiator to start the context creation
   process.  This is equivalent to the byte array based method.  This
   method may write an output token to the outStream, which the
   application will need to send to the peer for processing by the
   accept call.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to the initSecContext method.
   Note that it is possible that the initSecContext() method to return a
   token for the peer when isEstablished is set to "true".  This
   indicates that the token needs to be sent to the peer, but the local
   end of the context is now fully established.

   The GSS-API authentication tokens contain a definitive start and end.
   This method will attempt to read one of these tokens per invocation,
   and may block on the stream if only part of the token is available.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream to read the token generated by the peer.  This
                parameter is ignored on the first call.

      outStream Stream where the output token will be written.
                During the final stage of context establishment, there
                may be no bytes written.



















Luciani                 Expires January 1 2005                 [Page 52]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.3.1. Example Code

   // Create a new GSSContext implementation object.

   // GSSContext wrapper implements interface GSSContext.
   GSSContext context = mgr.createContext(...);

   MemoryStream os = new MemoryStream();
   Stream is = null;

   try {
      do {
         context.initSecContext(is, os);

         // send token if present
         if (os.Length > 0)
            sendToken(os);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         is = recvToken();

      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }





















Luciani                 Expires January 1 2005                 [Page 53]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4. acceptSecContext

   byte[] acceptSecContext(byte[] inTok,
                           int offset,
                           int len);

   Called by the context acceptor upon receiving a token from the peer.
   This call is equivalent to the stream based method except that the
   token buffers are handled as byte arrays instead of using stream
   objects.

   This method may return an output token which the application will
   need to send to the peer for further processing by the init call.

   A "null" return value indicates that no token needs to be sent to the
   peer.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to this method.  Note that it is
   possible that the acceptSecContext() method to return a token for the
   peer when isEstablished is set to "true".  This indicates that the
   token needs to be sent to the peer, but the local end of the context
   is now fully established.

   Upon completion of the context establishment, the available context
   options may be queried through the get methods.

   Throws GSSException if an error is detected.

   Parameters:

      inTok     Token generated by the peer.

      offset    The offset within the inTok where the token begins.

      len       The length of the token within the inTok (starting at
                the offset).














Luciani                 Expires January 1 2005                 [Page 54]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4.1. Example Code

   // acquire server credentials
   GSSCredential server = mgr.createCredential(...);

   // create acceptor GSS-API context from the default provider
   GSSContext context = mgr.createContext(server, null);

   try {
      do {
         byte[] inTok = readToken();

         byte[] outTok = context.acceptSecContext(inTok,
                                                  0,
                                                  inTok.length);

         // possibly send token to peer
         if (outTok != null)
            sendToken(outTok);

         // check if local context establishment is complete
         if (context.isEstablished)
            break;
      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSS-API error: " + e.Message);
   }























Luciani                 Expires January 1 2005                 [Page 55]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.5. acceptSecContext

   void acceptSecContext(Stream inStream,
                         Stream outStream);

   Called by the context acceptor upon receiving a token from the peer.
   This call is equivalent to the byte array method.  It may write an
   output token to the outStream, which the application will need to
   send to the peer for processing by its initSecContext method.  The
   application can check the isEstablished property to determine if the
   context establishment phase is complete for this peer.  A value of
   "false" for isEstablished indicates that more tokens are expected to
   be supplied to this method.  Note that it is possible for the
   acceptSecContext() method to return a token for the peer when
   isEstablished is set to "true".  This indicates that the token needs
   to be sent to the peer, but the local end of the context is now fully
   established.

   The GSS-API authentication tokens contain a definitive start and end.
   This method will attempt to read one of these tokens per invocation,
   and may block on the stream if only part of the token is available.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Contains the token generated by the peer.

      outStream Stream where the output token will be written.
                During the final stage of context establishment, there
                may be no bytes written.




















Luciani                 Expires January 1 2005                 [Page 56]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.5.1. Example Code

   // acquire server credentials
   GSSCredential server = mgr.createCredential(...);

   // create acceptor GSS-API context from the default provider
   GSSContext context = mgr.createContext(server, null);

   MemoryStream os = new MemoryStream();
   Stream is = null;

   try {
      do {
         is = recvToken();

         context.acceptSecContext(is, os);

         // possibly send token to peer
         if (os.Length > 0)
            sendToken(os);

         // check if local context establishment is complete
         if (context.isEstablished)
            break;
      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSS-API error: " + e.Message);
   }

6.7.6. isEstablished

   bool isEstablished;

   Property which indicates the state of the context.  A setting of
   "true" for the property indicates that the context has been fully
   established on the caller's side and no more tokens are needed from
   the peer.  The property should be examined after calls to
   initSecContext() or acceptSecContext() when no GSSException is
   thrown.

6.7.7. dispose

   void dispose();

   Releases any system resources and cryptographic information stored in
   the context object.  This will invalidate the context.

   Throws GSSException if an error is detected.


Luciani                 Expires January 1 2005                 [Page 57]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.8. getWrapSizeLimit

   int getWrapSizeLimit(int qop,
                        bool confReq,
                        int maxTokenSize);
 
   Returns the maximum message size that, if presented to the wrap
   method with the same confReq and qop parameters, will result in an
   output token containing no more than the maxTokenSize bytes.

   This call is intended for use by applications that communicate over
   protocols that impose a maximum message size.  It enables the
   application to fragment messages prior to applying protection.

   GSS-API implementations are recommended but not required to detect
   invalid QOP values when getWrapSizeLimit is called.  This routine
   guarantees only a maximum message size, not the availability of
   specific QOP values for message protection.
		        
   Successful completion of this call does not guarantee that wrap will
   be able to protect a message of the computed length, since this
   ability may depend on the availability of system resources at the
   time that wrap is called.  However, if the implementation itself
   imposes an upper limit on the length of messages that may be
   processed by wrap, the implementation should not return a value that
   is greater than this length.

   Throws GSSException if an error is detected.

   Parameters:

      qop       Indicates the level of protection wrap will be asked
                to provide.

      confReq   Indicates if wrap will be asked to provide privacy
                service.

      maxTokenSize
                The desired maximum size of the token emitted by wrap.












Luciani                 Expires January 1 2005                 [Page 58]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.9. wrap

   byte[] wrap(byte[] inBuf,
               int offset,
               int len,
               MessageProp msgProp);
 
   Applies per-message security services over the established security
   context.  The method will return a token with a cryptographic MIC and
   may optionally encrypt the specified inBuf.  This method is
   equivalent in functionality to its stream counterpart.  The returned
   byte array will contain both the MIC and the message.

   The MessageProp object is instantiated by the application and used to
   specify a QOP value which selects cryptographic algorithms, and a
   privacy service to optionally encrypt the message.  The underlying
   mechanism that is used in the call may not be able to provide the
   privacy service.  It sets the actual privacy service that it does
   provide in this MessageProp object which the caller should then query
   upon return.  If the mechanism is not able to provide the requested
   QOP, it throws a GSSException with the BAD_QOP code.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping of zero-length messages.

   The application will be responsible for sending the token to the
   peer.

   Throws GSSException if an error is detected.

   Parameters:

      inBuf     Application data to be protected.

      offset    The offset within the inBuf where the data begins.

      len       The length of the data within the inBuf (starting at
                the offset).

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP and privacy state.
                Set the desired QOP to 0 to request the default QOP.
                Upon return from this method, this object will contain
                the actual privacy state that was applied to the
                message by the underlying mechanism.





Luciani                 Expires January 1 2005                 [Page 59]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.10. wrap

   void wrap(Stream inStream,
             Stream outStream,
             MessageProp msgProp);
 
   Applies per-message security services over the established
   security context.  The method will produce a token with a
   cryptographic MIC and may optionally encrypt the message in inStream.
   The outStream will contain both the MIC and the message.

   The MessageProp object is instantiated by the application and used to
   specify a QOP value which selects cryptographic algorithms, and a
   privacy service to optionally encrypt the message.  The underlying
   mechanism that is used in the call may not be able to provide the
   privacy service.  It sets the actual privacy service that it does
   provide in this MessageProp object which the caller should then query
   upon return.  If the mechanism is not able to provide the requested
   QOP, it throws a GSSException with the BAD_QOP code.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping of zero-length messages.

   The application will be responsible for sending the token to the
   peer.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the application data to be
                protected.

      outStream The stream to write the protected message to.
                The application is responsible for sending this to the
                other peer for processing in its unwrap method.

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP and privacy state.
                Set the desired QOP to 0 to request the default QOP.
                Upon return from this method, this object will contain
                the the actual privacy state that was applied to the
                message by the underlying mechanism.







Luciani                 Expires January 1 2005                 [Page 60]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.11. unwrap

   byte[] unwrap(byte[] inBuf,
                        int offset,
                        int len,
                        MessageProp msgProp);
 
   Used by the peer application to process tokens generated with the
   wrap call.  This call is equal in functionality to its stream
   counterpart.  The method will return the message supplied in the peer
   application to the wrap call, verifying the embedded MIC.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP, whether confidentiality was applied to the message, and
   other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping and unwrapping of zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inBuf     GSS-API wrap token received from peer.

      offset    The offset within the inBuf where the token begins.

      len       The length of the token within the inBuf (starting at
                the offset).

      msgProp   Upon return from the method, this object will contain
                the applied QOP, the privacy state of the message, and
                supplementary information stating whether the token was
                a duplicate, old, out of sequence or arriving after a
                gap.














Luciani                 Expires January 1 2005                 [Page 61]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.12. unwrap

   void unwrap(Stream inStream,
               Stream outStream,
               MessageProp msgProp);

   Used by the peer application to process tokens generated with the
   wrap call.  This call is equal in functionality to its byte array
   counterpart.  It will produce the message supplied in the peer
   application to the wrap call, verifying the embedded MIC.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP, whether confidentiality was applied to the message, and
   other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping and unwrapping of zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the GSS-API wrap token received from
                the peer.

      outStream The stream to write the application message to.

      msgProp   Upon return from the method, this object will contain
                the applied QOP, the privacy state of the message, and
                supplementary information stating whether the token was
                a duplicate, old, out of sequence or arriving after a
                gap.

















Luciani                 Expires January 1 2005                 [Page 62]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.13. getMIC

   byte[] getMIC(byte[] inMsg,
                 int offset,
                 int len,
                 MessageProp msgProp);
 
   Produces a token containing a cryptographic MIC for the supplied
   message, for transfer to the peer application.  Unlike wrap, which
   encapsulates the user message in the returned token, only the message
   MIC is returned in the output token.  This method is identical in
   functionality to its stream counterpart.

   Note that privacy can only be applied through the wrap call.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   derivation of MICs from zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inMsg     Message to generate MIC over.

      offset    The offset within the inMsg where the token begins.

      len       The length of the token within the inMsg (starting at
                the offset).

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP.  Set the desired
                QOP to 0 in msgProp to request the default QOP.
                Alternatively pass in "null" for msgProp to request
                default QOP.
















Luciani                 Expires January 1 2005                 [Page 63]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.14. getMIC

   void getMIC(Stream inStream,
               Stream outStream,
               MessageProp msgProp);
 
   Produces a token containing a cryptographic MIC for the supplied
   message, for transfer to the peer application.  Unlike wrap, which
   encapsulates the user message in the returned token, only the message
   MIC is produced in the output token.  This method is identical in
   functionality to its byte array counterpart.

   Note that privacy can only be applied through the wrap call.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   derivation of MICs from zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the message to generate MIC over.

      outStream Stream to write the GSS-API output token to.

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP.  Set the desired
                QOP to 0 in msgProp to request the default QOP.
                Alternatively pass in "null" for msgProp to request
                default QOP.




















Luciani                 Expires January 1 2005                 [Page 64]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.15. verifyMIC

   void verifyMIC(byte[] inTok,
                  int tokOffset,
                  int tokLen,
                  byte[] inMsg,
                  int msgOffset,
                  int msgLen,
                  MessageProp msgProp);
 
   Verifies the cryptographic MIC, contained in the token parameter,
   over the supplied message.  This method is equivalent in
   functionality to its stream counterpart.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP indicating the strength of protection that was applied to
   the message and other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   the calculation and verification of MICs over zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inTok     Token generated by peer's getMIC method.

      tokOffset The offset within the inTok where the token begins.

      tokLen    The length of the token within the inTok (starting at
                the offset).

      inMsg     Application message to verify the cryptographic MIC
                over.

      msgOffset The offset within the inMsg where the message begins.

      msgLen    The length of the message within the inMsg (starting
                at the offset).

      msgProp   Upon return from the method, this object will contain
                the applied QOP and supplementary information stating
                whether the token was a duplicate, old, out of sequence
                or arriving after a gap.  The confidentiality state will
                be set to "false".




Luciani                 Expires January 1 2005                 [Page 65]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.16. verifyMIC

   void verifyMIC(Stream tokStream,
                  Stream msgStream,
                  MessageProp msgProp);
 
   Verifies the cryptographic MIC, contained in the token parameter,
   over the supplied message.  This method is equivalent in
   functionality to its byte array counterpart.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP indicating the strength of protection that was applied to
   the message and other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   the calculation and verification of MICs over zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      tokStream Stream containing the token generated by peer's
                getMIC method.

      msgStream Stream containing the application message to
                verify the cryptographic MIC over.

      msgProp   Upon return from the method, this object will contain
                the applied QOP and supplementary information stating
                whether the token was a duplicate, old, out of sequence
                or arriving after a gap.  The confidentiality state will
                be set to "false".

















Luciani                 Expires January 1 2005                 [Page 66]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.17. export

   byte[] export();

   Provided to support the sharing of work between multiple processes.
   This routine will typically be used by the context-acceptor, in an
   application where a single process receives incoming connection
   requests and accepts security contexts over them, then passes the
   established context to one or more other processes for message
   exchange.

   This method deactivates the security context and creates an
   interprocess token which, when passed to the byte array constructor
   of the GSSContext interface in another process, will re-activate the
   context in the second process.  Only a single instantiation of a
   given context may be active at any one time; a subsequent attempt by
   a context exporter to access the exported security context will fail.

   The implementation may constrain the set of processes by which the
   interprocess token may be imported, either as a function of local
   security policy, or as a result of implementation decisions.  For
   example, some implementations may constrain contexts to be passed
   only between processes that run under the same account, or which are
   part of the same process group.

   The interprocess token may contain security-sensitive information
   (for example cryptographic keys).  While mechanisms are encouraged to
   either avoid placing such sensitive information within interprocess
   tokens, or to encrypt the token before returning it to the
   application, in a typical GSS-API implementation this may not be
   possible.  Thus the application must take care to protect the
   interprocess token, and ensure that any process to which the token is
   transferred is trustworthy.

   Throws GSSException if an error is detected.

6.7.18. mutualAuthentication

   bool mutualAuthentication;
 
   Mutual Authentication context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that mutual
   authentication should be requested during context establishment.
   The value of this property after context establishment is completed
   indicates whether or not mutual authentication was performed when
   the context was established.

   Throws GSSException if an error is detected.


Luciani                 Expires January 1 2005                 [Page 67]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.19. replayDetection

   bool replayDetection;

   Replay Detection context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   replay detection service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the replay
   detection service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.20. sequenceDetection

   bool sequenceDetection;

   Sequence Detection context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   sequence checking service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the sequence
   checking service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.21. credentialDelegation

   bool credentialDelegation;
 
   Credential Delegate context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that
   credential delegation is desired.  The value of this property after
   context establishment is completed or after the value of the
   isProtReady property becomes "true" indicates whether or not
   credential delegation was performed when the context was established.

   Throws GSSException if an error is detected.








Luciani                 Expires January 1 2005                 [Page 68]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.22. anonymity

   bool anonymity;
 
   Anonimity context property.  When the value of this property is set
   to "true" before the context creation process begins then it
   indicates to the underlying mechanisms that anonymity has been
   requested.  The value of this property after context establishment is
   completed or after the value of the isProtReady property becomes
   "true" indicates whether or not anonymity was used during the
   establishment of the context.

   Throws GSSException if an error is detected.

6.7.23. confidentiality

   bool confidentiality;
 
   Confidentiality context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   confidentiality service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the confidentiality
   service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.24. integrity

   bool integrity;
 
   Integrity context property.  When the value of this property is set
   to "true" before the context creation process begins then it
   indicates to the underlying mechanisms that the integrity service
   should be requested during context establishment.  The value of this
   property after context establishment is completed or after the value
   of the isProtReady property becomes "true" indicates whether or not
   the integrity service is in effect for the context.

   Throws GSSException if an error is detected.









Luciani                 Expires January 1 2005                 [Page 69]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.25. lifetime

   int lifetime;
 
   Lifetime context property.  The value of this property indicates
   the lifetime in seconds for the context.  This property can only be
   set by the initiator before the context creation process is
   started.  Set the property to GSSConstants.INDEFINITE_LIFETIME and
   GSSConstants.DEFAULT_LIFETIME to request indefinite or default
   context lifetime.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates the remaining lifetime for the
   context.

   Throws GSSException if an error is detected.

6.7.26. channelBinding

   ChannelBinding channelBinding;
 
   Channel Binding context property.  This value of this property can be
   set to specify a Channel Binding to be used during context
   establishment.  This property can only be set before the context
   creation process begins.

   Throws GSSException if an error is detected.

6.7.27. isTransferable

   bool isTransferable;

   Property which indicates whether or not the context can be
   transferred to other processes.  The value of this property is only
   valid on fully established contexts.

   Throws GSSException if an error is detected.

6.7.28. isProtReady

   bool isProtReady;

   Property which indicates whether or not per message operations can
   be applied over the context.  Some mechanisms may allow the usage of
   per-message operations before the context is fully established.

   Throws GSSException if an error is detected.





Luciani                 Expires January 1 2005                 [Page 70]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.29. srcName

   GSSName srcName;
 
   Property which contains the name of the context initiator.  The
   value of this property is valid only after the context is fully
   established or the isProtReady property is set to "true".  The
   property is guaranteed to be set to an MN after it becomes valid.

   Throws GSSException if an error is detected.

6.7.30. targName

   GSSName targName;
 
   Property which contains the name of the context target (acceptor).
   The value of this property is valid only after the context is fully
   established or the isProtReady property is set to "true".  The
   property is guaranteed to be set to an MN after it becomes valid.

   Throws GSSException if an error is detected.

6.7.31. mechanism

   Oid mechanism;
 
   Property which contains the mechanism oid for the context.
   The value of this property may change from time to time if mechanism
   negotiation takes place.

   Throws GSSException if an error is detected.

6.7.32. delegatedCredential

   GSSCredential delegatedCredential;

   Property which contains the credential delegated by the context
   initiator.  The value of this property is only valid on the
   acceptors side after the context has been fully established and if
   the credentialDelegation property is set to "true".

   Throws GSSException if an error is detected.









Luciani                 Expires January 1 2005                 [Page 71]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.33. isInitiator

   bool isInitiator; 

   Property which contains indication of whether or not the context
   creation process started on this side.  The value of this property
   is only valid after the context creation process has started.

   Throws GSSException if an error is detected.

6.8. public class MessageProp

   This is a utility class used within the per-message GSSContext
   methods to convey per-message properties.

   When used with the GSSContext interface's wrap and getMIC methods, an
   instance of this class is used to indicate the desired QOP and to
   request if confidentiality services are to be applied to caller
   supplied data (wrap only).  To request default QOP, the value of 0
   should be used for QOP.

   When used with the unwrap and verifyMIC methods of the GSSContext
   interface, an instance of this class will be used to indicate the
   applied QOP and confidentiality services over the supplied message.
   In the case of verifyMIC, the confidentiality state will always be
   "false".  Upon return from these methods, this object will also
   contain any supplementary status values applicable to the processed
   token.  The supplementary status values can indicate old tokens, out
   of sequence tokens, gap tokens or duplicate tokens.






















Luciani                 Expires January 1 2005                 [Page 72]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.1. Constructors

   public MessageProp(bool privState);

   Constructor which sets QOP to 0 indicating that the default QOP is
   requested.

   Throws GSSException if an error is detected.

   Parameters:

      privState The desired privacy state.  "true" for privacy and
                "false" for integrity only.

   public MessageProp(int qop, bool privState);

   Constructor which sets the values for the qop and privacy state.

   Throws GSSException if an error is detected.

   Parameters:

      qop       The desired QOP.  Use 0 to request a default QOP.

      privState The desired privacy state.  "true" for privacy and
                "false" for integrity only.

6.8.2. QOP

   public int QOP;

   QOP property.  Use this to set or get the value of the QOP property.
   Set to 0 to request the default value.

   Throws GSSException if an error is detected.

6.8.3. privacy

   public bool privacy;

   Privacy property.  Use this to set or get the value of the privacy
   property.

   Throws GSSException if an error is detected.







Luciani                 Expires January 1 2005                 [Page 73]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.4. minorStatus

   public int minorStatus;

   Minor Status property.  This property maintains the minor status that
   the underlying mechanism might have set.

   Throws GSSException if an error is detected.

6.8.5. minorString

   public string minorString;

   Minor String property.  This property maintains a string explaining
   the mechanism specific error code.  The string will be empty if no
   mechanism error code has been set.

   Throws GSSException if an error is detected.

6.8.6. isDuplicateToken

   public bool isDuplicateToken;

   Is Duplicate Token property.  The value of this property indicates
   whether or not the token is a duplicate of an earlier token.

   Throws GSSException if an error is detected.

6.8.7. isOldToken

   public bool isOldToken;

   Is Old Token property.  The value of this property indicates whether
   or not the token's validity period has expired.

   Throws GSSException if an error is detected.

6.8.8. isUnseqToken

   public bool isUnseqToken;

   Is Un-sequenced Token property.  The value of this property indicates
   whether or not the token is being processed out of sequence.

   Throws GSSException if an error is detected.






Luciani                 Expires January 1 2005                 [Page 74]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.9. isGapToken

   public bool isGapToken;

   Is Gap Token property.  The value of this property indicates
   whether or not an expected per-message was not received.

   Throws GSSException if an error is detected.


6.9.  public class ChannelBinding

   The GSS-API accommodates the concept of caller-provided channel
   binding information.  Channel bindings are used to strengthen the
   quality with which peer entity authentication is provided during
   context establishment.  They enable the GSS-API callers to bind the
   establishment of the security context to relevant characteristics
   like addresses or to application specific data.

   The caller initiating the security context must determine the
   appropriate channel binding values to set in the GSSContext object.
   The acceptor must provide an identical binding in order to validate
   that received tokens possess correct channel-related characteristics.

   Use of channel bindings is optional in GSS-API.  Since channel-
   binding information may be transmitted in context establishment
   tokens, applications should therefore not use confidential data as
   channel-binding components.























Luciani                 Expires January 1 2005                 [Page 75]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.9.1. Constructors

   public ChannelBinding(EndPoint initAddr,
                         EndPoint acceptAddr,
                         byte[] appData);

   Create a ChannelBinding object with user supplied address information
   and data.  "null" values can be used for any fields which the
   application does not want to specify.

   Throws GSSException if an error is detected.

   Parameters:

      initAddr  The address of the context initiator.  "null" value
                can be supplied to indicate that the application does
                not want to set this value.

      acceptAddrThe address of the context acceptor.  "null" value can
                be supplied to indicate that the application does not
                want to set this value.

      appData   Application supplied data to be used as part of the
                channel bindings.  "null" value can be supplied to
                indicate that the application does not want to set
                this value.

   public ChannelBinding(byte[] appData);

   Creates a ChannelBinding object without any addressing information.

   Throws GSSException if an error is detected.

   Parameters:

      appData   Application supplied data to be used as part of the
                channel bindings.

6.9.2. initiatorAddress

   public EndPoint initiatorAddress;

   Initiator Address property.  The value of this property indicates
   the initiator's address for the channel binding.  The property value
   will be set to "null" if not set.

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 76]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.9.3. acceptorAddress

   public EndPoint acceptorAddress;

   Acceptor Address property.  The value of this property indicates
   the acceptor's address for the channel binding.  The property value
   will be set to "null" if not set.

   Throws GSSException if an error is detected.

6.9.4. applicationData

   public byte[] applicationData;

   Application Data property.  The value of this property indicates
   the application data being used for the channel binding.  The
   property value will be set to "null" if not set.

   Throws GSSException if an error is detected.

6.9.8. Equals

   public override bool Equals(Object obj);

   Tests whether or not two channel binding objects match.

   Throws GSSException if an error is detected.

   Parameters:

      obj       Another channel binding to compare with.

6.10. public class Oid

   This class represents Universal Object Identifiers (Oids) and their
   associated operations.

   Oids are hierarchically globally-interpretable identifiers used
   within the GSS-API framework to identify mechanisms and name formats.

   The structure and encoding of Oids is defined in ISOIEC-8824 and
   ISOIEC-8825.  For example the Oid representation of Kerberos V5
   mechanism is "1.2.840.113554.1.2.2"

   The GSSName name class contains public static Oid objects
   representing the standard name types defined in GSS-API.





Luciani                 Expires January 1 2005                 [Page 77]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.1. Constructors

   public Oid(string strOid);

   Creates an Oid object from a string representation of its integer
   components (e.g. "1.2.840.113554.1.2.2").

   Throws GSSException if an error is detected.

   Parameters:

      strOid    The string representation for the oid.

   public Oid(Stream derOid);

   Creates an Oid object from its DER encoding.  This refers to the full
   encoding including tag and length.  The structure and encoding of
   Oids is defined in ISOIEC-8824 and ISOIEC-8825.  This method is
   identical in functionality to its byte array counterpart.

   Throws GSSException if an error is detected.

   Parameters:

      derOid    Stream containing the DER encoded oid.

   public Oid(byte[] DEROid);

   Creates an Oid object from its DER encoding.  This refers to the full
   encoding including tag and length.  The structure and encoding of
   Oids is defined in ISOIEC-8824 and ISOIEC-8825.  This method is
   identical in functionality to its byte array counterpart.

   Throws GSSException if an error is detected.

   Parameters:

      derOid    Byte array storing a DER encoded oid.

6.10.2. ToString

   public override string ToString();

   Returns a string representation of the oid's integer components in
   dot separated notation (e.g. "1.2.840.113554.1.2.2").

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 78]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.3. Equals

   public override bool Equals(Object Obj);

   Tests if two OID objects represent the same oid value.

   Throws GSSException if an error is detected.

   Parameters:

      obj       Another Oid object to compare with.

6.10.4. DER

   public byte[] DER;

   DER property. Property of the object which refers to its full ASN.1
   DER encoding, the property includes the tag and length.

   Throws GSSException if an error is detected.

6.10.5. containedIn

   public bool containedIn(Oid[] oids);

   Method to test if an Oid object is contained within the
   supplied Oid object array.

   Throws GSSException if an error is detected.

   Parameters:

      oids      An array of oids to search.

6.11. public class GSSException : Exception

   This exception is thrown whenever a fatal GSS-API error occurs
   including mechanism specific errors.  It may contain both, the major
   and minor, GSS-API status codes.  The mechanism implementers are
   responsible for setting appropriate minor status codes when throwing
   this exception.  Aside from delivering the numeric error code(s) to
   the caller, this class performs the mapping from their numeric values
   to textual representations.  All C# GSS-API methods and properties
   are declared throwing this exception.







Luciani                 Expires January 1 2005                 [Page 79]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.11.1. Constants

   All valid major GSS-API error code values are declared as constants
   in this class.

   public const int BAD_BINDINGS

   Channel bindings mismatch error.

   public const int BAD_MECH

   Unsupported mechanism requested error.

   public const int BAD_NAME

   Invalid name provided error.

   public const int BAD_NAMETYPE

   Name of unsupported type provided error.

   public const int BAD_STATUS

   Invalid status code error - this is the default status value.

   public const int BAD_MIC

   Token had invalid integrity check error.

   public const int CONTEXT_EXPIRED

   Specified security context expired error.

   public const int CREDENTIALS_EXPIRED

   Expired credentials detected error.

   public const int DEFECTIVE_CREDENTIAL

   Defective credential error.

   public const int DEFECTIVE_TOKEN

   Defective token error.

   public const int FAILURE

   General failure, unspecified at GSS-API level.



Luciani                 Expires January 1 2005                 [Page 80]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   public const int NO_CONTEXT

   Invalid security context error.

   public const int NO_CRED

   Invalid credentials error.

   public const int BAD_QOP

   Unsupported QOP value error.

   public const int UNAUTHORIZED

   Operation unauthorized error.

   public const int UNAVAILABLE

   Operation unavailable error.

   public const int DUPLICATE_ELEMENT

   Duplicate credential element requested error.

   public const int NAME_NOT_MN

   Name contains multi-mechanism elements error.

   public const int DUPLICATE_TOKEN

   The token was a duplicate of an earlier token.  This is a fatal error
   code that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.

   public const int OLD_TOKEN

   The token's validity period has expired.  This is a fatal error code
   that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.

   public const int UNSEQ_TOKEN

   A later token has already been processed.  This is a fatal error code
   that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.



Luciani                 Expires January 1 2005                 [Page 81]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   public const int GAP_TOKEN

   An expected per-message token was not received.  This is a fatal
   error code that may occur during context establishment.  It is not
   used to indicate supplementary status values.  The MessageProp object
   is used for that purpose.

6.11.2. Constructors

   public GSSException(int majorCode);

   Creates a GSSException object with a specified major code.

   Parameters:

      majorCode The GSS error code causing this exception to be
                thrown.

   public GSSException(int majorCode, int minorCode,
                       string minorString);

   Creates a GSSException object with the specified major code, minor
   code, and minor code textual explanation.  This constructor is to be
   used when the exception is originating from the security mechanism.
   It allows to specify the GSS code and the mechanism code.

   Parameters:

      majorCode      The GSS error code causing this exception to be
                     thrown.

      minorCode      The mechanism error code causing this exception
                     to be thrown.

      minorString    The textual explanation of the mechanism error
                     code.

6.11.3. major

   public int major;

   Major code property.  Property of the object representing the GSS
   error code that caused the exception to be thrown.








Luciani                 Expires January 1 2005                 [Page 82]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.11.4. minor

   public int minor;

   Minor code property.  Property of the object representing the
   mechanism error code that caused the exception to be thrown.  The
   minor code property is set by the underlying mechanism.  A setting of
   0 for this property indicates that the mechanism error code is not
   set.

6.11.5. majorString

   public string majorString;

   Major string property.  Property of the object explaining the GSS
   major error code causing the exception to be thrown.

6.11.6. minorString

   public string minorString;

   Minor string property.  Property of the object explaining the
   mechanism specific error code causing the exception to be thrown.
   The string will be empty if no mechanism error code has been set.

6.11.7. ToString

   public override string ToString();

   Returns a textual representation of both the major and minor status
   codes.

6.11.8. Message

   public string Message;

   Message property.  Error message explaining the reason for the
   exception.













Luciani                 Expires January 1 2005                 [Page 83]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


7. Sample Applications

7.1. Simple GSS Context Initiator

   using org.ietf.gss;

   /**
    * This is a partial sketch for a simple client program that acts
    * as a GSS context initiator.  It illustrates how to use the C#
    * bindings for the GSS-API specified in
    * Generic Security Service API Version 2 : C# bindings
    *
    *
    * This code sketch assumes the existence of a GSS-API
    * implementation that supports the mechanism that it will need and
    * is present as a library package (org.ietf.jgss) either as part of
    * the standard JRE or in the CLASSPATH the application specifies.
    */

   public class SimpleClient {

      private string serviceName; // name of peer (ie. server)
      private GSSCredential clientCred = null;
      private GSSContext context = null;
      private Oid mech; // underlying mechanism to use

      private GSSManager mgr = GSSManager.getInstance();

      ...
      ...

      private void clientActions() {

         initializeGSS();
         establishContext();
         doCommunication();
      }














Luciani                 Expires January 1 2005                 [Page 84]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Acquire credentials for the client.
       */
      private void initializeGSS() {

         try {

            clientCred = mgr.createCredential(null /*default princ*/,
                 GSSConstants.INDEFINITE_LIFETIME /* max lifetime */,
                 mech /* mechanism to use */,
                 GSSCredentialUsage.INITIATE_ONLY /* init context */);

            Console.Writeline("GSSCredential created for " +
                              cred.getName().ToString());
            Console.Writeline("Credential lifetime (sec)=" +
                              cred.getRemainingLifetime());

         } catch (GSSException e) {
            Console.Writeline("GSS-API error in credential acquisition:"
                              + e.Message);
                   ...
                   ...
           }

           ...
           ...
      }
























Luciani                 Expires January 1 2005                 [Page 85]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Does the security context establishment with the
       * server.
       */
      private void establishContext() {

         byte[] inToken = new byte[0];
         byte[] outToken = null;

         try {

            GSSName peer = mgr.createName(
                                     serviceName,
                                     GSSNameTypes.NT_HOSTBASED_SERVICE);

            context = mgr.createContext(
                          peer,
                          mech,
                          gssCred,
                          GSSConstants.INDEFINITE_LIFETIME/*lifetime*/);

            // Will need to support confidentiality
            context.confidentiality = true;

            while (!context.isEstablished) {

               outToken = context.initSecContext(inToken,
                                                 0,
                                                 inToken.length);

               if (outToken != null)
                  writeGSSToken(outToken);

               if (!context.isEstablished)
                  inToken = readGSSToken();
            }

            GSSName peer = context.srcName;
            Console.Writeline(
                     "Security context established with " +
                     peer +
                     " using underlying mechanism " + mech.toString());

         } catch (GSSException e) {
            Console.Writeline(
               "GSS-API error during context establishment: " +
               e.Message);
         }
           ...
      }

Luciani                 Expires January 1 2005                 [Page 86]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Sends some data to the server and reads back the
       * response.
       */
      private void doCommunication()  {

         byte[] inToken = null;
         byte[] outToken = null;
         byte[] buffer;

         // Container for multiple input-output arguments to and
         // from the per-message routines (e.g., wrap/unwrap).
         MessageProp messgInfo = new MessageProp();

         try {

            /*
             * Now send some bytes to the server to be
             * processed. They will be integrity protected but
             * not encrypted for privacy.
             */

            buffer = readFromFile();

            // Set privacy to false and use the default QOP
            messgInfo.privacy = false;

            outToken = context.wrap(buffer,
                                    0,
                                    buffer.length,
                                    messgInfo);

            writeGSSToken(outToken);

            /*
             * Now read the response from the server.
             */

            inToken = readGSSToken();
            buffer = context.unwrap(inToken,
                                    0,
                                    inToken.length,
                                    messgInfo);








Luciani                 Expires January 1 2005                 [Page 87]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


            // All ok if no exception was thrown!

            GSSName peer = context.srcName;

            Console.Writeline("Message from " +
                              peer.ToString() +
                              " arrived.");
            Console.Writeline("Was it encrypted? " +
                              messgInfo.privacy);
            Console.Writeline("Duplicate Token? " +
                              messgInfo.isDuplicateToken);
            Console.Writeline("Old Token? " +
                              messgInfo.isOldToken);
            Console.Writeline("Unsequenced Token? " +
                              messgInfo.isUnseqToken);
            Console.Writeline("Gap Token? " +
                              messgInfo.isGapToken);

            ...
            ...

         } catch (GSSException e) {
            Console.Writeline("GSS-API error in per-message calls: " +
                              e.Message);
            ...
            ...

         }

         ...
         ...

      } // end of doCommunication method

      ...
      ...

   } // end of class SimpleClient













Luciani                 Expires January 1 2005                 [Page 88]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


7.2. Simple GSS Context Acceptor

   using org.ietf.gss;

   /**
    * This is a partial sketch for a simple server program that acts
    * as a GSS context acceptor. It illustrates how to use the C#
    * bindings for the GSS-API specified in
    * Generic Security Service API Version 2 : C# bindings
    *
    * This code sketch assumes the existence of a GSS-API
    * implementation that supports the mechanisms that it will need and
    * is present as a library package (org.ietf.jgss) either as part of
    * the standard JRE or in the CLASSPATH the application specifies.
    */

   public class SimpleServer {

      private string serviceName;
      private GSSName name;
      private GSSCredential cred;

      private GSSManager mgr;

      ...
      ...

      /**
       * Wait for client connections, establish security contexts and
       * provide service.
       */
      private void loop() {

         ...
         ...

         mgr = GSSManager.getInstance();

         name = mgr.createName(serviceName,
                               GSSNameTypes.NT_HOSTBASED_SERVICE);

         cred = mgr.createCredential(name,
                                     GSSConstants.INDEFINITE_LIFETIME,
                                     null,
                                     GSSCredentialUsage.ACCEPT_ONLY);






Luciani                 Expires January 1 2005                 [Page 89]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


         // Loop infinitely
         while (true) {

            Socket s = serverSock.accept();

            // Start a new thread to serve this connection
            Thread serverThread = new ServerThread(s);
            serverThread.start();

         }
      }

      /**
       * Inner class ServerThread whose run() method provides the
       * secure service to a connection.
       */

      private class ServerThread extends Thread {

         ...
         ...

         /**
          * Deals with the connection from one client. It also
          * handles all GSSException's thrown while talking to
          * this client.
          */
         public void run() {

            byte[] inToken = null;
            byte[] outToken = null;
            byte[] buffer;

            GSSName peer;

            // Container for multiple input-output arguments to and
            // from the per-message routines (ie. wrap/unwrap).
            MessageProp supplInfo = new MessageProp();

            GSSContext secContext = null;

            try {

               // Now do the context establishment loop

               GSSContext context = mgr.createContext(cred);





Luciani                 Expires January 1 2005                 [Page 90]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


               while (!context.isEstablished) {

                  inToken = readGSSToken();

                  outToken = context.acceptSecContext(inToken,
                                                      0,
                                                      inToken.length);

                  if (outToken != null)
                     writeGSSToken(outToken);

               }

               // SimpleServer wants confidentiality to be
               // available. Check for it.
               if (!context.confidentiality) {
                  ...
                  ...
               }

               GSSName peer = context.srcName;
               Oid mech = context.getMech();
               Console.Writeline("Security context established with " +
                                 peer.ToString() +
                                 " using underlying mechanism " +
                                 mech.ToString());

               // Now read the bytes sent by the client to be
               // processed.
               inToken = readGSSToken();

               // Unwrap the message
               buffer = context.unwrap(inToken,
                                       0,
                                       inToken.length,
                                       supplInfo);

               // All ok if no exception was thrown!













Luciani                 Expires January 1 2005                 [Page 91]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


               // Print other supplementary per-message status
               // information
               Console.Writeline("Message from " +
                                 peer.ToString() +
                                 " arrived.");
               Console.Writeline("Was it encrypted? " +
                                 supplInfo.privacy);
               Console.Writeline("Duplicate Token? " +
                                 supplInfo.isDuplicateToken);
               Console.Writeline("Old Token? "  + supplInfo.isOldToken);
               Console.Writeline("Unsequenced Token? " +
                                 supplInfo.isUnseqToken);
               Console.Writeline("Gap Token? "  + supplInfo.isGapToken);

               /*
                * Now process the bytes and send back an encrypted
                * response.
                */

               buffer = serverProcess(buffer);

               // Encipher it and send it across
               supplInfo.privacy = true; // privacy requested
               supplInfo.QOP = 0; // default QOP
               outToken = context.wrap(buffer,
                                       0,
                                       buffer.length,
                                       supplInfo);
               writeGSSToken(outToken);

            } catch (GSSException e) {

               Console.Writeline("GSS-API Error: " + e.Message);

               // Alternatively, could read the e.majorString
               // and the e.minorString properties.
               
               Console.Writeline("Abandoning security context.");

               ...
               ...
            }

            ...
            ...

         } // end of run method in ServerThread

      } // end of inner class ServerThread


Luciani                 Expires January 1 2005                 [Page 92]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      ...
      ...

   } // end of class SimpleServer


8. Security Considerations

   The level of security that can be obtained by using GSS-API is
   dependent on the following factors:
   
   - The integrity of the libraries being utilized.
   - The integrity of the systems where the application executes.
   - The GSS-API mechanism utilized.
   - The GSS-API services utilized by the application.
   - The way that the application utilizes GSS-API.
   
   Application as well as system installers need to be aware of
   the factors mentioned above to avoid security vulnerabilities.


9. IANA Considerations

   This document has no actions for IANA.


10. Acknowledgments

   The author would like to thank the following:
   
   Kabat, J. and Upadhyay, M. for writing the Generic Security Service
   API Version 2 : Java Bindings specification [RFC2853] that
   constitutes the basis of this work.
   
   Jeff Altman for his support and suggestions.
   
   Corby Morris for his initial implementation.
   
   Funding for the RFC Editor function is currently provided by the
   Internet Society.











Luciani                 Expires January 1 2005                 [Page 93]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


11. Normative References

   [RFC2743]  Linn, J., "Generic Security Service Application Program
              Interface Version 2, Update 1", RFC 2743, January 2000.
              
   [RFC2853]  Kabat, J. and Upadhyay, M., "Generic Security Service API
              Version 2 : Java Bindings", RFC 2853, June 2000.
	      
   [RFC1509]  Wray, J., "Generic Security Service API : C-bindings",
              RFC 1509, September 1993.


12. Authors' Addresses

   Juan Carlos Luciani
   Novell, Inc.
   1800 South Novell Place
   Provo, Utah  84606
   US

   EMail: jluciani@novell.com


13. Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.





Luciani                 Expires January 1 2005                 [Page 94]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


14. Disclaimer of Validity

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


15. Copyright Statement

   Copyright (C) The Internet Society (2005).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.
 


































Luciani                 Expires January 1 2005                 [Page 95]
--=__PartC6E4FB1F.0__=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten

--=__PartC6E4FB1F.0__=--




From kitten-bounces@lists.ietf.org Thu Nov 10 14:37:13 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EaIET-0000cY-NE; Thu, 10 Nov 2005 14:37:13 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EaIER-0000cB-E2
	for kitten@megatron.ietf.org; Thu, 10 Nov 2005 14:37:12 -0500
Received: from serrano.cc.columbia.edu (IDENT:cu41754@serrano.cc.columbia.edu
	[128.59.29.6]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id OAA28831
	for <kitten@lists.ietf.org>; Thu, 10 Nov 2005 14:36:43 -0500 (EST)
Received: from [10.100.12.163] ([207.34.158.130])
	(user=jaltman mech=PLAIN bits=0)
	by serrano.cc.columbia.edu (8.13.0/8.13.0) with ESMTP id jAAJb7TQ027118
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 10 Nov 2005 14:37:08 -0500 (EST)
Message-ID: <4373A1EC.4010703@columbia.edu>
Date: Thu, 10 Nov 2005 11:39:24 -0800
From: Jeffrey Altman <jaltman@columbia.edu>
Organization: No Longer Affiliated with Columbia University in the City of
	New York
User-Agent: Thunderbird 1.5 (Windows/20051025)
MIME-Version: 1.0
To: saag@mit.edu, kitten@ietf.org, Russ Housley <housley@vigilsec.com>,
	Sam Hartman <hartmans-ietf@mit.edu>
X-Enigmail-Version: 0.93.0.0
X-No-Spam-Score: Local
X-Scanned-By: MIMEDefang 2.48 on 128.59.29.6
Cc: 
Subject: IETF64 Kitten WG Summary
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1532399664=="
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

This is a cryptographically signed message in MIME format.

--===============1532399664==
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature";
	micalg=sha1; boundary="------------ms030307080206030100070407"

This is a cryptographically signed message in MIME format.

--------------ms030307080206030100070407
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

The Kitten working group met at IETF64 on Wednesday morning.

The presentation materials are available at:
   https://onsite.ietf.org/public/meeting_materials.cgi?meeting_num=64

The Audio Stream is available at

http://limestone.uoregon.edu/ftp/pub/videolab/media/ietf64/ietf64-ch8-wed.mp3.1

The Jabber Logs are available at:

http://www.xmpp.org/ietf-logs/kitten@ietf.xmpp.org/2005-11-09.html

---------------------------------------------------------------------------------

The Kitten Working Group continued its efforts to use the IETF meeting
time for providing high-bandwidth work time to make progress on active
documents.   Unlike the Paris meeting, this room suffered from a lack
of microphones sufficient facilitate our purpose.   I propose that rooms
should provide five microphones.  One for the chair, one wireless for
the presenter, two microphones for front row participants who have read
the documents, and one floor microphone for others.

---------------------------------------------------------------------------------

Summary of document status:

* PRF API extension for GSS draft -07 submitted to IESG

* PRF API extension for GSS KRB5 mech draft -04 submitted to IESG

* C# Bindings - New draft sent to Internet-Drafts for publication
  draft-ietf-kitten-gssapi-csharp-bindings-00.txt

* Desired Enhancements to GSS Naming draft-03
  WG last call in progress ending Nov 23rd

* GSS-API Naming Extensions
  Draft -01 submitted.   Topic of technical discussion at this meeting.

* Clarifications to GSSAPI v2 Update 1
  No draft yet published.  Topic of technical discussion at this
  meeting.

--------------------------------------------------------------------------------

Technical Discussions: GSS-API Naming Extensions
draft-ietf-kitten-gssapi-naming-exts-01.txt

The working group reviewed the open issues related to this work.

Discussions were held on the merits of the gss_inquire_name_attribute()
functionality.  A preliminary decision was made to remove the
functionality from the draft as it has the potential to significantly
reduce the portability of applications.

Lengthy discussions were held on the support of negative ACLs.  The
fundamental problem with supporting negative ACLs is that in order for
them to be valid the evaluator must be able determine that the complete
set of relevant membership information is available.  This is possible
to enforce when there is only a single source of ACEs.  However, in the
model being considered, ACEs can be provided from multiple sources and
it is extremely difficult to ensure that conflicts or a failure to
provide relevant ACEs do not occur.  The WG believes there is a need to
support negative ACLs for applications such as NFSv4.  The WG proposes
supporting negative ACLs and writing appropriate Security Considerations
text describing the dangers of certain use cases.

There was much discussion of how Microsoft solved the issues in Windows
although it appears that most of the solutions are enforced by the user
interface tools preventing the construction of dangerous combinations.

It is clear that the use of "NAME" in GSS to refer to the "principal"
(the entity being authenticated) is confusing for many people.  The
documents need to be extra careful to specify the terminology.

The former CAT draft "Extended Generic Security Service APIs: XGSS-APIs
Access control and delegation extensions" was discussed as it applied to
the choice between supporting enumerated native types vs. OID tagged
blobs.  A preliminary decision was made to use OID tagged blobs.


Technical Discussions: GSS API v2 upd 1 Clarifications

The working group during the meeting wrote text for this document.
Sections include:
 - Character-set issues
 - Thread safety issues
 - Channel Bindings
   + what to do about lack of a GSS_C_AF_INET6 symbol
 - C language utilization
   + type utilization
   + name spaces
A first draft should be available real soon.

Open issue.  Are channel bindings defined on a per-mechanism basis
or are they supposed to be defined in a general manner?



--------------ms030307080206030100070407
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJPzCC
AvowggJjoAMCAQICAw7NrDANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDUwNTI3MTc0MjQzWhcNMDYwNTI3MTc0MjQz
WjBrMQ8wDQYDVQQEEwZBbHRtYW4xFTATBgNVBCoTDEplZmZyZXkgRXJpYzEcMBoGA1UEAxMT
SmVmZnJleSBFcmljIEFsdG1hbjEjMCEGCSqGSIb3DQEJARYUamFsdG1hbkBjb2x1bWJpYS5l
ZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+LutDu/YyHreNfoYd+ZtOjXsL
h67F2cmcVuBPBz+ZGDA+WpVEHrqXaZZO8acXBR5uAVfiwA1acE/kvD/CN5kAqx1VJuQ8Pvyk
iGHhUYTd27ZTliBIrptC7C/381gVwkS+a8jQFPJPO+OktZDzAYplGRY/MQCV8dIsvXUjucox
7TwTTdoLAJYRvHtfEcaCc6mO4ph6NeXQw8Grlx3IRAlTrkE5fBGyjH6R4fqnFTXRQAh1/bG+
i8hQvE6mud3mXdL2t7NP1Qxd9wW0/F/pnWY12IFP/luc3zEzIPvAe+nJluLuSEj0LZgP16mF
xBj1p+u9HPWcHRVX6q7+MQ0RWOv1AgMBAAGjMTAvMB8GA1UdEQQYMBaBFGphbHRtYW5AY29s
dW1iaWEuZWR1MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEEBQADgYEAUDUuzxiq8bbI8vq2
swRK513RphZp+fepyKU5mwBI6aF4GcmqITQILtfTG2SXnjSeY99d+bjOdK1DJFvVh9aOy8mh
2NbEnqMnJIZtg5+eEU64DIV5bQdDRpi99H9vA0sRATIquut+3YHba+zArj0VkVof2VI+ToBu
sHdtSrZYo0gwggL6MIICY6ADAgECAgMOzawwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMC
WkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1Ro
YXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA1MDUyNzE3NDI0M1oXDTA2
MDUyNzE3NDI0M1owazEPMA0GA1UEBBMGQWx0bWFuMRUwEwYDVQQqEwxKZWZmcmV5IEVyaWMx
HDAaBgNVBAMTE0plZmZyZXkgRXJpYyBBbHRtYW4xIzAhBgkqhkiG9w0BCQEWFGphbHRtYW5A
Y29sdW1iaWEuZWR1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvi7rQ7v2Mh63
jX6GHfmbTo17C4euxdnJnFbgTwc/mRgwPlqVRB66l2mWTvGnFwUebgFX4sANWnBP5Lw/wjeZ
AKsdVSbkPD78pIhh4VGE3du2U5YgSK6bQuwv9/NYFcJEvmvI0BTyTzvjpLWQ8wGKZRkWPzEA
lfHSLL11I7nKMe08E03aCwCWEbx7XxHGgnOpjuKYejXl0MPBq5cdyEQJU65BOXwRsox+keH6
pxU10UAIdf2xvovIULxOprnd5l3S9rezT9UMXfcFtPxf6Z1mNdiBT/5bnN8xMyD7wHvpyZbi
7khI9C2YD9ephcQY9afrvRz1nB0VV+qu/jENEVjr9QIDAQABozEwLzAfBgNVHREEGDAWgRRq
YWx0bWFuQGNvbHVtYmlhLmVkdTAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBAFA1
Ls8YqvG2yPL6trMESudd0aYWafn3qcilOZsASOmheBnJqiE0CC7X0xtkl540nmPfXfm4znSt
QyRb1YfWjsvJodjWxJ6jJySGbYOfnhFOuAyFeW0HQ0aYvfR/bwNLEQEyKrrrft2B22vswK49
FZFaH9lSPk6AbrB3bUq2WKNIMIIDPzCCAqigAwIBAgIBDTANBgkqhkiG9w0BAQUFADCB0TEL
MAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3du
MRowGAYDVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIENB
MSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUuY29tMB4XDTAzMDcx
NzAwMDAwMFoXDTEzMDcxNjIzNTk1OVowYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0
ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVl
bWFpbCBJc3N1aW5nIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEpjxVc1X7TrnK
mVoeaMB1BHCd3+n/ox7svc31W/Iadr1/DDph8r9RzgHU5VAKMNcCY1osiRVwjt3J8CuFWqo/
cVbLrzwLB+fxH5E2JCoTzyvV84J3PQO+K/67GD4Hv0CAAmTXp6a7n2XRxSpUhQ9IBH+nttE8
YQRAHmQZcmC3+wIDAQABo4GUMIGRMBIGA1UdEwEB/wQIMAYBAf8CAQAwQwYDVR0fBDwwOjA4
oDagNIYyaHR0cDovL2NybC50aGF3dGUuY29tL1RoYXd0ZVBlcnNvbmFsRnJlZW1haWxDQS5j
cmwwCwYDVR0PBAQDAgEGMCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFQcml2YXRlTGFiZWwy
LTEzODANBgkqhkiG9w0BAQUFAAOBgQBIjNFQg+oLLswNo2asZw9/r6y+whehQ5aUnX9MIbj4
Nh+qLZ82L8D0HFAgk3A8/a3hYWLD2ToZfoSxmRsAxRoLgnSeJVCUYsfbJ3FXJY3dqZw5jowg
T2Vfldr394fWxghOrvbqNOUQGls1TXfjViF4gtwhGTXeJLHTHUb/XV9lTzGCAzswggM3AgEB
MGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0
ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAgMOzaww
CQYFKw4DAhoFAKCCAacwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUx
DxcNMDUxMTEwMTkzOTI0WjAjBgkqhkiG9w0BCQQxFgQUQNX6atUklJ0dKny4KauQDcrADY0w
UgYJKoZIhvcNAQkPMUUwQzAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcN
AwICAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgweAYJKwYBBAGCNxAEMWswaTBiMQswCQYD
VQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UE
AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAw7NrDB6BgsqhkiG9w0B
CRACCzFroGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQ
dHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENB
AgMOzawwDQYJKoZIhvcNAQEBBQAEggEAQ/A+vye6QTNYXvx5f2oR8j+WklN5FU0YXmaKzLNK
Qr/jow+DYflYZGlEyG8DwphRAkcNtYTfKSO8yExCEkcmFps5Egs23uGL9kjRpxo8aDEC32K4
kEtMoXF3kCVtoC22kaOw6ASMjKf4G4xy4XWl0YJiGFXn2b1zpns6xiF6PK636JL1LFKGanvE
WeYN3eI0U8PJrL54ku93sfd1IX1+QZQPsQkoq73Nu6dlYxerRoVHmaMdUgCkzIfmtHiXrh+B
6Uul+jyy4xiFloCxEEXydoSFDCZAWB9I7mhUuFk6sS5ZAJXIR4yTEwnLq7BsiLzch3FWzv4g
aLPRVwOXXTp6zgAAAAAAAA==
--------------ms030307080206030100070407--


--===============1532399664==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten

--===============1532399664==--




From kitten-bounces@lists.ietf.org Fri Nov 11 12:08:15 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EacNr-0001Pw-Ta; Fri, 11 Nov 2005 12:08:15 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EacNq-0001PF-I6
	for kitten@megatron.ietf.org; Fri, 11 Nov 2005 12:08:14 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id MAA20278
	for <kitten@ietf.org>; Fri, 11 Nov 2005 12:07:45 -0500 (EST)
Received: from furball.foretec.com ([132.151.15.110] helo=foretec.com)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EaceJ-0004ds-1W
	for kitten@ietf.org; Fri, 11 Nov 2005 12:25:15 -0500
Received: from localhost.cnri.reston.va.us ([127.0.0.1]
	helo=furball.foretec.com) by foretec.com with esmtp (Exim 4.30)
	id 1EacNp-00053U-Bm; Fri, 11 Nov 2005 12:08:13 -0500
Received: from 10.27.16.5 (SquirrelMail authenticated user ids)
	by furball.foretec.com with HTTP;
	Fri, 11 Nov 2005 12:08:13 -0500 (EST)
Message-ID: <2580.10.27.16.5.1131728893.squirrel@furball.foretec.com>
In-Reply-To: <43731E9F.365D.009A.0@novell.com>
References: <43731E9F.365D.009A.0@novell.com>
Date: Fri, 11 Nov 2005 12:08:13 -0500 (EST)
From: internet-drafts@ietf.org
To: "Juan Carlos Luciani" <jluciani@novell.com>
User-Agent: SquirrelMail/1.4.4
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
X-Spam-Score: 1.1 (+)
X-Scan-Signature: 798b2e660f1819ae38035ac1d8d5e3ab
Content-Transfer-Encoding: 8bit
Cc: kitten@ietf.org
Subject: Re: Re-submit of GSS_API:V2 C# Bindings draft
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: internet-drafts@ietf.org
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

Please delet the following and resubmit. Thank you.

   This document is an Internet-Draft and is subject to all provisions
   of section 3 of RFC 3667.


> This e- mail is being sent to re-submit the:
>
>   GSS_API V2: C# Bindings
>   draft-  ietf-  kitten-  gssapi-  csharp-  bindings-  00.txt
>
> as a Kitten working group draft. The draft is being
> re-submitted to correct the copyright date.
>
> Thank you,
>
> Juan Carlos Luciani
> jluciani@novell.com
>
>



_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Mon Nov 14 19:23:24 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1Ebobc-0002Xy-EO; Mon, 14 Nov 2005 19:23:24 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1Ebobb-0002Xo-1j
	for kitten@megatron.ietf.org; Mon, 14 Nov 2005 19:23:23 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id TAA13319
	for <kitten@ietf.org>; Mon, 14 Nov 2005 19:22:51 -0500 (EST)
Received: from m1c1236d0.tmodns.net ([208.54.18.28]
	helo=carter-zimmerman.mit.edu)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Ebosg-00059B-5i
	for kitten@ietf.org; Mon, 14 Nov 2005 19:41:05 -0500
Received: by carter-zimmerman.mit.edu (Postfix, from userid 8042)
	id 2CC15E0073; Mon, 14 Nov 2005 18:22:49 -0500 (EST)
To: kitten@ietf.org
From: Sam Hartman <hartmans-ietf@mit.edu>
Message-Id: <20051114232249.2CC15E0073@carter-zimmerman.mit.edu>
Date: Mon, 14 Nov 2005 18:22:49 -0500 (EST)
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 798b2e660f1819ae38035ac1d8d5e3ab
Cc: 
Subject: AD review of draft-ietf-kitten-gssapi-prf-07
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org



The The following are AD review comments for the GSSAPI PRF draft.  I may end up issuing a last call while these comments are still under discussion.

1) Update the reference to RFC 1750 to the document that obseletes it.

2) Part of the document implies that the output should be as long as
   requested by the requester; part says that it may be shorter.  Which is it?

     If the implementation cannot produce the desired output due to lack
     of resources then it MUST return GSS_S_FAILURE and MUST set a
     suitable minor status code.

     Mechanisms MAY limit the output of the PRF, possibly in ways related
     to the types of cryptographic keys available for the PRF function,
     thus the prf_out output of GSS_Pseudo_random() MAY be smaller than

I think you need to give enough advice to tell applications whether
they should expect to need counters and other extension mechanisms if
they call the PRF for reasonably short outputs like the sizes of
common crypto keys.  I hope the answer is no.


_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Tue Nov 15 14:33:38 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1Ec6Yk-0007pl-5R; Tue, 15 Nov 2005 14:33:38 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1Ec6Yj-0007pP-7r
	for kitten@megatron.ietf.org; Tue, 15 Nov 2005 14:33:37 -0500
Received: from newodin.ietf.org (newodin.ietf.org [10.27.6.50])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id OAA20131
	for <kitten@lists.ietf.org>; Tue, 15 Nov 2005 14:33:05 -0500 (EST)
Received: from apache by newodin.ietf.org with local (Exim 4.43)
	id 1Ec6Yi-0005v3-Mx; Tue, 15 Nov 2005 14:33:36 -0500
X-test-idtracker: no
To: IETF-Announce <ietf-announce@ietf.org>
From: The IESG <iesg-secretary@ietf.org>
Message-Id: <E1Ec6Yi-0005v3-Mx@newodin.ietf.org>
Date: Tue, 15 Nov 2005 14:33:36 -0500
Cc: kitten@ietf.org
Subject: Last Call: 'A PRF API extension for the GSS-API' to Proposed
	Standard 
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: iesg@ietf.org
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

The IESG has received a request from the Kitten (GSS-API Next Generation) WG to
 
consider the following documents:

- 'A PRF API extension for the GSS-API '
   <draft-ietf-kitten-gssapi-prf-07.txt> as a Proposed Standard
- 'A PRF for the Kerberos V GSS-API Mechanism '
   <draft-ietf-kitten-krb5-gssapi-prf-04.txt> as a Proposed Standard

The IESG plans to make a decision in the next few weeks, and solicits
final comments on this action.  Please send any comments to the
iesg@ietf.org or ietf@ietf.org mailing lists by 2005-11-30.

The file can be obtained via
http://www.ietf.org/internet-drafts/draft-ietf-kitten-gssapi-prf-07.txt
http://www.ietf.org/internet-drafts/draft-ietf-kitten-krb5-gssapi-prf-04.txt


_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Wed Nov 16 19:12:27 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcXO7-0004g1-7g; Wed, 16 Nov 2005 19:12:27 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcXO6-0004fw-40
	for kitten@megatron.ietf.org; Wed, 16 Nov 2005 19:12:26 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id TAA09613
	for <kitten@ietf.org>; Wed, 16 Nov 2005 19:11:49 -0500 (EST)
Received: from brmea-mail-3.sun.com ([192.18.98.34])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EcXfa-0008W5-2K
	for kitten@ietf.org; Wed, 16 Nov 2005 19:30:31 -0500
Received: from centralmail1brm.Central.Sun.COM
	(centralmail1brm.central.sun.com [129.147.62.1])
	by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id jAH0CK3F015817
	for <kitten@ietf.org>; Wed, 16 Nov 2005 17:12:20 -0700 (MST)
Received: from binky.Central.Sun.COM (binky.Central.Sun.COM [129.153.128.104])
	by centralmail1brm.Central.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,
	v2.2) with ESMTP id jAH0CK5I028822
	for <kitten@ietf.org>; Wed, 16 Nov 2005 17:12:20 -0700 (MST)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3) with ESMTP id
	jAH0CIAs010795
	for <kitten@ietf.org>; Wed, 16 Nov 2005 18:12:18 -0600 (CST)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3/Submit) id jAH0CH5c010794
	for kitten@ietf.org; Wed, 16 Nov 2005 18:12:17 -0600 (CST)
Date: Wed, 16 Nov 2005 18:12:17 -0600
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: kitten@ietf.org
Message-ID: <20051117001217.GR20237@binky.Central.Sun.COM>
Mail-Followup-To: kitten@ietf.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.7i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 7655788c23eb79e336f5f8ba8bce7906
Cc: 
Subject: Interesting multi-mech/multi-bindings exported sec context token
	issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

Exported security context tokens, unlike exported name tokens, have no
header identifying a mechanism or anything else.

Multi-mechanism non-monolythic implementations of the GSS-API can deal
with this by adding a header to the token as output by a mechanism and
then stripping it off prior to calling the mechanism to import it.

That works well enough, and it is what Solaris' libgss does.

But think now of a Java implementation where some mechanisms are
implemented in Java, and some are accessed through a Java bridge to an
independent implementation through C bindings.

This approach then doesn't work in such a situation because a security
context token exported through the Java bindings but for a mechanism
accessed through the bridge to the C bindings cannot then be imported by
an application using only the C bindings -- the C implementation won't
expect the header added by the Java bindings.

Thoughts?

Nico
-- 

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Wed Nov 16 20:47:28 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcYs4-0005HI-1Z; Wed, 16 Nov 2005 20:47:28 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcYs2-0005H6-JL
	for kitten@megatron.ietf.org; Wed, 16 Nov 2005 20:47:26 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id UAA14349
	for <kitten@ietf.org>; Wed, 16 Nov 2005 20:46:51 -0500 (EST)
Received: from brmea-mail-3.sun.com ([192.18.98.34])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EcZ9Z-0002zg-MT
	for kitten@ietf.org; Wed, 16 Nov 2005 21:05:35 -0500
Received: from centralmail2brm.Central.Sun.COM
	(centralmail2brm.central.sun.com [129.147.62.14])
	by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id jAH1lJ3F004895
	for <kitten@ietf.org>; Wed, 16 Nov 2005 18:47:19 -0700 (MST)
Received: from binky.Central.Sun.COM (binky.Central.Sun.COM [129.153.128.104])
	by centralmail2brm.Central.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,
	v2.2) with ESMTP id jAH1lJgr002652
	for <kitten@ietf.org>; Wed, 16 Nov 2005 18:47:19 -0700 (MST)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3) with ESMTP id
	jAH1lJ0X010864
	for <kitten@ietf.org>; Wed, 16 Nov 2005 19:47:19 -0600 (CST)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3/Submit) id jAH1lJQ7010863
	for kitten@ietf.org; Wed, 16 Nov 2005 19:47:19 -0600 (CST)
Date: Wed, 16 Nov 2005 19:47:19 -0600
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: kitten@ietf.org
Message-ID: <20051117014718.GV7275@binky.Central.Sun.COM>
Mail-Followup-To: kitten@ietf.org
References: <20051117001217.GR20237@binky.Central.Sun.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20051117001217.GR20237@binky.Central.Sun.COM>
User-Agent: Mutt/1.5.7i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: d17f825e43c9aed4fd65b7edddddec89
Cc: 
Subject: Re: Interesting multi-mech/multi-bindings exported sec context
	token	issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

> Thoughts?

I should add my thoughts on how to solve the problem while I'm at it:

 - RECOMMEND the use of a token header, much like the exported name
   token header, for exported security context tokens.

   I say RECOMMEND but would rather REQUIRE.

Nico
-- 

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 09:57:06 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EclCE-0004Ls-5k; Thu, 17 Nov 2005 09:57:06 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EclCC-0004Lm-Bt
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 09:57:04 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id JAA28522
	for <kitten@ietf.org>; Thu, 17 Nov 2005 09:56:31 -0500 (EST)
Received: from nwkea-mail-1.sun.com ([192.18.42.13])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EclTo-0004ts-AA
	for kitten@ietf.org; Thu, 17 Nov 2005 10:15:19 -0500
Received: from jurassic.eng.sun.com ([129.146.228.31])
	by nwkea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id jAHEuxdK020544
	for <kitten@ietf.org>; Thu, 17 Nov 2005 06:56:59 -0800 (PST)
Received: from [192.9.61.32] (punchin-wyllys.SFBay.Sun.COM [192.9.61.32])
	by jurassic.eng.sun.com (8.13.5+Sun/8.13.5) with ESMTP id
	jAHEuwBp008810
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO)
	for <kitten@ietf.org>; Thu, 17 Nov 2005 06:56:59 -0800 (PST)
Message-ID: <437C999E.2040000@sun.com>
Date: Thu, 17 Nov 2005 09:54:22 -0500
From: Wyllys Ingersoll <wyllys.ingersoll@sun.com>
User-Agent: Mail/News 1.4 (X11/20050929)
MIME-Version: 1.0
To: kitten@ietf.org
References: <20051117001217.GR20237@binky.Central.Sun.COM>
	<20051117014718.GV7275@binky.Central.Sun.COM>
In-Reply-To: <20051117014718.GV7275@binky.Central.Sun.COM>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: cf4fa59384e76e63313391b70cd0dd25
Content-Transfer-Encoding: 7bit
Cc: 
Subject: Re: Interesting multi-mech/multi-bindings exported sec context	token
 issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

Nicolas Williams wrote:
>> Thoughts?
>>     
>
> I should add my thoughts on how to solve the problem while I'm at it:
>
>  - RECOMMEND the use of a token header, much like the exported name
>    token header, for exported security context tokens.
>
>    I say RECOMMEND but would rather REQUIRE.
>   

This sounds reasonable to me.

-Wyllys


_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 11:12:48 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcmNU-0003p9-2L; Thu, 17 Nov 2005 11:12:48 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcmNS-0003nr-OP
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 11:12:46 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id LAA03152
	for <kitten@ietf.org>; Thu, 17 Nov 2005 11:12:12 -0500 (EST)
Received: from serrano.cc.columbia.edu ([128.59.29.6] ident=cu41754)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Ecmf7-0007ep-BL
	for kitten@ietf.org; Thu, 17 Nov 2005 11:31:02 -0500
Received: from [192.168.1.11] (cpe-68-175-91-105.nyc.res.rr.com
	[68.175.91.105]) (user=jaltman mech=PLAIN bits=0)
	by serrano.cc.columbia.edu (8.13.0/8.13.0) with ESMTP id jAHGCicL010502
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <kitten@ietf.org>; Thu, 17 Nov 2005 11:12:44 -0500 (EST)
Message-ID: <437CAC96.6090401@columbia.edu>
Date: Thu, 17 Nov 2005 11:15:18 -0500
From: Jeffrey Altman <jaltman@columbia.edu>
Organization: No Longer Affiliated with Columbia University in the City of
	New York
User-Agent: Thunderbird 1.5 (Windows/20051025)
MIME-Version: 1.0
To: kitten@ietf.org
References: <20051117001217.GR20237@binky.Central.Sun.COM>
	<20051117014718.GV7275@binky.Central.Sun.COM>
In-Reply-To: <20051117014718.GV7275@binky.Central.Sun.COM>
X-Enigmail-Version: 0.93.0.0
X-No-Spam-Score: Local
X-Scanned-By: MIMEDefang 2.48 on 128.59.29.6
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 9a2be21919e71dc6faef12b370c4ecf5
Cc: 
Subject: Re: Interesting multi-mech/multi-bindings exported sec context	token
 issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0108015466=="
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

This is a cryptographically signed message in MIME format.

--===============0108015466==
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature";
	micalg=sha1; boundary="------------ms000400030809020006020800"

This is a cryptographically signed message in MIME format.

--------------ms000400030809020006020800
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Nicolas Williams wrote:
>> Thoughts?
> 
> I should add my thoughts on how to solve the problem while I'm at it:
> 
>  - RECOMMEND the use of a token header, much like the exported name
>    token header, for exported security context tokens.
> 
>    I say RECOMMEND but would rather REQUIRE.
> 
> Nico

Nico:

This sounds like another topic for which text should be added to
GSSAPIv2u1 Clarifications.

I agree with you that exporting tokens with a header should be
strongly recommended.   You will need to specify what the header
format is.

One thing that the Java implementation can do in this case because
it is binding to a particular implementation is to keep track of
whether or not a header is being used and strip it off itself
or add it as needed.

Even assuming that such a change is made for all future gss library
distributions it will be the case that the existing distributions
will still exist for a long time to come.

Jeffrey Altman

--------------ms000400030809020006020800
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJPzCC
AvowggJjoAMCAQICAw7NrDANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDUwNTI3MTc0MjQzWhcNMDYwNTI3MTc0MjQz
WjBrMQ8wDQYDVQQEEwZBbHRtYW4xFTATBgNVBCoTDEplZmZyZXkgRXJpYzEcMBoGA1UEAxMT
SmVmZnJleSBFcmljIEFsdG1hbjEjMCEGCSqGSIb3DQEJARYUamFsdG1hbkBjb2x1bWJpYS5l
ZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+LutDu/YyHreNfoYd+ZtOjXsL
h67F2cmcVuBPBz+ZGDA+WpVEHrqXaZZO8acXBR5uAVfiwA1acE/kvD/CN5kAqx1VJuQ8Pvyk
iGHhUYTd27ZTliBIrptC7C/381gVwkS+a8jQFPJPO+OktZDzAYplGRY/MQCV8dIsvXUjucox
7TwTTdoLAJYRvHtfEcaCc6mO4ph6NeXQw8Grlx3IRAlTrkE5fBGyjH6R4fqnFTXRQAh1/bG+
i8hQvE6mud3mXdL2t7NP1Qxd9wW0/F/pnWY12IFP/luc3zEzIPvAe+nJluLuSEj0LZgP16mF
xBj1p+u9HPWcHRVX6q7+MQ0RWOv1AgMBAAGjMTAvMB8GA1UdEQQYMBaBFGphbHRtYW5AY29s
dW1iaWEuZWR1MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEEBQADgYEAUDUuzxiq8bbI8vq2
swRK513RphZp+fepyKU5mwBI6aF4GcmqITQILtfTG2SXnjSeY99d+bjOdK1DJFvVh9aOy8mh
2NbEnqMnJIZtg5+eEU64DIV5bQdDRpi99H9vA0sRATIquut+3YHba+zArj0VkVof2VI+ToBu
sHdtSrZYo0gwggL6MIICY6ADAgECAgMOzawwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMC
WkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1Ro
YXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA1MDUyNzE3NDI0M1oXDTA2
MDUyNzE3NDI0M1owazEPMA0GA1UEBBMGQWx0bWFuMRUwEwYDVQQqEwxKZWZmcmV5IEVyaWMx
HDAaBgNVBAMTE0plZmZyZXkgRXJpYyBBbHRtYW4xIzAhBgkqhkiG9w0BCQEWFGphbHRtYW5A
Y29sdW1iaWEuZWR1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvi7rQ7v2Mh63
jX6GHfmbTo17C4euxdnJnFbgTwc/mRgwPlqVRB66l2mWTvGnFwUebgFX4sANWnBP5Lw/wjeZ
AKsdVSbkPD78pIhh4VGE3du2U5YgSK6bQuwv9/NYFcJEvmvI0BTyTzvjpLWQ8wGKZRkWPzEA
lfHSLL11I7nKMe08E03aCwCWEbx7XxHGgnOpjuKYejXl0MPBq5cdyEQJU65BOXwRsox+keH6
pxU10UAIdf2xvovIULxOprnd5l3S9rezT9UMXfcFtPxf6Z1mNdiBT/5bnN8xMyD7wHvpyZbi
7khI9C2YD9ephcQY9afrvRz1nB0VV+qu/jENEVjr9QIDAQABozEwLzAfBgNVHREEGDAWgRRq
YWx0bWFuQGNvbHVtYmlhLmVkdTAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBAFA1
Ls8YqvG2yPL6trMESudd0aYWafn3qcilOZsASOmheBnJqiE0CC7X0xtkl540nmPfXfm4znSt
QyRb1YfWjsvJodjWxJ6jJySGbYOfnhFOuAyFeW0HQ0aYvfR/bwNLEQEyKrrrft2B22vswK49
FZFaH9lSPk6AbrB3bUq2WKNIMIIDPzCCAqigAwIBAgIBDTANBgkqhkiG9w0BAQUFADCB0TEL
MAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3du
MRowGAYDVQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT
ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIENB
MSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUuY29tMB4XDTAzMDcx
NzAwMDAwMFoXDTEzMDcxNjIzNTk1OVowYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0
ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVl
bWFpbCBJc3N1aW5nIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEpjxVc1X7TrnK
mVoeaMB1BHCd3+n/ox7svc31W/Iadr1/DDph8r9RzgHU5VAKMNcCY1osiRVwjt3J8CuFWqo/
cVbLrzwLB+fxH5E2JCoTzyvV84J3PQO+K/67GD4Hv0CAAmTXp6a7n2XRxSpUhQ9IBH+nttE8
YQRAHmQZcmC3+wIDAQABo4GUMIGRMBIGA1UdEwEB/wQIMAYBAf8CAQAwQwYDVR0fBDwwOjA4
oDagNIYyaHR0cDovL2NybC50aGF3dGUuY29tL1RoYXd0ZVBlcnNvbmFsRnJlZW1haWxDQS5j
cmwwCwYDVR0PBAQDAgEGMCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFQcml2YXRlTGFiZWwy
LTEzODANBgkqhkiG9w0BAQUFAAOBgQBIjNFQg+oLLswNo2asZw9/r6y+whehQ5aUnX9MIbj4
Nh+qLZ82L8D0HFAgk3A8/a3hYWLD2ToZfoSxmRsAxRoLgnSeJVCUYsfbJ3FXJY3dqZw5jowg
T2Vfldr394fWxghOrvbqNOUQGls1TXfjViF4gtwhGTXeJLHTHUb/XV9lTzGCAzswggM3AgEB
MGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0
ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAgMOzaww
CQYFKw4DAhoFAKCCAacwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUx
DxcNMDUxMTE3MTYxNTE4WjAjBgkqhkiG9w0BCQQxFgQU6UHaImde8DL9rxjb1quIJuMdQtow
UgYJKoZIhvcNAQkPMUUwQzAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcN
AwICAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgweAYJKwYBBAGCNxAEMWswaTBiMQswCQYD
VQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UE
AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAw7NrDB6BgsqhkiG9w0B
CRACCzFroGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQ
dHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENB
AgMOzawwDQYJKoZIhvcNAQEBBQAEggEAMMJCQMAse3ZC/KFnxCJpaLOgixbzqLDudjZlZT3E
Dcy1lOImvebavV2MkN3gjK2bijkKGp72ZrurzjncKqeNdIglpxxlI7BynYBMI0CnOkYWSKnI
iiDsVrOq6raaZsY110IAh3BnKYrv88uiRs9hIqTwl9DbMp5e+ZDhFkvBUgYGrnMQZNCbq4An
5br572yKckF8rUejgZFFv98YG8ApOat6EtgtfCSqSTGnXDj6NlnFtcn3T7sBGOZaiaXtfaoU
M9mjQou+trDTNCiNMNktl7SeD2LXLGEtOwl5/vp1qLMBp07HaA/ivOsuG0Y5KeG5pZwmTEep
/k3fUE+1Gx8bAAAAAAAAAA==
--------------ms000400030809020006020800--


--===============0108015466==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten

--===============0108015466==--




From kitten-bounces@lists.ietf.org Thu Nov 17 11:42:33 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcmqG-0000pn-VJ; Thu, 17 Nov 2005 11:42:33 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcmqE-0000pX-Jv; Thu, 17 Nov 2005 11:42:31 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id LAA05357;
	Thu, 17 Nov 2005 11:41:07 -0500 (EST)
Received: from lucius.provo.novell.com ([137.65.81.172])
	by ietf-mx.ietf.org with esmtp (Exim 4.43)
	id 1Ecn71-0000LM-Eo; Thu, 17 Nov 2005 11:59:57 -0500
Received: from INET-PRV1-MTA by lucius.provo.novell.com
	with Novell_GroupWise; Thu, 17 Nov 2005 09:41:23 -0700
Message-Id: <437C5038.365D.009A.0@novell.com>
X-Mailer: Novell GroupWise Internet Agent 7.0 
Date: Thu, 17 Nov 2005 09:41:12 -0700
From: "Juan Carlos Luciani" <jluciani@novell.com>
To: <internet-drafts@ietf.org>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=__Part5D7F6FB8.0__="
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 4511df67ef0e3056b20cbe06ee7ff2a6
Cc: kitten@ietf.org
Subject: Re: Re-submit of GSS_API:V2 C# Bindings draft
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=__Part5D7F6FB8.0__=
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

The attached draft has the changes requested.

Thanks for your help,

Juan Carlos Luciani

>>> <internet-drafts@ietf.org> 11/11/05 10:08 am >>> 
Please delet the following and resubmit. Thank you.

   This document is an Internet-Draft and is subject to all provisions
   of section 3 of RFC 3667.


> This e- mail is being sent to re-submit the:
>
>   GSS_API V2: C# Bindings
>   draft-  ietf-  kitten-  gssapi-  csharp-  bindings-  00.txt
>
> as a Kitten working group draft. The draft is being
> re-submitted to correct the copyright date.
>
> Thank you,
>
> Juan Carlos Luciani
> jluciani@novell.com
>
>



_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten


--=__Part5D7F6FB8.0__=
Content-Type: text/plain;
	name="draft-ietf-kitten-gssapi-csharp-bindings-00.txt"
Content-Disposition: attachment;
	filename="draft-ietf-kitten-gssapi-csharp-bindings-00.txt"
Content-Transfer-Encoding: 8bit

NETWORK WORKING GROUP                                      J. C. Luciani
INTERNET-DRAFT                                              Novell, Inc.
Expires: April 8, 2006                                  November 8, 2005

                        GSS_API V2: C# Bindings
               draft-ietf-kitten-gssapi-csharp-bindings-00.txt


Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

Abstract

   The Generic Security Services Application Program Interface (GSS-API)
   offers application programmers uniform access to security services
   atop a variety of underlying cryptographic mechanisms.  This document
   specifies the C# language bindings for GSS-API which is described at
   a language independent conceptual level in RFC 2743 [RFC2743].

   The GSS-API C# bindings were designed to emulate the Java bindings as
   defined in RFC 2853 [RFC2853].












Luciani                 Expires April 8, 2006                   [Page 1]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


Table of Contents

1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2. GSS-API Operational Paradigm. . . . . . . . . . . . . . . . . . . . 6  
3. Additional Controls . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1. Delegation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9   
3.2. Mutual Authentication . . . . . . . . . . . . . . . . . . . . . . 9
3.3. Replay and Out-of-Sequence Detection. . . . . . . . . . . . . .  10 
3.4. Anonymous Authentication. . . . . . . . . . . . . . . . . . . .  11  
3.5. Confidentiality . . . . . . . . . . . . . . . . . . . . . . . .  12    
3.6. Inter-process Context Transfer. . . . . . . . . . . . . . . . .  12  
3.7. The Use of Incomplete Contexts. . . . . . . . . . . . . . . . .  13  
4. C# GSS-API Overview . . . . . . . . . . . . . . . . . . . . . . .  13  
4.1. Object Identifiers. . . . . . . . . . . . . . . . . . . . . . .  14  
4.2. Object Identifier Sets. . . . . . . . . . . . . . . . . . . . .  14    
4.3. Credentials . . . . . . . . . . . . . . . . . . . . . . . . . .  14   
4.4. Contexts. . . . . . . . . . . . . . . . . . . . . . . . . . . .  16   
4.5. Authentication Tokens . . . . . . . . . . . . . . . . . . . . .  17 
4.6. Interprocess Tokens . . . . . . . . . . . . . . . . . . . . . .  17   
4.7. Error Reporting . . . . . . . . . . . . . . . . . . . . . . . .  17 
4.7.1. GSS Status Codes. . . . . . . . . . . . . . . . . . . . . . .  18  
4.7.2. Mechanism-specific Codes. . . . . . . . . . . . . . . . . . .  20   
4.7.3. Suplementary Status Codes . . . . . . . . . . . . . . . . . .  20 
4.8. Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  21   
4.9. Channel Bindings. . . . . . . . . . . . . . . . . . . . . . . .  23    
5. Introduction to GSS-API Classes and Interfaces. . . . . . . . . .  24   
5.1. GSSManager Class. . . . . . . . . . . . . . . . . . . . . . . .  24    
5.2. GSSName Interface . . . . . . . . . . . . . . . . . . . . . . .  25  
5.3. GSSCredential Interface . . . . . . . . . . . . . . . . . . . .  25  
5.4. GSSContext Interface. . . . . . . . . . . . . . . . . . . . . .  26   
5.5. MessageProp Class . . . . . . . . . . . . . . . . . . . . . . .  27  
5.6. GSSException Class. . . . . . . . . . . . . . . . . . . . . . .  27  
5.7. Oid Class . . . . . . . . . . . . . . . . . . . . . . . . . . .  27  
5.8. ChannelBinding Class. . . . . . . . . . . . . . . . . . . . . .  27   
5.9. GSSConstants Class. . . . . . . . . . . . . . . . . . . . . . .  28
5.10. GSSNameTypes Class . . . . . . . . . . . . . . . . . . . . . .  28
5.11. GSSCredentialUsage Enumeration . . . . . . . . . . . . . . . .  28
6. Detailed GSS-API Description. . . . . . . . . . . . . . . . . . .  28   
6.1. public abstract class GSSManager. . . . . . . . . . . . . . . .  28   
6.1.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  29   
6.1.2. getInstance . . . . . . . . . . . . . . . . . . . . . . . . .  29   
6.1.3. getMechs. . . . . . . . . . . . . . . . . . . . . . . . . . .  29    
6.1.4. getNamesForMech . . . . . . . . . . . . . . . . . . . . . . .  29  
6.1.5. getMechsForName . . . . . . . . . . . . . . . . . . . . . . .  29  
6.1.6. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  30  
6.1.7. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  30  
6.1.8. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  31  
6.1.9. createName. . . . . . . . . . . . . . . . . . . . . . . . . .  32  
6.1.10. createCredential . . . . . . . . . . . . . . . . . . . . . .  32   


Luciani                 Expires April 8, 2006                   [Page 2]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.11. createCredential . . . . . . . . . . . . . . . . . . . . . .  33   
6.1.12. createCredential . . . . . . . . . . . . . . . . . . . . . .  33   
6.1.13. createContext. . . . . . . . . . . . . . . . . . . . . . . .  34    
6.1.14. createContext. . . . . . . . . . . . . . . . . . . . . . . .  35 
6.1.15. createContext. . . . . . . . . . . . . . . . . . . . . . . .  35
6.2. public class GSSConstants . . . . . . . . . . . . . . . . . . .  35
6.2.1. DEFAULT_LIFETIME. . . . . . . . . . . . . . . . . . . . . . .  35 
6.2.2. INDEFINITE_LIFETIME . . . . . . . . . . . . . . . . . . . . .  36
6.3. public class GSSNameTypes . . . . . . . . . . . . . . . . . . .  36
6.3.1. NT_HOSTBASED_SERVICE. . . . . . . . . . . . . . . . . . . . .  36 
6.3.2. NT_USER_NAME. . . . . . . . . . . . . . . . . . . . . . . . .  36
6.3.3. NT_MACHINE_UID_NAME . . . . . . . . . . . . . . . . . . . . .  36 
6.3.4. NT_STRING_UID_NAME. . . . . . . . . . . . . . . . . . . . . .  37 
6.3.5. NT_ANONYMOUS. . . . . . . . . . . . . . . . . . . . . . . . .  37 
6.3.6. NT_EXPORT_NAME. . . . . . . . . . . . . . . . . . . . . . . .  37 
6.4. public interface GSSName. . . . . . . . . . . . . . . . . . . .  38
6.4.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  38 
6.4.2. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.3. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.4. canonicalize. . . . . . . . . . . . . . . . . . . . . . . . .  39 
6.4.5. export. . . . . . . . . . . . . . . . . . . . . . . . . . . .  40 
6.4.6. ToString. . . . . . . . . . . . . . . . . . . . . . . . . . .  40  
6.4.7. stringNameType. . . . . . . . . . . . . . . . . . . . . . . .  40  
6.4.8. isAnonymous . . . . . . . . . . . . . . . . . . . . . . . . .  40 
6.4.9. isMN  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  40
6.5. public enum GSSCredentialUsage. . . . . . . . . . . . . . . . .  41
6.5.1. INITIATE_AND_ACCEPT . . . . . . . . . . . . . . . . . . . . .  41 
6.5.2. INITIATE_ONLY . . . . . . . . . . . . . . . . . . . . . . . .  41
6.5.3. ACCEPT_ONLY . . . . . . . . . . . . . . . . . . . . . . . . .  41
6.6. public interface GSSCredential. . . . . . . . . . . . . . . . .  41
6.6.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . . .  42 
6.6.2. dispose . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.3. getName . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.4. getName . . . . . . . . . . . . . . . . . . . . . . . . . . .  43
6.6.5. getRemainingLifetime. . . . . . . . . . . . . . . . . . . . .  43  
6.6.6. getRemainingInitLifetime. . . . . . . . . . . . . . . . . . .  44 
6.6.7. getRemainingAcceptLifetime. . . . . . . . . . . . . . . . . .  44  
6.6.8. getUsage. . . . . . . . . . . . . . . . . . . . . . . . . . .  44  
6.6.9. getUsage. . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.10. getMechs . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.11. add. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
6.6.12. Equals . . . . . . . . . . . . . . . . . . . . . . . . . . .  46
6.7. public interface GSSContext . . . . . . . . . . . . . . . . . .  47
6.7.1. Example Context . . . . . . . . . . . . . . . . . . . . . . .  48
6.7.2. initSecContext. . . . . . . . . . . . . . . . . . . . . . . .  50  
6.7.2.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  51 
6.7.3. initSecContext. . . . . . . . . . . . . . . . . . . . . . . .  52  
6.7.3.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  53  
6.7.4. acceptSecContext. . . . . . . . . . . . . . . . . . . . . . .  54


Luciani                 Expires April 8, 2006                   [Page 3]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  55
6.7.5. acceptSecContext. . . . . . . . . . . . . . . . . . . . . . .  56
6.7.5.1. Example Code. . . . . . . . . . . . . . . . . . . . . . . .  57  
6.7.6. isEstablished . . . . . . . . . . . . . . . . . . . . . . . .  57
6.7.7. dispose . . . . . . . . . . . . . . . . . . . . . . . . . . .  57
6.7.8. getWrapSizeLimit. . . . . . . . . . . . . . . . . . . . . . .  58
6.7.9. wrap. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  59  
6.7.10. wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . .  60 
6.7.11. unWrap . . . . . . . . . . . . . . . . . . . . . . . . . . .  61
6.7.12. unWrap . . . . . . . . . . . . . . . . . . . . . . . . . . .  62
6.7.13. getMIC . . . . . . . . . . . . . . . . . . . . . . . . . . .  63
6.7.14. getMIC . . . . . . . . . . . . . . . . . . . . . . . . . . .  64
6.7.15. verifyMIC. . . . . . . . . . . . . . . . . . . . . . . . . .  65
6.7.16. verifyMIC. . . . . . . . . . . . . . . . . . . . . . . . . .  66
6.7.17. export . . . . . . . . . . . . . . . . . . . . . . . . . . .  67
6.7.18. mutualAuthenitcation . . . . . . . . . . . . . . . . . . . .  67
6.7.19. replayDetection. . . . . . . . . . . . . . . . . . . . . . .  68
6.7.20. sequenceDetection. . . . . . . . . . . . . . . . . . . . . .  68 
6.7.21. credentialDelegation . . . . . . . . . . . . . . . . . . . .  68
6.7.22. anonymity. . . . . . . . . . . . . . . . . . . . . . . . . .  69
6.7.23. confidentiality. . . . . . . . . . . . . . . . . . . . . . .  69
6.7.24. integrity. . . . . . . . . . . . . . . . . . . . . . . . . .  69
6.7.25. lifetime . . . . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.26. channelBinding . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.27. isTransferable . . . . . . . . . . . . . . . . . . . . . . .  70
6.7.28. isProtReady. . . . . . . . . . . . . . . . . . . . . . . . .  70 
6.7.29. srcName. . . . . . . . . . . . . . . . . . . . . . . . . . .  71  
6.7.30. targName . . . . . . . . . . . . . . . . . . . . . . . . . .  71
6.7.31. mechanism. . . . . . . . . . . . . . . . . . . . . . . . . .  71
6.7.32. delegatedCredential. . . . . . . . . . . . . . . . . . . . .  71  
6.7.33. isInitiator. . . . . . . . . . . . . . . . . . . . . . . . .  72 
6.8. public class MessageProp. . . . . . . . . . . . . . . . . . . .  72
6.8.1. Constructors. . . . . . . . . . . . . . . . . . . . . . . . .  73 
6.8.2. QOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
6.8.3. privacy . . . . . . . . . . . . . . . . . . . . . . . . . . .  73
6.8.4. minorStatus . . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.5. minorString . . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.6. isDuplicateToken. . . . . . . . . . . . . . . . . . . . . . .  74
6.8.7. isOldToken. . . . . . . . . . . . . . . . . . . . . . . . . .  74
6.8.8. isUnseqToken. . . . . . . . . . . . . . . . . . . . . . . . .  74 
6.8.9. isGapToken. . . . . . . . . . . . . . . . . . . . . . . . . .  75
6.9. public class ChannelBinding . . . . . . . . . . . . . . . . . .  75
6.9.1. Constructors. . . . . . . . . . . . . . . . . . . . . . . . .  76 
6.9.2. initiatorAddress. . . . . . . . . . . . . . . . . . . . . . .  76
6.9.3. acceptorAddress . . . . . . . . . . . . . . . . . . . . . . .  77
6.9.4. applicationData . . . . . . . . . . . . . . . . . . . . . . .  77
6.9.5. Equals. . . . . . . . . . . . . . . . . . . . . . . . . . . .  77
6.10. public class Oid . . . . . . . . . . . . . . . . . . . . . . .  77  
6.10.1. Constructor. . . . . . . . . . . . . . . . . . . . . . . . .  78 


Luciani                 Expires April 8, 2006                   [Page 4]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.2. ToString . . . . . . . . . . . . . . . . . . . . . . . . . .  78  
6.10.3. Equals . . . . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.10.4. DER. . . . . . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.10.5. containedIn. . . . . . . . . . . . . . . . . . . . . . . . .  79 
6.11. public class GSSException. . . . . . . . . . . . . . . . . . .  79 
6.11.1. Constants. . . . . . . . . . . . . . . . . . . . . . . . . .  80
6.11.2. Constructors . . . . . . . . . . . . . . . . . . . . . . . .  82
6.11.3. major. . . . . . . . . . . . . . . . . . . . . . . . . . . .  82  
6.11.4. minor. . . . . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.5. majorString. . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.6. minorString. . . . . . . . . . . . . . . . . . . . . . . . .  83 
6.11.7. ToString . . . . . . . . . . . . . . . . . . . . . . . . . .  83  
6.11.8. Message. . . . . . . . . . . . . . . . . . . . . . . . . . .  83
7. Sample Applications . . . . . . . . . . . . . . . . . . . . . . .  84
7.1. Simple GSS Context Initiator. . . . . . . . . . . . . . . . . .  84  
7.2. Simple GSS Context Acceptor . . . . . . . . . . . . . . . . . .  89
8. Security Considerations . . . . . . . . . . . . . . . . . . . . .  93
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . .  93
10. Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . .  93
11. Normative References . . . . . . . . . . . . . . . . . . . . . .  94
12. Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .  94
13. Intellectual Property Statement. . . . . . . . . . . . . . . . .  94
14. Disclaimer of Validity . . . . . . . . . . . . . . . . . . . . .  95
15. Copyright Statement. . . . . . . . . . . . . . . . . . . . . . .  95



























Luciani                 Expires April 8, 2006                   [Page 5]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


1.Introduction

   This document specifies the C# language bindings for the Generic
   Security Services Application Programming Interface Version 2
   (GSS-API v2). GSS-API allows a caller application to authenticate a
   principal identity, to delegate rights to a peer, and to apply
   security services such as confidentiality and integrity on a per-
   message basis.

   One of the design goals utilized when defining the C# bindings for
   GSS-API was to emulate the Java bindings specified in RFC 2853 as
   much as possible while still taking advantage of C# features such
   as Properties.  By emulating the Java bindings, we hoped to leverage
   work already done and to make life easier for developers utilizing
   GSS-API under C# and Java.  As a result of this design goal, the C#
   bindings match the Java bindings very closely.

   Because of the similarity between the Java and C# bindings and in the
   spirit of leveraging work already done, this document borrows heavily
   from RFC 2853.

2.GSS-API Operational Paradigm

   The Generic Security Service Application Programming Interface
   Version 2 defines a generic security API to calling applications.  It
   allows a communicating application to authenticate a user associated
   with another application, to delegate rights to another application,
   and to apply security services such as confidentiality and integrity
   on a per-message basis.

      There are four stages to using GSS-API:

      1) The application acquires a set of credentials with which it may
         prove its identity to other processes.  The application's
         credentials vouch for its global identity, which may or may not
         be related to any local username under which it may be running.

      2) A pair of communicating applications establish a joint security
         context using their credentials.  The security context
         encapsulates shared state information, which is required in
         order that per-message security services may be provided.
         Examples of state information that might be shared between
         applications as part of a security context are cryptographic
         keys, and message sequence numbers.  As part of the
         establishment of a security context, the context initiator is
         authenticated to the responder, and may require that the
         responder is authenticated back to the initiator.  The
         initiator may optionally give the responder the right to
         initiate further security contexts, acting as an agent or
         
         
Luciani                 Expires April 8, 2006                   [Page 6]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


         delegate of the initiator.  This transfer of rights is termed
         "delegation", and is achieved by creating a set of credentials,
         similar to those used by the initiating application, but which
         may be used by the responder.

         A GSSContext object is used to establish and maintain the
         shared information that makes up the security context.  Certain
         GSSContext methods will generate a token, which applications
         treat as cryptographically protected, opaque data.  The caller
         of such GSSContext method is responsible for transferring the
         token to the peer application, encapsulated if necessary in an
         application-to-application protocol.  On receipt of such a
         token, the peer application should pass it to a corresponding
         GSSContext method which will decode the token and extract the
         information, updating the security context state information
         accordingly.

      3) Per-message services are invoked on a GSSContext object to
         apply either:

         integrity and data origin authentication, or

         confidentiality, integrity and data origin authentication

         to application data, which are treated by GSS-API as arbitrary
         octet-strings.  An application transmitting a message that it
         wishes to protect will call the appropriate GSSContext method
         (getMIC or wrap) to apply protection, and send the resulting
         token to the receiving application.  The receiver will pass the
         received token (and, in the case of data protected by getMIC,
         the accompanying message-data) to the corresponding decoding
         method of the GSSContext interface (verifyMIC or unwrap) to
         remove the protection and validate the data.

      4) At the completion of a communications session (which may extend
         across several transport connections), each application uses a
         GSSContext method to invalidate the security context and
         release any system or cryptographic resources held.  Multiple
         contexts may also be used (either successively or
         simultaneously) within a single communications association, at
         the discretion of the applications.

3. Additional Controls

   This section discusses the optional services that a context initiator
   may request of the GSS-API before the context establishment.  Each of
   these services is requested by manipulating the appropriate property
   of the GSSContext interface before the first call to init is
   performed.


Luciani                 Expires April 8, 2006                   [Page 7]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Only the context initiator can request context flags.

   The optional services defined are:

   Delegation
         The (usually temporary) transfer of rights from initiator to
         acceptor, enabling the acceptor to authenticate itself as an
         agent of the initiator.

   Mutual Authentication
         In addition to the initiator authenticating its identity to the
         context acceptor, the context acceptor should also authenticate
         itself to the initiator.

   Replay Detection
         In addition to providing message integrity services, GSSContext
         per-message operations of getMIC and wrap should include
         message numbering information to enable verifyMIC and unwrap to
         detect if a message has been duplicated.

   Out-of-Sequence Detection
         In addition to providing message integrity services, GSSContext
         per-message operations (getMIC and wrap) should include
         message sequencing information to enable verifyMIC and unwrap
         to detect if a message has been received out of sequence.

   Anonymous Authentication
         The establishment of the security context should not reveal the
         initiator's identity to the context acceptor.

   Some mechanisms may not support all optional services, and some
   mechanisms may only support some services in conjunction with others.
   The GSSContext interface offers query methods to allow the
   verification by the calling application of which services will be
   available from the context when the establishment phase is complete.
   In general, if the security mechanism is capable of providing a
   requested service, it should do so even if additional services must
   be enabled in order to provide the requested service.  If the
   mechanism is incapable of providing a requested service, it should
   proceed without the service leaving the application to abort the
   context establishment process if it considers the requested service
   to be mandatory.

   Some mechanisms may specify that support for some services is
   optional, and that implementers of the mechanism need not provide it.
   This is most commonly true of the confidentiality service, often
   because of legal restrictions on the use of data-encryption, but may
   apply to any of the services.  Such mechanisms are required to send
   at least one token from acceptor to initiator during context
   

Luciani                 Expires April 8, 2006                   [Page 8]

Internet-Draft          GSS-API V2: C# Bindings            November 2005

   
   establishment when the initiator indicates a desire to use such a
   service, so that the initiating GSS-API can correctly indicate
   whether the service is supported by the acceptor's GSS-API.

3.1. Delegation

   The GSS-API allows delegation to be controlled by the initiating
   application via manipulation of the credential delegation property
   before the first call to init has been issued.  Some mechanisms do
   not support delegation, and for such mechanisms attempts by an
   application to enable delegation are ignored.

   The acceptor of a security context, for which the initiator enabled
   delegation, can check if delegation was enabled by reading the
   credential delegation property of the GSSContext object.  In cases
   when it is, the delegated credential object can be obtained by
   reading the delegated credential property. The obtained GSSCredential
   object may then be used to initiate subsequent GSS-API security
   contexts as an agent or delegate of the initiator.  If the original
   initiator's identity is "A" and the delegate's identity is "B", then,
   depending on the underlying mechanism, the identity embodied by the
   delegated credential may be either "A" or "B acting for A".

   For many mechanisms that support delegation, a simple boolean does
   not provide enough control.  Examples of additional aspects of
   delegation control that a mechanism might provide to an application
   are duration of delegation, network addresses from which delegation
   is valid, and constraints on the tasks that may be performed by a
   delegate.  Such controls are presently outside the scope of the GSS-
   API.  GSS-API implementations supporting mechanisms offering
   additional controls should provide extension routines that allow
   these controls to be exercised (perhaps by modifying the initiator's
   GSS-API credential object prior to its use in establishing a
   context).  However, the simple delegation control provided by GSS-API
   should always be able to over-ride other mechanism-specific
   delegation controls.  If the application instructs the GSSContext
   object that delegation is not desired, then the implementation must
   not permit delegation to occur.  This is an exception to the general
   rule that a mechanism may enable services even if they are not
   requested - delegation may only be provided at the explicit request
   of the application.

3.2. Mutual Authentication

   Usually, a context acceptor will require that a context initiator
   authenticate itself so that the acceptor may make an access-control
   decision prior to performing a service for the initiator.  In some
   cases, the initiator may also request that the acceptor authenticate
   itself.  GSS-API allows the initiating application to request this


Luciani                 Expires April 8, 2006                   [Page 9]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   mutual authentication service by setting the mutual authentication
   property of the GSSContext object to "true" before making the first
   call to init.  The initiating application is informed as to whether
   or not the context acceptor has authenticated itself.  Note that some
   mechanisms may not support mutual authentication, and other
   mechanisms may always perform mutual authentication, whether or not
   the initiating application requests it.  In particular, mutual
   authentication may be required by some mechanisms in order to support
   replay or out-of-sequence message detection, and for such mechanisms
   a request for either of these services will automatically enable
   mutual authentication.

3.3. Replay and Out-of-Sequence Detection

   The GSS-API may provide detection of mis-ordered messages once a
   security context has been established.  Protection may be applied to
   messages by either application, by calling either getMIC or wrap
   methods of the GSSContext object, and verified by the peer
   application by calling verifyMIC or unwrap for the peer's GSSContext
   object.

   The getMIC method calculates a cryptographic checksum of an
   application message, and returns that checksum in a token.  The
   application should pass both the token and the message to the peer
   application, which presents them to the verifyMIC method of the
   peer's GSSContext object.

   The wrap method calculates a cryptographic checksum of an application
   message, and places both the checksum and the message inside a single
   token.  The application should pass the token to the peer
   application, which presents it to the unwrap method of the peer's
   GSSContext object to extract the message and verify the checksum.

   Either pair of routines may be capable of detecting out-of-sequence
   message delivery, or duplication of messages.  Details of such mis-
   ordered messages are indicated through supplementary query methods of
   the MessageProp object that is filled in by each of these routines.

   A mechanism need not maintain a list of all tokens that have been
   processed in order to support these status codes.  A typical
   mechanism might retain information about only the most recent "N"
   tokens processed, allowing it to distinguish duplicates and missing
   tokens within the most recent "N" messages; the receipt of a token
   older than the most recent "N" would result in the isOldToken
   property of the instance of MessageProp to be set to "true".






Luciani                 Expires January 1 2005                 [Page 10]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.4. Anonymous Authentication

   In certain situations, an application may wish to initiate the
   authentication process to authenticate a peer, without revealing its
   own identity.  As an example, consider an application providing
   access to a database containing medical information, and offering
   unrestricted access to the service.  A client of such a service might
   wish to authenticate the service (in order to establish trust in any
   information retrieved from it), but might not wish the service to be
   able to obtain the client's identity (perhaps due to privacy concerns
   about the specific inquiries, or perhaps simply to avoid being placed
   on mailing-lists).

   In normal use of the GSS-API, the initiator's identity is made
   available to the acceptor as a result of the context establishment
   process.  However, context initiators may request that their identity
   not be revealed to the context acceptor.  Many mechanisms do not
   support anonymous authentication, and for such mechanisms the request
   will not be honored.  An authentication token will still be
   generated, but the application is always informed if a requested
   service is unavailable, and has the option to abort context
   establishment if anonymity is valued above the other security
   services that would require a context to be established.

   In addition to informing the application that a context is
   established anonymously (via the isAnonymous property of the
   GSSContext interface), the srcName property of the acceptor's
   GSSContext object will, for such contexts, be set to a reserved
   internal-form name, defined by the implementation.

   The ToString method for a GSSName object representing an anonymous
   entity will return a printable name.  The returned value will be
   syntactically distinguishable from any valid principal name supported
   by the implementation.  The associated name-type object identifier
   will be an oid representing the value of GSSNameTypes.NT_ANONYMOUS.
   This name-type oid will be defined as a public, static Oid object of
   the GSSName interface.  The printable form of an anonymous name
   should be chosen such that it implies anonymity, since this name may
   appear in, for example, audit logs.  For example, the string
   "<anonymous>" might be a good choice, if no valid printable names
   supported by the implementation can begin with "<" and end with ">".

   When using the equal method of the GSSName interface, and one of the
   operands is a GSSName instance representing an anonymous entity, the
   method must return "false".






Luciani                 Expires January 1 2005                 [Page 11]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.5. Confidentiality

   If a GSSContext supports the confidentiality service, wrap method may
   be used to encrypt application messages.  Messages are selectively
   encrypted, under the control of the setPrivacy property of the
   MessageProp object used in the wrap method.

3.6. Inter-process Context Transfer

   GSS-API V2 provides functionality which allows a security context to
   be transferred between processes on a single machine.  These are
   implemented using the export method of GSSContext and a byte array
   constructor of the same interface.  The most common use for such a
   feature is a client-server design where the server is implemented as
   a single process that accepts incoming security contexts, which then
   launches child processes to deal with the data on these contexts.  In
   such a design, the child processes must have access to the security
   context object created within the parent so that they can use per-
   message protection services and delete the security context when the
   communication session ends.

   Since the security context data structure is expected to contain
   sequencing information, it is impractical in general to share a
   context between processes.  Thus GSSContext interface provides an
   export method that the process, which currently owns the context, can
   call to declare that it has no intention to use the context
   subsequently, and to create an inter-process token containing
   information needed by the adopting process to successfully re-create
   the context.  After successful completion of export, the original
   security context is made inaccessible to the calling process by GSS-
   API and any further usage of this object will result in failures.
   The originating process transfers the inter-process token to the
   adopting process, which creates a new GSSContext object using the
   byte array constructor.  The properties of the context are equivalent
   to that of the original context.

   The inter-process token may contain sensitive data from the original
   security context (including cryptographic keys).  Applications using
   inter-process tokens to transfer security contexts must take
   appropriate steps to protect these tokens in transit.

   Implementations are not required to support the inter-process
   transfer of security contexts.  Reading the isTransferable property
   of the GSSContext interface will indicate if the context object is
   transferable.






Luciani                 Expires January 1 2005                 [Page 12]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


3.7. The Use of Incomplete Contexts

   Some mechanisms may allow the per-message services to be used before
   the context establishment process is complete.  For example, a
   mechanism may include sufficient information in its initial context-
   level tokens for the context acceptor to immediately decode messages
   protected with wrap or getMIC.  For such a mechanism, the initiating
   application need not wait until subsequent context-level tokens have
   been sent and received before invoking the per-message protection
   services.

   An application can read the isProtReady property of the GSSContext
   object to determine if the per-message services are available in
   advance of complete context establishment.  Applications wishing to
   use per-message protection services on partially-established contexts
   should query this method before attempting to invoke wrap or getMIC.

4. C# GSS-API Overview

   The C# GSS-API leverages many of the native C# types as well as
   features of the operating environment such as automatic garbage
   collection, exception handling, and encapsulation. This allows for an
   API that is simpler and with fewer functions than the API described
   in RFC 1509 [RFC1509].

   The assemblies implementing GSS-API are not part of the .NET and Mono
   frameworks.  Because of this, it is necessary for the assemblies to
   be installed before they can be used by applications.

   C# GSS-API, unlike its Java counterpart does not allow applications
   to choose between different security providers. The provider utilized
   by the application is determine at application build time based on
   the C# GSS-API assemblies linked in.  The mechanisms supported by the
   C# GSS-API assemblies are not controlled by the application.  C#
   GSS-API assemblies are vendor specific.

   The GSS-API types are present in the org.ietf.gss namespace.

   Applications need to include the following line at the top of their
   listings to make use of the GSS-API types:

   using org.ietf.gss;









Luciani                 Expires January 1 2005                 [Page 13]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


4.1. Object Identifiers

   An Oid object will be used to represent Universal Object Identifiers
   (Oids).  Oids are ISO-defined, hierarchically globally-interpretable
   identifiers used within the GSS-API framework to identify security
   mechanisms and name formats.  The Oid object can be created from a
   string representation of its dot notation (e.g. "1.3.6.1.5.6.2") as
   well as from its ASN.1 DER encoding.  Methods are also provided to
   test equality and provide the DER representation for the object.

   An important feature of the Oid class is that its instances are
   immutable - i.e.  there are no methods defined that allow one to
   change the contents of an Oid.  This property allows one to treat
   these objects as "statics" without the need to perform copies.

   Certain routines allow the usage of a default oid.  A "null" value
   can be used in those cases.

4.2. Object Identifier Sets

   Object identifiers sets are represented as arrays of Oid
   objects.  C# arrays contain a length field which allows for
   easy manipulation and reference.

   In order to support the full functionality of RFC 2743, the Oid class
   includes a method which checks for existence of an Oid object within
   a specified array.  This is equivalent in functionality to
   gss_test_oid_set_member.  The use of C# arrays and C#'s automatic
   garbage collection has eliminated the need for the following
   routines: gss_create_empty_oid_set, gss_release_oid_set, and
   gss_add_oid_set_member.  C# GSS-API implementations will not
   contain them.  C#'s automatic garbage collection and the immutable
   property of the Oid object eliminates the complicated memory
   management issues of the C counterpart.

   When ever a default value for an Object Identifier Set is required, a
   "null" value can be used.  Please consult the detailed method
   description for details.

4.3. Credentials

   GSS-API credentials are represented by the GSSCredential interface.
   The interface contains several constructs to allow for the creation
   of most common credential objects for the initiator and the acceptor.
   Comparisons are performed using the interface's "Equals" method.  The
   following general description of GSS-API credentials is included from
   the C-bindings specification:

   


Luciani                 Expires January 1 2005                 [Page 14]

Internet-Draft          GSS-API V2: C# Bindings            November 2005

   
   GSS-API credentials can contain mechanism-specific principal
   authentication data for multiple mechanisms.  A GSS-API credential is
   composed of a set of credential-elements, each of which is applicable
   to a single mechanism.  A credential may contain at most one
   credential-element for each supported mechanism.  A credential-
   element identifies the data needed by a single mechanism to
   authenticate a single principal, and conceptually contains two
   credential-references that describe the actual mechanism-specific
   authentication data, one to be used by GSS-API for initiating
   contexts, and one to be used for accepting contexts.  For mechanisms
   that do not distinguish between acceptor and initiator credentials,
   both references would point to the same underlying mechanism-specific
   authentication data.

   Credentials describe a set of mechanism-specific principals, and give
   their holder the ability to act as any of those principals.  All
   principal identities asserted by a single GSS-API credential should
   belong to the same entity, although enforcement of this property is
   an implementation-specific matter.  A single GSSCredential object
   represents all the credential elements that have been acquired.

   The creation's of an GSSContext object allows the value of "null" to
   be specified as the GSSCredential input parameter.  This will
   indicate a desire by the application to act as a default principal.
   While individual GSS-API implementations are free to determine such
   default behavior as appropriate to the mechanism, the following
   default behavior by these routines is recommended for portability:

      For the initiator side of the context:

      1) If there is only a single principal capable of initiating
         security contexts for the chosen mechanism that the application
         is authorized to act on behalf of, then that principal shall be
         used, otherwise

      2) If the platform maintains a concept of a default network-
         identity for the chosen mechanism, and if the application is
         authorized to act on behalf of that identity for the purpose of
         initiating security contexts, then the principal corresponding
         to that identity shall be used, otherwise

      3) If the platform maintains a concept of a default local
         identity, and provides a means to map local identities into
         network-identities for the chosen mechanism, and if the
         application is authorized to act on behalf of the network-
         identity image of the default local identity for the purpose of
         initiating security contexts using the chosen mechanism, then
         the principal corresponding to that identity shall be used,
         otherwise


Luciani                 Expires January 1 2005                 [Page 15]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      4) A user-configurable default identity should be used.

      and for the acceptor side of the context

      1) If there is only a single authorized principal identity capable
         of accepting security contexts for the chosen mechanism, then
         that principal shall be used, otherwise

      2) If the mechanism can determine the identity of the target
         principal by examining the context-establishment token
         processed during the accept method, and if the accepting
         application is authorized to act as that principal for the
         purpose of accepting security contexts using the chosen
         mechanism, then that principal identity shall be used,
         otherwise

      3) If the mechanism supports context acceptance by any principal,
         and if mutual authentication was not requested, any principal
         that the application is authorized to accept security contexts
         under using the chosen mechanism may be used, otherwise

      4) A user-configurable default identity shall be used.

   The purpose of the above rules is to allow security contexts to be
   established by both initiator and acceptor using the default behavior
   whenever possible.  Applications requesting default behavior are
   likely to be more portable across mechanisms and implementations than
   ones that instantiate an GSSCredential object representing a specific
   identity.

4.4. Contexts

   The GSSContext interface is used to represent one end of a GSS-API
   security context, storing state information appropriate to that end
   of the peer communication, including cryptographic state information.
   The instantiation of the context object is done differently by the
   initiator and the acceptor.  After the context has been instantiated,
   the initiator may choose to set various context options which will
   determine the characteristics of the desired security context.  When
   all the application desired characteristics have been set, the
   initiator will call the initSecContext method which will produce a
   token for consumption by the peer's acceptSecContext method.  It is
   the responsibility of the application to deliver the authentication
   token(s) between the peer applications for processing.  Upon
   completion of the context establishment phase, context attributes can
   be retrieved, by both the initiator and acceptor, reading the
   properties of the GSSContext object.  These will reflect the actual
   attributes of the established context.  At this point the context can
   be used by the application to apply cryptographic services to its


Luciani                 Expires January 1 2005                 [Page 16]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   data.

4.5. Authentication Tokens

   A token is a caller-opaque type that GSS-API uses to maintain
   synchronization between each end of the GSS-API security context.
   The token is a cryptographically protected octet-string, generated by
   the underlying mechanism at one end of a GSS-API security context for
   use by the peer mechanism at the other end.  Encapsulation (if
   required) within the application protocol and transfer of the token
   are the responsibility of the peer applications.

   C# GSS-API uses byte arrays to represent authentication tokens.
   Overloaded methods exist which allow the caller to supply streams
   which will be used for the reading and writing of the token data.

4.6. Interprocess Tokens

   Certain GSS-API routines are intended to transfer data between
   processes in multi-process programs.  These routines use a caller-
   opaque octet-string, generated by the GSS-API in one process for use
   by the GSS-API in another process.  The calling application is
   responsible for transferring such tokens between processes.  Note
   that, while GSS-API implementors are encouraged to avoid placing
   sensitive information within interprocess tokens, or to
   cryptographically protect them, many implementations will be unable
   to avoid placing key material or other sensitive data within them.
   It is the application's responsibility to ensure that interprocess
   tokens are protected in transit, and transferred only to processes
   that are trustworthy.  An interprocess token is represented using a
   byte array emitted from the export method of the GSSContext
   interface.  The receiver of the interprocess token would initialize
   a GSSContext object with this token to create a new context.  Once a
   context has been exported, the GSSContext object is invalidated.

4.7. Error Reporting

   RFC 2743 defined the usage of major and minor status values for
   signaling of GSS-API errors.  The major code, also called GSS status
   code, is used to signal errors at the GSS-API level independent of
   the underlying mechanism(s).  The minor status value or Mechanism
   status code, is a mechanism defined error value indicating a
   mechanism specific error code.

   C# GSS-API uses exceptions implemented by the GSSException class to
   signal both minor and major error values.  Both mechanism specific
   errors and GSS-API level errors are signaled through instances of
   this class.  The usage of exceptions replaces the need for major and
   minor codes to be used within the API calls.  GSSException class also


Luciani                 Expires January 1 2005                 [Page 17]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   contains methods to obtain textual representations for both the major
   and minor values, which is equivalent to the functionality of
   gss_display_status.

4.7.1. GSS Status Codes

   GSS status codes indicate errors that are independent of the
   underlying mechanism(s) used to provide the security service.  The
   errors that can be indicated via a GSS status code are generic API
   routine errors (errors that are defined in the GSS-API
   specification).  These bindings take advantage of the C# exceptions
   mechanism, thus eliminating the need for calling errors.

   A GSS status code indicates a single fatal generic API error from the
   routine that has thrown the GSSException.  Using exceptions announces
   that a fatal error has occurred during the execution of the method.
   The GSS-API operational model also allows for the signaling of
   supplementary status information from the per-message calls.  These
   need to be handled as return values since using exceptions is not
   appropriate for informatory or warning-like information.  The methods
   that are capable of producing supplementary information are the two
   per-message methods GSSContext.verifyMIC() and GSSContext.unwrap().
   These methods fill the supplementary status codes in the MessageProp
   object that was passed in.

   GSSException object, along with providing the functionality for
   setting of the various error codes and translating them into textual
   representation, also contains the definitions of all the numeric
   error values.  The following table lists the definitions of error
   codes:

      Table: GSS Status Codes

      Name                   Value   Meaning

      BAD_MECH                 1     An unsupported mechanism
                                     was requested.

      BAD_NAME                 2     An invalid name was supplied.

      BAD_NAMETYPE             3     A supplied name was of an
                                     unsupported type.

      BAD_BINDINGS             4     Incorrect channel bindings were
                                     supplied.

      BAD_STATUS               5     An invalid status code was
                                     supplied.



Luciani                 Expires January 1 2005                 [Page 18]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      BAD_MIC                  6     A token had an invalid MIC.

      NO_CRED                  7     No credentials were supplied, or
                                     the credentials were unavailable
                                     or inaccessible.

      NO_CONTEXT               8     Invalid context has been
                                     supplied.

      DEFECTIVE_TOKEN          9     A supplied token was invalid.

      DEFECTIVE_CREDENTIAL    10     A supplied credential was
                                     invalid.

      CREDENTIALS_EXPIRED     11     The referenced credentials
                                     have expired.

      CONTEXT_EXPIRED         12     The context has expired.

      FAILURE                 13     Miscellaneous failure,
                                     unspecified at the GSS-API level.

      BAD_QOP                 14     The quality-of-protection
                                     requested could not be provided.

      UNAUTHORIZED            15     The operation is forbidden by
                                     local security policy.

      UNAVAILABLE             16     The operation or option is
                                     unavailable.

      DUPLICATE_ELEMENT       17     The requested credential
                                     element already exists.

      NAME_NOT_MN             18     The provided name was not a
                                     mechanism name.

      OLD_TOKEN               19     The token's validity period has
                                     expired.

      DUPLICATE_TOKEN         20     The token was a duplicate of an
                                     earlier version.

   The GSS major status code of FAILURE is used to indicate that the
   underlying mechanism detected an error for which no specific GSS
   status code is defined.  The mechanism-specific status code can
   provide more details about the error.

   The different major status codes that can be contained in the


Luciani                 Expires January 1 2005                 [Page 19]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   GSSException object thrown by the methods in this specification are
   the same as the major status codes returned by the corresponding
   calls in RFC 2743.

4.7.2. Mechanism-specific Status Codes

   Mechanism-specific status codes are communicated in two ways, they
   are part of any GSSException thrown from the mechanism specific layer
   to signal a fatal error, or they are part of the MessageProp object
   that the per-message calls use to signal non-fatal errors.

   A default value of 0 in either the GSSException object or the
   MessageProp object will be used to represent the absence of any
   mechanism specific status code.

4.7.3. Supplementary Status Codes

   Supplementary status codes are confined to the per-message methods of
   the GSSContext interface.  Because of the informative nature of these
   errors it is not appropriate to use exceptions to signal them.
   Instead, the per-message operations of the GSSContext interface
   return these values in a MessageProp object.

   The MessageProp class defines boolean properties indicating the
   following supplementary states:

      Table: Supplementary Status Methods

      Method Name        Meaning when set to "true"

      isDuplicateToken   The token was a duplicate of an
                         earlier token.

      isOldToken         The token's validity period has
                         expired.

      isUnseqToken       A later token has already been
                         processed.

      isGapToken         An expected per-message token was
                         not received.

   A "true" value for any of the above properties indicates that the
   token exhibited the specified property.  The application must
   determine the appropriate course of action for these supplementary
   values.  They are not treated as errors by the GSS-API.





Luciani                 Expires January 1 2005                 [Page 20]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


4.8. Names

   A name is used to identify a person or entity.  GSS-API authenticates
   the relationship between a name and the entity claiming the name.

   Since different authentication mechanisms may employ different
   namespaces for identifying their principals, GSS-API's naming support
   is necessarily complex in multi-mechanism environments (or even in
   some single-mechanism environments where the underlying mechanism
   supports multiple namespaces).

   Two distinct conceptual representations are defined for names:

   1) A GSS-API form represented by implementations of the GSSName
      interface: A single GSSName object may contain multiple names from
      different namespaces, but all names should refer to the same
      entity.  An example of such an internal name would be the name
      returned from a call to the getName method of the GSSCredential
      interface, when applied to a credential containing credential
      elements for multiple authentication mechanisms employing
      different namespaces.  This GSSName object will contain a distinct
      name for the entity for each authentication mechanism.

      For GSS-API implementations supporting multiple namespaces,
      GSSName implementations must contain sufficient information to
      determine the namespace to which each primitive name belongs.

   2) Mechanism-specific contiguous byte array and string forms:
      Different GSSName initialization methods are provided to handle
      both byte array and string formats and to accommodate various
      calling applications and name types.  These formats are capable of
      containing only a single name (from a single namespace).
      Contiguous string names are always accompanied by an object
      identifier specifying the namespace to which the name belongs, and
      their format is dependent on the authentication mechanism that
      employs that name.  The string name forms are assumed to be
      printable, and may therefore be used by GSS-API applications for
      communication with their users.  The byte array name formats are
      assumed to be in non-printable formats (e.g. the byte array
      returned from the export method of the GSSName interface).

   A GSSName object can be converted to a contiguous representation by
   using the ToString method.  This will guarantee that the name will be
   converted to a printable format.  Different initialization methods in
   the GSSName interface are defined allowing support for multiple
   syntaxes for each supported namespace, and allowing users the freedom
   to choose a preferred name representation.  The ToString method
   should use an implementation-chosen printable syntax for each
   supported name-type.  To obtain the printable name type, the


Luciani                 Expires January 1 2005                 [Page 21]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   getStringNameType method can be used.

   There is no guarantee that calling the ToString method on the GSSName
   interface will produce the same string form as the original imported
   string name.  Furthermore, it is possible that the name was not even
   constructed from a string representation.  The same applies to name-
   space identifiers which may not necessarily survive unchanged after a
   journey through the internal name-form.  An example of this might be
   a mechanism that authenticates X.500 names, but provides an
   algorithmic mapping of Internet DNS names into X.500.  That
   mechanism's implementation of GSSName might, when presented with a
   DNS name, generate an internal name that contained both the original
   DNS name and the equivalent X.500 name.  Alternatively, it might only
   store the X.500 name.  In the latter case, the ToString method of
   GSSName would most likely generate a printable X.500 name, rather
   than the original DNS name.

   The context acceptor can obtain a GSSName object representing the
   entity performing the context initiation (by reading the srcName
   property).  Since this name has been authenticated by a
   single mechanism, it contains only a single name (even if the
   internal name presented by the context initiator to the GSSContext
   object had multiple components).  Such names are termed internal
   mechanism names, or "MN"s and the property values srcName and
   targName of the GSSContext interface are always of this type.
   Since some applications may require MNs without wanting to incur the
   overhead of an authentication operation, creation methods are
   provided that take not only the name buffer and name type, but also
   the mechanism oid for which this name should be created.  When
   dealing with an existing GSSName object, the canonicalize method may
   be invoked to convert a general internal name into an MN.

   GSSName objects can be compared using their Equal method, which
   returns "true" if the two names being compared refer to the same
   entity.  This is the preferred way to perform name comparisons
   instead of using the printable names that a given GSS-API
   implementation may support.  Since GSS-API assumes that all primitive
   names contained within a given internal name refer to the same
   entity, equal can return "true" if the two names have at least one
   primitive name in common.  If the implementation embodies knowledge
   of equivalence relationships between names taken from different
   namespaces, this knowledge may also allow successful comparisons of
   internal names containing no overlapping primitive elements.

   When used in large access control lists, the overhead of creating an
   GSSName object on each name and invoking the equal method on each
   name from the ACL may be prohibitive.  As an alternative way of
   supporting this case, GSS-API defines a special form of the
   contiguous byte array name which may be compared directly (byte by


Luciani                 Expires January 1 2005                 [Page 22]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   byte).  Contiguous names suitable for comparison are generated by the
   export method.  Exported names may be re-imported by using the byte
   array constructor and specifying the GSSNameTypes.NT_EXPORT_NAME as
   the name type object identifier.  The resulting GSSName name will
   also be a MN.  The GSSName interface defines public static Oid
   objects representing the standard name types.  Structurally, an
   exported name object consists of a header containing an OID
   identifying the mechanism that authenticated the name, and a trailer
   containing the name itself, where the syntax of the trailer is
   defined by the individual mechanism specification.  Detailed
   description of the format is specified in the language-independent
   GSS-API specification [RFC2743].

   Note that the results obtained by using the Equals method will in
   general be different from those obtained by invoking canonicalize and
   export, and then comparing the byte array output.  The first series
   of operation determines whether two (unauthenticated) names identify
   the same principal; the second whether a particular mechanism would
   authenticate them as the same principal.  These two operations will
   in general give the same results only for MNs.

   It is important to note that the above are guidelines as how GSSName
   implementations should behave, and are not intended to be specific
   requirements of how names objects must be implemented.  The mechanism
   designers are free to decide on the details of their implementations
   of the GSSName interface as long as the behavior satisfies the above
   guidelines.

4.9. Channel Bindings

   GSS-API supports the use of user-specified tags to identify a given
   context to the peer application.  These tags are intended to be used
   to identify the particular communications channel that carries the
   context.  Channel bindings are communicated to the GSS-API using the
   ChannelBinding object.  The application may use byte arrays to
   specify the application data to be used in the channel binding as
   well as using instances of the EndPoint class.  The EndPoint for the
   initiator and/or acceptor can be used within an instance of a
   ChannelBinding.  ChannelBinding can be set for the GSSContext object
   by setting the channelBinding property before the first call to init
   or accept has been performed.  The channelBinding property of a
   GSSContext object defaults to "null".  Currently the ChannelBinding
   class only supports addresses of type IP.  Applications that use
   other types of addresses can include them as part of the application
   specific data.

   Conceptually, the GSS-API concatenates the initiator and acceptor
   address information, and the application supplied byte array to form
   an octet string.  The mechanism calculates a MIC over this octet


Luciani                 Expires January 1 2005                 [Page 23]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   string and binds the MIC to the context establishment token emitted
   by init method of the GSSContext interface.  The same bindings are
   set by the context acceptor for its GSSContext object and during
   processing of the accept method a MIC is calculated in the same way.
   The calculated MIC is compared with that found in the token, and if
   the MICs differ, accept will throw a GSSException with the major
   code set to BAD_BINDINGS, and the context will not be established.
   Some mechanisms may include the actual channel binding data in the
   token (rather than just a MIC); applications should therefore not use
   confidential data as channel-binding components.

   Individual mechanisms may impose additional constraints on addresses
   that may appear in channel bindings.  For example, a mechanism may
   verify that the initiator address field of the channel binding
   contains the correct network address of the host system.  Portable
   applications should therefore ensure that they either provide correct
   information for the address fields, or omit setting of the addressing
   information.

5. Introduction to GSS-API Classes and Interfaces

   This section presents a brief description of the classes and
   interfaces that constitute the GSS-API.
 
   This section also shows the corresponding RFC 2743 functionality
   implemented by each of the classes.  Detailed description of these
   classes and their methods is presented in section 6.

5.1. GSSManager Class

   This abstract class serves as a factory to instantiate
   implementations of the GSS-API interfaces and also provides methods
   to make queries about underlying security mechanisms.

   A default implementation can be obtained using the static method
   getInstance().  Applications that desire to provide their own
   implementation of the GSSManager class can simply extend the abstract
   class themselves.

   This class contains equivalents of the following RFC 2743 routines:

   gss_import_name              Create an internal name from the
                                supplied information.
 
   gss_acquire_cred             Acquire credential for use.

   gss_import_sec_context       Create a previously exported context.




Luciani                 Expires January 1 2005                 [Page 24]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   gss_indicate_mechs           List the mechanisms supported by this
                                GSS-API implementation.

   gss_inquire_mechs_for_name   List the mechanisms supporting the
                                specified name type.

   gss_inquire_names_for_mech   List the name types supported by the
                                specified mechanism.

5.2. GSSName Interface

   GSS-API names are represented in the C# bindings through the
   GSSName interface.  Different name formats and their definitions are
   identified with universal Object Identifiers (oids).  The format of
   the names can be derived based on the unique oid of each name type.
   The following GSS-API routines are provided by the GSSName interface:

   RFC 2743 Routine                 Function

   gss_display_name        Covert internal name representation to text
                           format.

   gss_compare_name        Compare two internal names.
 
   gss_canonicalize_name   Convert an internal name to a mechanism name.

   gss_export_name         Convert a mechanism name to export format.

   The gss_release_name call is not provided as C# does its own
   garbage collection.  The gss_duplicate_name call is also redundant;
   the GSSName interface has no methods that can change the state of the
   object so it is safe for sharing.

5.3. GSSCredential Interface

   The GSSCredential interface is responsible for the encapsulation of
   GSS-API credentials.  Credentials identify a single entity and
   provide the necessary cryptographic information to enable the
   creation of a context on behalf of that entity.  A single credential
   may contain multiple mechanism specific credentials, each referred to
   as a credential element.  The GSSCredential interface provides the
   functionality of the following GSS-API routines:

   RFC 2743 Routine               Function

   gss_add_cred               Constructs credentials incrementally.

   gss_inquire_cred           Obtain information about credential.



Luciani                 Expires January 1 2005                 [Page 25]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   gss_inquire_cred_by_mech   Obtain per-mechanism information about
                              a credential.

   gss_release_cred           Disposes of credentials after use.

5.4. GSSContext Interface

   This interface encapsulates the functionality of context-level calls
   required for security context establishment and management between
   peers as well as the per-message services offered to applications.  A
   context is established between a pair of peers and allows the usage
   of security services on a per-message basis on application data.  It
   is created over a single security mechanism.  The GSSContext
   interface provides the functionality of the following GSS-API
   routines:

   RFC 2743 Routine                 Function
   
   gss_init_sec_context     Initiate the creation of a security context
                            with a peer.
 
   gss_accept_sec_context   Accept a security context initiated by a
                            peer.
 
   gss_delete_sec_context   Destroy a security context.
 
   gss_context_time         Obtain remaining context time.

   gss_inquire_context      Obtain context characteristics.
 
   gss_wrap_size_limit      Determine token-size limit for gss_wrap.

   gss_export_sec_context   Transfer security context to another
                            process.

   gss_get_mic              Calculate a cryptographic Message Integrity
                            Code (MIC) for a message.

   gss_verify_mic           Verify integrity on a received message.
 
   gss_wrap                 Attach a MIC to a message and optionally
                            encrypt the message content.

   gss_unwrap               Obtain a previously wrapped application
                            message verifying its integrity and
                            optionally decrypting it.

   The functionality offered by the gss_process_context_token routine
   has not been included in the C# bindings specification.  The


Luciani                 Expires January 1 2005                 [Page 26]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   corresponding functionality of gss_delete_sec_context has also been
   modified to not return any peer tokens.  This has been proposed in
   accordance to the recommendations stated in RFC 2743.  GSSContext
   does offer the functionality of destroying the locally-stored context
   information.

5.5. MessageProp Class

   This helper class is used in the per-message operations on the
   context.  An instance of this class is created by the application and
   then passed into the per-message calls.  In some cases, the
   application conveys information to the GSS-API implementation through
   this object and in other cases the GSS-API returns information to the
   application by setting it in this object.  See the description of the
   per-message operations wrap, unwrap, getMIC, and verifyMIC in the
   GSSContext interface for details.

5.6. GSSException Class

   Exceptions are used in the C# bindings to signal fatal errors to
   the calling applications.  This replaces the major and minor codes
   used in the C-bindings specification as a method of signaling
   failures.  The GSSException class handles both minor and major codes,
   as well as their translation into textual representation.  All GSS-
   API methods can throw this exception.

   RFC 2743 Routine           Function
   
   gss_display_status   Retrieve textual representation of
                        error codes.

5.7. Oid Class

   This utility class is used to represent Universal Object Identifiers
   and their associated operations.  GSS-API uses object identifiers to
   distinguish between security mechanisms and name types.  This class,
   aside from being used whenever an object identifier is needed,
   implements the following GSS-API functionality:

   RFC 2743 Routine                  Function

   gss_test_oid_set_member   Determine if the specified oid is part of a
                             set of oids.

5.8. ChannelBinding Class

   An instance of this class is used to specify channel binding
   information to the GSSContext object before the start of a security
   context establishment.  The application may use a byte array to


Luciani                 Expires January 1 2005                 [Page 27]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   specify application data to be used in the channel binding as well as
   use instances of the EndPoint.  Currently the ChannelBinding class
   only supports addresses of type IP.  Applications that use other
   types of addresses can include them as part of the application
   specific data.
   
5.9. GSSConstants Class

   This utility class defines various constants utilized throughout the
   API.
   
5.10. GSSNameTypes Class

   This class defines OIDs which specify different types of GSSNames.
   
5.11. GSSCredentialUsage Enumeration

   This enumeration defines the usage categories for GSSCredentials.
   GSSCredentials can be used for context initiation and context
   acceptance or only one of those functions.


6. Detailed GSS-API Description

   This section lists a detailed description of all the public methods
   that each of the GSS-API classes and interfaces must provide.

6.1. public abstract class GSSManager

   The GSSManager class is an abstract class that serves as a factory
   for three GSS interfaces: GSSName, GSSCredential, and GSSContext.  It
   also provides methods for applications to determine what mechanisms
   are available from the GSS implementation and what nametypes these
   mechanisms support.  An instance of the default GSSManager subclass
   may be obtained through the static method getInstance(), but
   applications are free to instantiate other subclasses of GSSManager.

   All but one method in this class are declared abstract.  This means
   that subclasses have to provide the complete implementation for those
   methods.  The only exception to this is the static method
   getInstance() which will have platform specific code to return an
   instance of the default subclass.

   Platform providers of GSS are required not to add any constructors to
   this class, private, public, or protected.  This will ensure that all
   subclasses invoke only the default constructor provided to the base
   class by the compiler.




Luciani                 Expires January 1 2005                 [Page 28]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.1. Example Code

   GSSManager mgr = GSSManager.getInstance();

   // What mechs are available to us?
   Oid[] supportedMechs = mgr.getMechs();

   // What name types does this spkm implementation support?
   Oid[] nameTypes = mgr.getNamesForMech(spkm1);

6.1.2. getInstance

   public static GSSManager getInstance();

   Returns the default GSSManager implementation.

   Throws GSSException if an error is detected.

6.1.3. getMechs

   public abstract Oid[] getMechs();

   Returns an array of Oid objects indicating mechanisms available to
   GSS-API callers.  A "null" value is returned when no mechanism are
   available (an example of this would be when mechanism are dynamically
   configured, and currently no mechanisms are installed).

   Throws GSSException if an error is detected.

6.1.4. getNamesForMech

   public abstract Oid[] getNamesForMech(Oid mech);

   Returns name type Oid's supported by the specified mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      mech      The Oid object for the mechanism to query.

6.1.5. getMechsForName

   public abstract  Oid[] getMechsForName(Oid nameType);

   Returns an array of Oid objects corresponding to the mechanisms that
   support the specific name type.  "null" is returned when no
   mechanisms are found to support the specified name type.



Luciani                 Expires January 1 2005                 [Page 29]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Throws GSSException if an error is detected.

   Parameters:

      nameType  The Oid object for the name type.

6.1.6. createName

   public abstract GSSName createName(string nameStr,
                                      Oid nameType);

   Factory method to convert a contiguous string name from the specified
   namespace to a GSSName object.  In general, the GSSName object
   created will not be an MN; two examples that are exceptions to this
   are when the namespace type parameter indicates
   GSSNameTypes.NT_EXPORT_NAME or when the GSS-API implementation is not
   multi-mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      nameStr   The string representing a printable form of the name
                to create.

      nameType  The Oid specifying the namespace of the printable name
                supplied.  Note that nameType serves to describe and
                qualify the interpretation of the input nameStr, it
                does not necessarily imply a type for the output
                GSSName implementation.  "null" value specifies that a
                mechanism specific default printable syntax should be
                assumed by each mechanism that examines nameStr.

6.1.7. createName

   public abstract GSSName createName(byte[] name,
                                      Oid nameType);

   Factory method to convert a contiguous byte array containing a name
   from the specified namespace to a GSSName object.  In general, the
   GSSName object created will not be an MN; two examples that are
   exceptions to this are when the namespace type parameter indicates
   GSSNameTypes.NT_EXPORT_NAME or when the GSS-API implementation is not
   multi-mechanism.

   Throws GSSException if an error is detected.





Luciani                 Expires January 1 2005                 [Page 30]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Parameters:

      name      The byte array containing the name to create.
      
      nameType  The Oid specifying the namespace of the name supplied
                in the byte array.  Note that nameType serves to
                describe and qualify the interpretation of the input
                name byte array, it does not necessarily imply a type
                for the output GSSName implementation.  "null" value can
                be used to specify that a mechanism specific default
                syntax should be assumed by each mechanism that examines
                the byte array.

6.1.8. createName

   public abstract GSSName createName(string nameStr,
                                      Oid nameType,
                                      Oid mech);
 
   Factory method to convert a contiguous string name from the specified
   namespace to an GSSName object that is a mechanism name (MN).  In
   other words, this method is a utility that does the equivalent of two
   steps: the createName described in 6.1.6 and then also the
   GSSName.canonicalize() described in 6.2.5.

   Throws GSSException if an error is detected.

   Parameters:

      nameStr   The string representing a printable form of the name
                to create.

      nameType  The Oid specifying the namespace of the printable name
                supplied.  Note that nameType serves to describe and
                qualify the interpretation of the input nameStr, it
                does not necessarily imply a type for the output
                GSSName implementation.  "null" value can be used to
                specify that a mechanism specific default printable
                syntax should be assumed when the mechanism examines
                nameStr.

      mech      Oid specifying the mechanism for which this name
                should be created.








Luciani                 Expires January 1 2005                 [Page 31]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.9. createName

   public abstract GSSName createName(byte[] name,
                                      Oid nameType,
                                      Oid mech);

   Throws GSSException if an error is detected.

   Factory method to convert a contiguous byte array containing a name
   from the specified namespace to a GSSName object that is an MN.  In
   other words, this method is a utility that does the equivalent of two
   steps: the createName described in 6.1.7 and then also the
   GSSName.canonicalize() described in 6.2.5.

   Parameters:

      name      The byte array representing the name to create.

      nameType  The Oid specifying the namespace of the name supplied
                in the byte array.  Note that nameType serves to
                describe and qualify the interpretation of the input
                name byte array, it does not necessarily imply a type
                for the output GSSName implementation.  "null" value
                can be used to specify that a mechanism specific
                default syntax should be assumed by each mechanism
                that examines the byte array.

      mech      Oid specifying the mechanism for which this name
                should be created.

6.1.10. createCredential

   public abstract GSSCredential createCredential(int usage);

   Factory method for acquiring default credentials.  This will cause
   the GSS-API to use system specific defaults for the set of
   mechanisms, name, and a DEFAULT lifetime.

   Throws GSSException if an error is detected.

   Parameters:

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY



Luciani                 Expires January 1 2005                 [Page 32]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.1.11. createCredential

   public abstract GSSCredential createCredential(GSSName aName,
                                                  int lifetime,
                                                  Oid mech,
                                                  int usage);

   Throws GSSException if an error is detected.

   Factory method for acquiring a single mechanism credential.

   Parameters:

      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.

      lifetime  The number of seconds that credentials should remain
                valid.  Use GSSCredential.INDEFINITE_LIFETIME to
                request that the credentials have the maximum
                permitted lifetime.  Use GSSCredential.DEFAULT_LIFETIME
                to request default credential lifetime.

      mech      The oid of the desired mechanism.  Use "(Oid) null" to
                request the default mechanism(s).

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY

6.1.12. createCredential

   public abstract GSSCredential createCredential(GSSName aName,
                                                  int lifetime,
                                                  Oid mechs[],
                                                  int usage);

   Factory method for acquiring credentials over a set of mechanisms.
   Acquires credentials for each of the mechanisms specified in the
   array called mechs.  To determine the list of mechanisms for which
   the acquisition of credentials succeeded, the caller should use the
   GSSCredential.getMechs() method.

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 33]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Parameters:
   
      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.

      lifetime  The number of seconds that credentials should remain
                valid.  Use GSSCredential.INDEFINITE_LIFETIME to
                request that the credentials have the maximum
                permitted lifetime.  Use GSSCredential.DEFAULT_LIFETIME
                to request default credential lifetime.

      mechs     The array of mechanisms over which the credential is
                to be acquired.  Use "(Oid[]) null" for requesting a
                system specific default set of mechanisms.

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:

                GSSCredential.ACCEPT_AND_INITIATE
                GSSCredential.ACCEPT_ONLY
                GSSCredential.INITIATE_ONLY

6.1.13. createContext

   public abstract GSSContext createContext(GSSName peer,
                                            Oid mech,
                                            GSSCredential myCred,
                                            int lifetime);

   Factory method for creating a context on the initiator's side.
   Context flags may be modified through the mutator methods prior to
   calling GSSContext.initSecContext().

   Throws GSSException if an error is detected.

   Parameters:

      peer      Name of the target peer.

      mech      Oid of the desired mechanism.  Use "(Oid) null" to
                request default mechanism.

      myCred    Credentials of the initiator.  Use "null" to act as a
                default initiator principal.






Luciani                 Expires January 1 2005                 [Page 34]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      lifetime  The request lifetime, in seconds, for the context.
                Use GSSContext.INDEFINITE_LIFETIME and
                GSSContext.DEFAULT_LIFETIME to request indefinite or
                default context lifetime.

6.1.14. createContext

   public abstract GSSContext createContext(GSSCredential myCred);

   Factory method for creating a context on the acceptor' side.  The
   context's properties will be determined from the input token supplied
   to the accept method.

   Throws GSSException if an error is detected.

   Parameters:

      myCred    Credentials for the acceptor.  Use "null" to act as a
                default acceptor principal.

6.1.15. createContext

   public abstract GSSContext createContext(byte[] interProcessToken);

   Factory method for creating a previously exported context.  The
   context properties will be determined from the input token and can't
   be modified through the set methods.

   Throws GSSException if an error is detected.

   Parameters:                               

      interProcessToken  The token previously emitted from the export
                         method.

6.2. public class GSSConstants

   This class defines constants that are common among various interfaces
   and/or classes of the API.

6.2.1. DEFAULT_LIFETIME

   const int DEFAULT_LIFETIME = 0;

   A constant representing the default lifetime for a context or
   credential.




   
Luciani                 Expires January 1 2005                 [Page 35]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.2.2. INDEFINITE_LIFETIME

   const int INDEFINITE_LIFETIME = Int32.MaxValue;

   A constant representing indefinite lifetime for a context or
   credential.

6.3. public class GSSNameTypes

   This class defines the various types of GSSNames.

6.3.1. NT_HOSTBASED_SERVICE

   public static Oid NT_HOSTBASED_SERVICE;

   Property which indicates Oid of name type of a host-based service
   name form.  It is used to represent services associated with host
   computers.  This name form is constructed using two elements,
   "service" and "hostname", as follows:

        service@hostname

   Values for the "service" element are registered with the IANA. It
   represents the following value: { 1(iso), 3(org), 6(dod),
   1(internet), 5(security), 6(nametypes), 2(gss-host-based-services) }
   
6.3.2. NT_USER_NAME

   public static Oid NT_USER_NAME;

   Property which indicates Oid of name type of a named user on a local
   system.  It represents the following value: { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   1(user_name) }
   
6.3.3. NT_MACHINE_UID_NAME

   public static Oid NT_MACHINE_UID_NAME;

   Property which indicates Oid of name type of a numeric user
   identifier corresponding to a user on a local system. (e.g. Uid).
   It represents the following value: { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   2(machine_uid_name) }






   
Luciani                 Expires January 1 2005                 [Page 36]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.3.4. NT_STRING_UID_NAME

   public static Oid NT_STRING_UID_NAME;

   Property which indicates Oid of name type of a string of digits
   representing the numeric user identifier of a user on a local system.
   It represents the following value:  { 1(iso), 2(member-body),
   840(United States), 113554(mit), 1(infosys), 2(gssapi), 1(generic),
   3(string_uid_name) }
   
6.3.5. NT_ANONYMOUS

   public static Oid NT_ANONYMOUS;

   Property which indicates Oid of name type of an anonymous entity.
   It represents the following value: { 1(iso), 3(org), 6(dod),
   1(internet), 5(security), 6(nametypes), 3(gss-anonymous-name) }
   
6.3.6. NT_EXPORT_NAME

   public static Oid NT_EXPORT_NAME;

   Property which indicates Oid of name type of an exported name
   produced by the export method.  It represents the following value:
   { 1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes),
   4(gss-api-exported-name) }

























Luciani                 Expires January 1 2005                 [Page 37]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4. public interface GSSName

   This interface encapsulates a single GSS-API principal entity.
   Different name formats and their definitions are identified with
   universal Object Identifiers (Oids).  The format of the names can be
   derived based on the unique oid of its namespace type.
   
6.4.1. Example Code

   Included below are code examples utilizing the GSSName interface.
   The code below creates a GSSName, converts it to a mechanism name
   (MN), performs a comparison, obtains a printable representation of
   the name, exports it and then re-imports to obtain a new GSSName.

   GSSManager mgr = GSSManager.getInstance();

   // create a host based service name
   GSSName name = mgr.createName("service@host",
                                 GSSNameTypes.NT_HOSTBASED_SERVICE);

   Oid krb5 = new Oid("1.2.840.113554.1.2.2");

   GSSName mechName = name.canonicalize(krb5);

   // the above two steps are equivalent to the following
   GSSName mechName = mgr.createName("service@host",
                                     GSSNameTypes.NT_HOSTBASED_SERVICE,
                                     krb5);

   // perform name comparison
   if (name.Equals(mechName))
      Console.WriteLine("Names are equals.");

   // obtain textual representation of name and its printable
   // name type
   Console.WriteLine(mechName.ToString() +
                     mechName.getStringNameType().ToString());

   // export and re-import the name
   byte[] exportName = mechName.export();

   // create a new name object from the exported buffer
   GSSName newName = mgr.createName(exportName,
                                    GSSNameTypes.NT_EXPORT_NAME);







Luciani                 Expires January 1 2005                 [Page 38]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4.2. Equals

   bool Equals(GSSName another);
 
   Compares two GSSName objects to determine whether they refer to the
   same entity.  If either of the names represents an anonymous
   entity, the method will return "false".

   Throws GSSException if an error is detected.

   Parameters:

      another   GSSName object to compare with.

6.4.3. Equals

   bool Equals(Object another);

   A variation of the equals method described in 6.2.3 that is provided
   to override the Object.Equals() method that the implementing class
   will inherit.  The behavior is exactly the same as that in 6.2.3
   except that no GSSException is thrown; instead, false will be
   returned in the situation where an error occurs.  (Note that the C#
   language specification requires that two objects that are equal
   according to the Equals(Object) method must return the same integer
   result when the GetHashCode() method is called on them.)

   Parameters:

      another   GSSName object to compare with.

6.4.4. canonicalize

   GSSName canonicalize(Oid mech);
 
   Creates a mechanism name (MN) from an arbitrary internal name.  This
   is equivalent to using the factory methods described in 6.1.8 or
   6.1.9 that take the mechanism name as one of their parameters.

   Throws GSSException if an error is detected.

   Parameters:

      mech      The oid for the mechanism for which the canonical form
                of the name is requested.






Luciani                 Expires January 1 2005                 [Page 39]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.4.5. export

   byte[] export();

   Returns a canonical contiguous byte representation of a mechanism
   name (MN), suitable for direct, byte by byte comparison by
   authorization functions.  If the name is not an MN, implementations
   may throw a GSSException with the NAME_NOT_MN status code.  If an
   implementation chooses not to throw an exception, it should use some
   system specific default mechanism to canonicalize the name and then
   export it.  The format of the header of the output buffer is
   specified in RFC 2743.

6.4.6. ToString

   string ToString();

   Returns a textual representation of the GSSName object.  To retrieve
   the printed name format, which determines the syntax of the returned
   string, the getStringNameType method can be used.

   Throws GSSException if an error is detected.

6.4.7. stringNameType

   Oid stringNameType;

   Property of the object containing the oid representing the type of
   name returned through the ToString method.  Using this oid, the
   syntax of the printable name can be determined.

   Throws GSSException if an error is detected.

6.4.8. isAnonymous

   bool isAnonymous;

   Property which indicates whether the name object represents an
   anonymous entity or not.  If "true" then it is an anonymous name.

6.4.9. isMN

   bool isMN;

   Property which indicates whether the name object contains only one
   mechanism element and is a mechanism name as defined by RFC 2743.





Luciani                 Expires January 1 2005                 [Page 40]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.5. public enum GSSCredentialUsage

   This enumeration defines the usage categories for credentials.

6.5.1. INITIATE_AND_ACCEPT

   Credentials of this type can be used for both context initiation
   and acceptance.
   
6.5.2. INITIATE_ONLY

   Credentials of this type can be used for context initiation only.
   
6.5.3. ACCEPT_ONLY

   Credentials of this type can be used for context acceptance only.
   
6.6. public interface GSSCredential: ICloneable

   This interface encapsulates the GSS-API credentials for an entity.  A
   credential contains all the necessary cryptographic information to
   enable the creation of a context on behalf of the entity that it
   represents.  It may contain multiple, distinct, mechanism specific
   credential elements, each containing information for a specific
   security mechanism, but all referring to the same entity.

   A credential may be used to perform context initiation, acceptance,
   or both.

   GSS-API implementations must impose a local access-control policy on
   callers to prevent unauthorized callers from acquiring credentials to
   which they are not entitled.  GSS-API credential creation is not
   intended to provide a "login to the network" function, as such a
   function would involve the creation of new credentials rather than
   merely acquiring a handle to existing credentials.  Such functions,
   if required, should be defined in implementation-specific extensions
   to the API.

   If credential acquisition is time-consuming for a mechanism, the
   mechanism may choose to delay the actual acquisition until the
   credential is required (e.g.  by GSSContext).  Such mechanism-
   specific implementation decisions should be invisible to the calling
   application; thus the query methods immediately following the
   creation of a credential object must return valid credential data,
   and may therefore incur the overhead of a deferred credential
   acquisition.




   
Luciani                 Expires January 1 2005                 [Page 41]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   Applications will create a credential object passing the desired
   parameters.  The application can then use the query methods to obtain
   specific information about the instantiated credential object
   (equivalent to the gss_inquire routines).  When the credential is no
   longer needed, the application should call the dispose (equivalent to
   gss_release_cred) method to release any resources held by the
   credential object and to destroy any cryptographically sensitive
   information.

   Classes implementing this interface also implement the ICloneable
   interface.  This indicates that the class will support the Clone()
   method that will allow the creation of duplicate credentials.  This
   is useful when called just before the add() call to retain a copy of
   the original credential.

6.6.1. Example Code

   This example code demonstrates the creation of a GSSCredential
   implementation for a specific entity, querying of its fields, and its
   release when it is no longer needed.

   GSSManager mgr = GSSManager.getInstance();

   // start by creating a name object for the entity
   GSSName name = mgr.createName("userName", GSSNameTypes.NT_USER_NAME);

   // now acquire credentials for the entity
   GSSCredential cred = mgr.createCredential(name,
                                        GSSCredentialUsage.ACCEPT_ONLY);

   // display credential information - name, remaining lifetime,
   // and the mechanisms it has been acquired over
   Console.WriteLine(cred.getName().ToString());
   Console.WriteLine(cred.getRemainingLifetime());

   Oid[] mechs = cred.getMechs();
   if (mechs != null) {
      for (int i = 0; i < mechs.length; i++)
         Console.WriteLine(mechs[i].ToString());
   }

   // release system resources held by the credential
   cred.dispose();








Luciani                 Expires January 1 2005                 [Page 42]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.2. dispose

   void dispose();

   Releases any sensitive information that the GSSCredential object may
   be containing.  Applications should call this method as soon as the
   credential is no longer needed to minimize the time any sensitive
   information is maintained.

   Throws GSSException if an error is detected.

6.6.3. getName

   GSSName getName();
 
   Retrieves the name of the entity that the credential asserts.

   Throws GSSException if an error is detected.

6.6.4. getName

   GSSName getName(Oid mechOID);
 
   Retrieves a mechanism name of the entity that the credential asserts.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.5. getRemainingLifetime

   int getRemainingLifetime();

   Returns the remaining lifetime in seconds for a credential.  The
   remaining lifetime is the minimum lifetime for any of the underlying
   credential mechanisms.  A return value of
   GSSConstants.INDEFINITE_LIFETIME indicates that the credential does
   not expire.  A return value of 0 indicates that the credential is
   already expired.

   Throws GSSException if an error is detected.







Luciani                 Expires January 1 2005                 [Page 43]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.6. getRemainingInitLifetime

   int getRemainingInitLifetime(Oid mech);
 
   Returns the remaining lifetime is seconds for the credential to
   remain capable of initiating security contexts under the specified
   mechanism.  A return value of GSSConstants.INDEFINITE_LIFETIME
   indicates that the credential does not expire for context initiation.
   A return value of 0 indicates that the credential is already expired.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.7. getRemainingAcceptLifetime

   int getRemainingAcceptLifetime(Oid mech);
 
   Returns the remaining lifetime is seconds for the credential to
   remain capable of accepting security contexts under the specified
   mechanism.  A return value of GSSConstants.INDEFINITE_LIFETIME
   indicates that the credential does not expire for context acceptance.
   A return value of 0 indicates that the credential is already expired.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.8. getUsage

   GSSCredentialUsage getUsage();

   Returns the usage category for the credential.

   Throws GSSException if an error is detected.










Luciani                 Expires January 1 2005                 [Page 44]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.6.9. getUsage

   GSSCredentialUsage getUsage(Oid mechOID);
 
   Returns the usage category for the specified credential mechanism.

   Throws GSSException if an error is detected.

   Parameters:

      mechOID   The mechanism for which information should be
                returned.

6.6.10. getMechs

   Oid[] getMechs();

   Returns an array of mechanisms supported by this credential.

   Throws GSSException if an error is detected.

6.6.11. add

   void add(GSSName aName,
            int initLifetime,
            int acceptLifetime,
            Oid mech,
            int usage);
 
   Adds a mechanism specific credential-element to an existing
   credential.  This method allows the construction of credentials one
   mechanism at a time.

   This routine is envisioned to be used mainly by context acceptors
   during the creation of acceptance credentials which are to be used
   with a variety of clients using different security mechanisms.

   This routine adds the new credential element "in-place".  To add the
   element in a new credential, first call Clone() to obtain a copy of
   this credential, then call its add() method.

   Throws GSSException if an error is detected.

   Parameters:

      aName     Name of the principal for whom this credential is to
                be acquired.  Use "null" to specify the default
                principal.



Luciani                 Expires January 1 2005                 [Page 45]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      initLifetime
                The number of seconds that credentials should remain
                valid for initiating of security contexts.  Use
                GSSCredential.INDEFINITE_LIFETIME to request that the
                credentials have the maximum permitted lifetime.  Use
                GSSCredential.DEFAULT_LIFETIME to request default
                credential lifetime.

      acceptLifetime
                The number of seconds that credentials should remain
                valid for accepting of security contexts.  Use
                GSSCredential.INDEFINITE_LIFETIME to request that the
                credentials have the maximum permitted lifetime.  Use
                GSSCredential.DEFAULT_LIFETIME to request default
                credential lifetime.

      mech      The mechanisms over which the credential is to be
                acquired.

      usage     The intended usage for this credential object.  The
                value of this parameter must be one of:
                GSSCredential.ACCEPT_AND_INITIATE,
                GSSCredential.ACCEPT_ONLY, GSSCredential.INITIATE_ONLY

6.6.12. Equals

   bool Equals(Object another);

   Tests if this GSSCredential refers to the same entity as the supplied
   object.  The two credentials must be acquired over the same
   mechanisms and must refer to the same principal.  Returns "true" if
   the two GSSCredentials refer to the same entity; "false" otherwise.

   Parameters:

      another   Another GSSCredential object for comparison.















Luciani                 Expires January 1 2005                 [Page 46]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7. public interface GSSContext

   This interface encapsulates the GSS-API security context and provides
   the security services (wrap, unwrap, getMIC, verifyMIC) that are
   available over the context.  Security contexts are established
   between peers using locally acquired credentials.  Multiple contexts
   may exist simultaneously between a pair of peers, using the same or
   different set of credentials.  GSS-API functions in a manner
   independent of the underlying transport protocol and depends on its
   calling application to transport its tokens between peers.

   Before the context establishment phase is initiated, the context
   initiator may request specific characteristics desired of the
   established context.  These can be set by manipulating the
   GSSContext properties.  After the context is established, the caller
   can check the actual characteristic and services offered by the
   context by examining the GSSContext properties.

   The context establishment phase begins with the first call to the
   init method by the context initiator.  During this phase the
   initSecContext and acceptSecContext methods will produce GSS-API
   authentication tokens which the calling application needs to send to
   its peer.  If an error occurs at any point, an exception will get
   thrown and the code will start executing in a catch block.  If not,
   the normal flow of code continues and the application can read the
   isEstablished property.  If this property is false it indicates that
   a token is needed from its peer in order to continue the context
   establishment phase.  A setting of true signals that the local end of
   the context is established.  This may still require that a token be
   sent to the peer, if one is produced by GSS-API.  During the context
   establishment phase, the isProtReady property indicates whether or
   not the context can be used for the per-message operations.  This
   allows applications to use per-message operations on contexts which
   aren't fully established.

   After the context has been established or the isProtReady property is
   "true", the query routines can be invoked to determine the actual
   characteristics and services of the established context.  The
   application can also start using the per-message methods of wrap and
   getMIC to obtain cryptographic operations on application supplied
   data.

   When the context is no longer needed, the application should call
   dispose to release any system resources the context may be using.







Luciani                 Expires January 1 2005                 [Page 47]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.1. Example Code

   The example code presented below demonstrates the usage of the
   GSSContext interface for the initiating peer.  Different operations
   on the GSSContext object are presented, including: object
   instantiation, setting of desired flags, context establishment, query
   of actual context flags, per-message operations on application data,
   and finally context deletion.

   GSSManager mgr = GSSManager.getInstance();

   // start by creating the name for a service entity
   GSSName targetName = mgr.createName("service@host",
                                     GSSNameTypes.NT_HOSTBASED_SERVICE);

   // create a context using default credentials for the above entity
   // and the implementation specific default mechanism
   GSSContext context = mgr.createContext(targetName,
                                     null, /* default mechanism */
                                     null, /* default credentials */
                                     GSSConstants.INDEFINITE_LIFETIME);

   // set desired context options - all others are false by default
   context.confidentiality = true;
   context.mutualAuthentication = true;
   context.replayDetection = true;
   context.sequenceDetection = true;

   // establish a context between peers - using byte arrays
   byte[] inTok = new byte[0];

   try {
      do {
         byte[] outTok = context.initSecContext(inTok,
                                                0,
                                                inTok.length);

         // send the token if present
         if (outTok != null)
            sendToken(outTok);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         inTok = readToken();

      } while (true);


Luciani                 Expires January 1 2005                 [Page 48]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }

   // display context information
   Console.Writeline("Remaining lifetime in seconds = " +
                     context.lifetime);
   Console.Writeline("Context mechanism = " + context.Mech.ToString());
   Console.Writeline("Initiator = " + context.srcName.ToString());
   Console.Writeline("Acceptor = " + context.targName.ToString());

   if (context.confidentiality)
      Console.Writeline("Confidentiality security service available"); 

   if (context.integrity)
      Console.Writeline("Integrity security service available");

   // perform wrap on an application supplied message, appMsg,
   // using QOP = 0, and requesting privacy service
   byte[] appMsg ...

   MessageProp mProp = new MessageProp(0, true);

   byte[] tok = context.wrap(appMsg, 0, appMsg.length, mProp);

   if (mProp.privacy)
      Console.Writeline("Message protected with privacy.");

   sendToken(tok);

   // release the local-end of the context
   context.dispose();



















Luciani                 Expires January 1 2005                 [Page 49]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.2. initSecContext

   byte[] initSecContext(byte[] inputBuf,
                         int offset,
                         int len);

   Called by the context initiator to start the context creation
   process.  This is equivalent to the stream based method except that
   the token buffers are handled as byte arrays instead of using stream
   objects.  This method may return an output token which the
   application will need to send to the peer for processing by the
   accept call.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to the initSecContext method.
   Note that it is possible for the initSecContext() method to return a
   token for the peer when isEstablished is set to "true".  This
   indicates that the token needs to be sent to the peer, but the local
   end of the context is now fully established.

   Throws GSSException if an error is detected.

   Parameters:

      inputBuf  Token generated by the peer.  This parameter is ignored
                on the first call.

      offset    The offset within the inputBuf where the token begins.

      len       The length of the token within the inputBuf (starting
                at the offset).




















Luciani                 Expires January 1 2005                 [Page 50]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.2.1. Example Code

   // Create a new GSSContext implementation object.
   // GSSContext wrapper implements interface GSSContext.
   GSSContext context = mgr.createContext(...);

   byte[] inTok = new byte[0];

   try {
      do {
         byte[] outTok = context.initSecContext(inTok,
                                                0,
                                                inTok.length);

         // send the token if present
         if (outTok != null)
            sendToken(outTok);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         inTok = readToken();

      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }





















Luciani                 Expires January 1 2005                 [Page 51]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.3. initSecContext

   void initSecContext(Stream inStream,
                       Stream outStream);
 
   Called by the context initiator to start the context creation
   process.  This is equivalent to the byte array based method.  This
   method may write an output token to the outStream, which the
   application will need to send to the peer for processing by the
   accept call.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to the initSecContext method.
   Note that it is possible that the initSecContext() method to return a
   token for the peer when isEstablished is set to "true".  This
   indicates that the token needs to be sent to the peer, but the local
   end of the context is now fully established.

   The GSS-API authentication tokens contain a definitive start and end.
   This method will attempt to read one of these tokens per invocation,
   and may block on the stream if only part of the token is available.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream to read the token generated by the peer.  This
                parameter is ignored on the first call.

      outStream Stream where the output token will be written.
                During the final stage of context establishment, there
                may be no bytes written.



















Luciani                 Expires January 1 2005                 [Page 52]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.3.1. Example Code

   // Create a new GSSContext implementation object.

   // GSSContext wrapper implements interface GSSContext.
   GSSContext context = mgr.createContext(...);

   MemoryStream os = new MemoryStream();
   Stream is = null;

   try {
      do {
         context.initSecContext(is, os);

         // send token if present
         if (os.Length > 0)
            sendToken(os);

         // check if we should expect more tokens
         if (context.isEstablished)
            break;

         // another token expected from peer
         is = recvToken();

      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSSAPI error: " + e.Message);
   }





















Luciani                 Expires January 1 2005                 [Page 53]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4. acceptSecContext

   byte[] acceptSecContext(byte[] inTok,
                           int offset,
                           int len);

   Called by the context acceptor upon receiving a token from the peer.
   This call is equivalent to the stream based method except that the
   token buffers are handled as byte arrays instead of using stream
   objects.

   This method may return an output token which the application will
   need to send to the peer for further processing by the init call.

   A "null" return value indicates that no token needs to be sent to the
   peer.  The application can check the isEstablished property to
   determine if the context establishment phase is complete for this
   peer.  A value of "false" for isEstablished indicates that more
   tokens are expected to be supplied to this method.  Note that it is
   possible that the acceptSecContext() method to return a token for the
   peer when isEstablished is set to "true".  This indicates that the
   token needs to be sent to the peer, but the local end of the context
   is now fully established.

   Upon completion of the context establishment, the available context
   options may be queried through the get methods.

   Throws GSSException if an error is detected.

   Parameters:

      inTok     Token generated by the peer.

      offset    The offset within the inTok where the token begins.

      len       The length of the token within the inTok (starting at
                the offset).














Luciani                 Expires January 1 2005                 [Page 54]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.4.1. Example Code

   // acquire server credentials
   GSSCredential server = mgr.createCredential(...);

   // create acceptor GSS-API context from the default provider
   GSSContext context = mgr.createContext(server, null);

   try {
      do {
         byte[] inTok = readToken();

         byte[] outTok = context.acceptSecContext(inTok,
                                                  0,
                                                  inTok.length);

         // possibly send token to peer
         if (outTok != null)
            sendToken(outTok);

         // check if local context establishment is complete
         if (context.isEstablished)
            break;
      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSS-API error: " + e.Message);
   }























Luciani                 Expires January 1 2005                 [Page 55]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.5. acceptSecContext

   void acceptSecContext(Stream inStream,
                         Stream outStream);

   Called by the context acceptor upon receiving a token from the peer.
   This call is equivalent to the byte array method.  It may write an
   output token to the outStream, which the application will need to
   send to the peer for processing by its initSecContext method.  The
   application can check the isEstablished property to determine if the
   context establishment phase is complete for this peer.  A value of
   "false" for isEstablished indicates that more tokens are expected to
   be supplied to this method.  Note that it is possible for the
   acceptSecContext() method to return a token for the peer when
   isEstablished is set to "true".  This indicates that the token needs
   to be sent to the peer, but the local end of the context is now fully
   established.

   The GSS-API authentication tokens contain a definitive start and end.
   This method will attempt to read one of these tokens per invocation,
   and may block on the stream if only part of the token is available.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Contains the token generated by the peer.

      outStream Stream where the output token will be written.
                During the final stage of context establishment, there
                may be no bytes written.




















Luciani                 Expires January 1 2005                 [Page 56]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.5.1. Example Code

   // acquire server credentials
   GSSCredential server = mgr.createCredential(...);

   // create acceptor GSS-API context from the default provider
   GSSContext context = mgr.createContext(server, null);

   MemoryStream os = new MemoryStream();
   Stream is = null;

   try {
      do {
         is = recvToken();

         context.acceptSecContext(is, os);

         // possibly send token to peer
         if (os.Length > 0)
            sendToken(os);

         // check if local context establishment is complete
         if (context.isEstablished)
            break;
      } while (true);

   } catch (GSSException e) {
      Console.Writeline("GSS-API error: " + e.Message);
   }

6.7.6. isEstablished

   bool isEstablished;

   Property which indicates the state of the context.  A setting of
   "true" for the property indicates that the context has been fully
   established on the caller's side and no more tokens are needed from
   the peer.  The property should be examined after calls to
   initSecContext() or acceptSecContext() when no GSSException is
   thrown.

6.7.7. dispose

   void dispose();

   Releases any system resources and cryptographic information stored in
   the context object.  This will invalidate the context.

   Throws GSSException if an error is detected.


Luciani                 Expires January 1 2005                 [Page 57]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.8. getWrapSizeLimit

   int getWrapSizeLimit(int qop,
                        bool confReq,
                        int maxTokenSize);
 
   Returns the maximum message size that, if presented to the wrap
   method with the same confReq and qop parameters, will result in an
   output token containing no more than the maxTokenSize bytes.

   This call is intended for use by applications that communicate over
   protocols that impose a maximum message size.  It enables the
   application to fragment messages prior to applying protection.

   GSS-API implementations are recommended but not required to detect
   invalid QOP values when getWrapSizeLimit is called.  This routine
   guarantees only a maximum message size, not the availability of
   specific QOP values for message protection.
		        
   Successful completion of this call does not guarantee that wrap will
   be able to protect a message of the computed length, since this
   ability may depend on the availability of system resources at the
   time that wrap is called.  However, if the implementation itself
   imposes an upper limit on the length of messages that may be
   processed by wrap, the implementation should not return a value that
   is greater than this length.

   Throws GSSException if an error is detected.

   Parameters:

      qop       Indicates the level of protection wrap will be asked
                to provide.

      confReq   Indicates if wrap will be asked to provide privacy
                service.

      maxTokenSize
                The desired maximum size of the token emitted by wrap.












Luciani                 Expires January 1 2005                 [Page 58]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.9. wrap

   byte[] wrap(byte[] inBuf,
               int offset,
               int len,
               MessageProp msgProp);
 
   Applies per-message security services over the established security
   context.  The method will return a token with a cryptographic MIC and
   may optionally encrypt the specified inBuf.  This method is
   equivalent in functionality to its stream counterpart.  The returned
   byte array will contain both the MIC and the message.

   The MessageProp object is instantiated by the application and used to
   specify a QOP value which selects cryptographic algorithms, and a
   privacy service to optionally encrypt the message.  The underlying
   mechanism that is used in the call may not be able to provide the
   privacy service.  It sets the actual privacy service that it does
   provide in this MessageProp object which the caller should then query
   upon return.  If the mechanism is not able to provide the requested
   QOP, it throws a GSSException with the BAD_QOP code.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping of zero-length messages.

   The application will be responsible for sending the token to the
   peer.

   Throws GSSException if an error is detected.

   Parameters:

      inBuf     Application data to be protected.

      offset    The offset within the inBuf where the data begins.

      len       The length of the data within the inBuf (starting at
                the offset).

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP and privacy state.
                Set the desired QOP to 0 to request the default QOP.
                Upon return from this method, this object will contain
                the actual privacy state that was applied to the
                message by the underlying mechanism.





Luciani                 Expires January 1 2005                 [Page 59]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.10. wrap

   void wrap(Stream inStream,
             Stream outStream,
             MessageProp msgProp);
 
   Applies per-message security services over the established
   security context.  The method will produce a token with a
   cryptographic MIC and may optionally encrypt the message in inStream.
   The outStream will contain both the MIC and the message.

   The MessageProp object is instantiated by the application and used to
   specify a QOP value which selects cryptographic algorithms, and a
   privacy service to optionally encrypt the message.  The underlying
   mechanism that is used in the call may not be able to provide the
   privacy service.  It sets the actual privacy service that it does
   provide in this MessageProp object which the caller should then query
   upon return.  If the mechanism is not able to provide the requested
   QOP, it throws a GSSException with the BAD_QOP code.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping of zero-length messages.

   The application will be responsible for sending the token to the
   peer.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the application data to be
                protected.

      outStream The stream to write the protected message to.
                The application is responsible for sending this to the
                other peer for processing in its unwrap method.

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP and privacy state.
                Set the desired QOP to 0 to request the default QOP.
                Upon return from this method, this object will contain
                the the actual privacy state that was applied to the
                message by the underlying mechanism.







Luciani                 Expires January 1 2005                 [Page 60]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.11. unwrap

   byte[] unwrap(byte[] inBuf,
                        int offset,
                        int len,
                        MessageProp msgProp);
 
   Used by the peer application to process tokens generated with the
   wrap call.  This call is equal in functionality to its stream
   counterpart.  The method will return the message supplied in the peer
   application to the wrap call, verifying the embedded MIC.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP, whether confidentiality was applied to the message, and
   other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping and unwrapping of zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inBuf     GSS-API wrap token received from peer.

      offset    The offset within the inBuf where the token begins.

      len       The length of the token within the inBuf (starting at
                the offset).

      msgProp   Upon return from the method, this object will contain
                the applied QOP, the privacy state of the message, and
                supplementary information stating whether the token was
                a duplicate, old, out of sequence or arriving after a
                gap.














Luciani                 Expires January 1 2005                 [Page 61]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.12. unwrap

   void unwrap(Stream inStream,
               Stream outStream,
               MessageProp msgProp);

   Used by the peer application to process tokens generated with the
   wrap call.  This call is equal in functionality to its byte array
   counterpart.  It will produce the message supplied in the peer
   application to the wrap call, verifying the embedded MIC.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP, whether confidentiality was applied to the message, and
   other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by wrap to provide "secure framing", implementations should support
   the wrapping and unwrapping of zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the GSS-API wrap token received from
                the peer.

      outStream The stream to write the application message to.

      msgProp   Upon return from the method, this object will contain
                the applied QOP, the privacy state of the message, and
                supplementary information stating whether the token was
                a duplicate, old, out of sequence or arriving after a
                gap.

















Luciani                 Expires January 1 2005                 [Page 62]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.13. getMIC

   byte[] getMIC(byte[] inMsg,
                 int offset,
                 int len,
                 MessageProp msgProp);
 
   Produces a token containing a cryptographic MIC for the supplied
   message, for transfer to the peer application.  Unlike wrap, which
   encapsulates the user message in the returned token, only the message
   MIC is returned in the output token.  This method is identical in
   functionality to its stream counterpart.

   Note that privacy can only be applied through the wrap call.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   derivation of MICs from zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inMsg     Message to generate MIC over.

      offset    The offset within the inMsg where the token begins.

      len       The length of the token within the inMsg (starting at
                the offset).

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP.  Set the desired
                QOP to 0 in msgProp to request the default QOP.
                Alternatively pass in "null" for msgProp to request
                default QOP.
















Luciani                 Expires January 1 2005                 [Page 63]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.14. getMIC

   void getMIC(Stream inStream,
               Stream outStream,
               MessageProp msgProp);
 
   Produces a token containing a cryptographic MIC for the supplied
   message, for transfer to the peer application.  Unlike wrap, which
   encapsulates the user message in the returned token, only the message
   MIC is produced in the output token.  This method is identical in
   functionality to its byte array counterpart.

   Note that privacy can only be applied through the wrap call.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   derivation of MICs from zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inStream  Stream containing the message to generate MIC over.

      outStream Stream to write the GSS-API output token to.

      msgProp   Instance of MessageProp that is used by the
                application to set the desired QOP.  Set the desired
                QOP to 0 in msgProp to request the default QOP.
                Alternatively pass in "null" for msgProp to request
                default QOP.




















Luciani                 Expires January 1 2005                 [Page 64]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.15. verifyMIC

   void verifyMIC(byte[] inTok,
                  int tokOffset,
                  int tokLen,
                  byte[] inMsg,
                  int msgOffset,
                  int msgLen,
                  MessageProp msgProp);
 
   Verifies the cryptographic MIC, contained in the token parameter,
   over the supplied message.  This method is equivalent in
   functionality to its stream counterpart.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP indicating the strength of protection that was applied to
   the message and other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   the calculation and verification of MICs over zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      inTok     Token generated by peer's getMIC method.

      tokOffset The offset within the inTok where the token begins.

      tokLen    The length of the token within the inTok (starting at
                the offset).

      inMsg     Application message to verify the cryptographic MIC
                over.

      msgOffset The offset within the inMsg where the message begins.

      msgLen    The length of the message within the inMsg (starting
                at the offset).

      msgProp   Upon return from the method, this object will contain
                the applied QOP and supplementary information stating
                whether the token was a duplicate, old, out of sequence
                or arriving after a gap.  The confidentiality state will
                be set to "false".




Luciani                 Expires January 1 2005                 [Page 65]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.16. verifyMIC

   void verifyMIC(Stream tokStream,
                  Stream msgStream,
                  MessageProp msgProp);
 
   Verifies the cryptographic MIC, contained in the token parameter,
   over the supplied message.  This method is equivalent in
   functionality to its byte array counterpart.

   The MessageProp object is instantiated by the application and is used
   by the underlying mechanism to return information to the caller such
   as the QOP indicating the strength of protection that was applied to
   the message and other supplementary message state information.

   Since some application-level protocols may wish to use tokens emitted
   by getMIC to provide "secure framing", implementations should support
   the calculation and verification of MICs over zero-length messages.

   Throws GSSException if an error is detected.

   Parameters:

      tokStream Stream containing the token generated by peer's
                getMIC method.

      msgStream Stream containing the application message to
                verify the cryptographic MIC over.

      msgProp   Upon return from the method, this object will contain
                the applied QOP and supplementary information stating
                whether the token was a duplicate, old, out of sequence
                or arriving after a gap.  The confidentiality state will
                be set to "false".

















Luciani                 Expires January 1 2005                 [Page 66]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.17. export

   byte[] export();

   Provided to support the sharing of work between multiple processes.
   This routine will typically be used by the context-acceptor, in an
   application where a single process receives incoming connection
   requests and accepts security contexts over them, then passes the
   established context to one or more other processes for message
   exchange.

   This method deactivates the security context and creates an
   interprocess token which, when passed to the byte array constructor
   of the GSSContext interface in another process, will re-activate the
   context in the second process.  Only a single instantiation of a
   given context may be active at any one time; a subsequent attempt by
   a context exporter to access the exported security context will fail.

   The implementation may constrain the set of processes by which the
   interprocess token may be imported, either as a function of local
   security policy, or as a result of implementation decisions.  For
   example, some implementations may constrain contexts to be passed
   only between processes that run under the same account, or which are
   part of the same process group.

   The interprocess token may contain security-sensitive information
   (for example cryptographic keys).  While mechanisms are encouraged to
   either avoid placing such sensitive information within interprocess
   tokens, or to encrypt the token before returning it to the
   application, in a typical GSS-API implementation this may not be
   possible.  Thus the application must take care to protect the
   interprocess token, and ensure that any process to which the token is
   transferred is trustworthy.

   Throws GSSException if an error is detected.

6.7.18. mutualAuthentication

   bool mutualAuthentication;
 
   Mutual Authentication context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that mutual
   authentication should be requested during context establishment.
   The value of this property after context establishment is completed
   indicates whether or not mutual authentication was performed when
   the context was established.

   Throws GSSException if an error is detected.


Luciani                 Expires January 1 2005                 [Page 67]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.19. replayDetection

   bool replayDetection;

   Replay Detection context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   replay detection service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the replay
   detection service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.20. sequenceDetection

   bool sequenceDetection;

   Sequence Detection context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   sequence checking service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the sequence
   checking service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.21. credentialDelegation

   bool credentialDelegation;
 
   Credential Delegate context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that
   credential delegation is desired.  The value of this property after
   context establishment is completed or after the value of the
   isProtReady property becomes "true" indicates whether or not
   credential delegation was performed when the context was established.

   Throws GSSException if an error is detected.








Luciani                 Expires January 1 2005                 [Page 68]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.22. anonymity

   bool anonymity;
 
   Anonimity context property.  When the value of this property is set
   to "true" before the context creation process begins then it
   indicates to the underlying mechanisms that anonymity has been
   requested.  The value of this property after context establishment is
   completed or after the value of the isProtReady property becomes
   "true" indicates whether or not anonymity was used during the
   establishment of the context.

   Throws GSSException if an error is detected.

6.7.23. confidentiality

   bool confidentiality;
 
   Confidentiality context property.  When the value of this
   property is set to "true" before the context creation process
   begins then it indicates to the underlying mechanisms that the
   confidentiality service should be requested during context
   establishment.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates whether or not the confidentiality
   service is in effect for the context.

   Throws GSSException if an error is detected.

6.7.24. integrity

   bool integrity;
 
   Integrity context property.  When the value of this property is set
   to "true" before the context creation process begins then it
   indicates to the underlying mechanisms that the integrity service
   should be requested during context establishment.  The value of this
   property after context establishment is completed or after the value
   of the isProtReady property becomes "true" indicates whether or not
   the integrity service is in effect for the context.

   Throws GSSException if an error is detected.









Luciani                 Expires January 1 2005                 [Page 69]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.25. lifetime

   int lifetime;
 
   Lifetime context property.  The value of this property indicates
   the lifetime in seconds for the context.  This property can only be
   set by the initiator before the context creation process is
   started.  Set the property to GSSConstants.INDEFINITE_LIFETIME and
   GSSConstants.DEFAULT_LIFETIME to request indefinite or default
   context lifetime.  The value of this property after context
   establishment is completed or after the value of the isProtReady
   property becomes "true" indicates the remaining lifetime for the
   context.

   Throws GSSException if an error is detected.

6.7.26. channelBinding

   ChannelBinding channelBinding;
 
   Channel Binding context property.  This value of this property can be
   set to specify a Channel Binding to be used during context
   establishment.  This property can only be set before the context
   creation process begins.

   Throws GSSException if an error is detected.

6.7.27. isTransferable

   bool isTransferable;

   Property which indicates whether or not the context can be
   transferred to other processes.  The value of this property is only
   valid on fully established contexts.

   Throws GSSException if an error is detected.

6.7.28. isProtReady

   bool isProtReady;

   Property which indicates whether or not per message operations can
   be applied over the context.  Some mechanisms may allow the usage of
   per-message operations before the context is fully established.

   Throws GSSException if an error is detected.





Luciani                 Expires January 1 2005                 [Page 70]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.29. srcName

   GSSName srcName;
 
   Property which contains the name of the context initiator.  The
   value of this property is valid only after the context is fully
   established or the isProtReady property is set to "true".  The
   property is guaranteed to be set to an MN after it becomes valid.

   Throws GSSException if an error is detected.

6.7.30. targName

   GSSName targName;
 
   Property which contains the name of the context target (acceptor).
   The value of this property is valid only after the context is fully
   established or the isProtReady property is set to "true".  The
   property is guaranteed to be set to an MN after it becomes valid.

   Throws GSSException if an error is detected.

6.7.31. mechanism

   Oid mechanism;
 
   Property which contains the mechanism oid for the context.
   The value of this property may change from time to time if mechanism
   negotiation takes place.

   Throws GSSException if an error is detected.

6.7.32. delegatedCredential

   GSSCredential delegatedCredential;

   Property which contains the credential delegated by the context
   initiator.  The value of this property is only valid on the
   acceptors side after the context has been fully established and if
   the credentialDelegation property is set to "true".

   Throws GSSException if an error is detected.









Luciani                 Expires January 1 2005                 [Page 71]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.7.33. isInitiator

   bool isInitiator; 

   Property which contains indication of whether or not the context
   creation process started on this side.  The value of this property
   is only valid after the context creation process has started.

   Throws GSSException if an error is detected.

6.8. public class MessageProp

   This is a utility class used within the per-message GSSContext
   methods to convey per-message properties.

   When used with the GSSContext interface's wrap and getMIC methods, an
   instance of this class is used to indicate the desired QOP and to
   request if confidentiality services are to be applied to caller
   supplied data (wrap only).  To request default QOP, the value of 0
   should be used for QOP.

   When used with the unwrap and verifyMIC methods of the GSSContext
   interface, an instance of this class will be used to indicate the
   applied QOP and confidentiality services over the supplied message.
   In the case of verifyMIC, the confidentiality state will always be
   "false".  Upon return from these methods, this object will also
   contain any supplementary status values applicable to the processed
   token.  The supplementary status values can indicate old tokens, out
   of sequence tokens, gap tokens or duplicate tokens.






















Luciani                 Expires January 1 2005                 [Page 72]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.1. Constructors

   public MessageProp(bool privState);

   Constructor which sets QOP to 0 indicating that the default QOP is
   requested.

   Throws GSSException if an error is detected.

   Parameters:

      privState The desired privacy state.  "true" for privacy and
                "false" for integrity only.

   public MessageProp(int qop, bool privState);

   Constructor which sets the values for the qop and privacy state.

   Throws GSSException if an error is detected.

   Parameters:

      qop       The desired QOP.  Use 0 to request a default QOP.

      privState The desired privacy state.  "true" for privacy and
                "false" for integrity only.

6.8.2. QOP

   public int QOP;

   QOP property.  Use this to set or get the value of the QOP property.
   Set to 0 to request the default value.

   Throws GSSException if an error is detected.

6.8.3. privacy

   public bool privacy;

   Privacy property.  Use this to set or get the value of the privacy
   property.

   Throws GSSException if an error is detected.







Luciani                 Expires January 1 2005                 [Page 73]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.4. minorStatus

   public int minorStatus;

   Minor Status property.  This property maintains the minor status that
   the underlying mechanism might have set.

   Throws GSSException if an error is detected.

6.8.5. minorString

   public string minorString;

   Minor String property.  This property maintains a string explaining
   the mechanism specific error code.  The string will be empty if no
   mechanism error code has been set.

   Throws GSSException if an error is detected.

6.8.6. isDuplicateToken

   public bool isDuplicateToken;

   Is Duplicate Token property.  The value of this property indicates
   whether or not the token is a duplicate of an earlier token.

   Throws GSSException if an error is detected.

6.8.7. isOldToken

   public bool isOldToken;

   Is Old Token property.  The value of this property indicates whether
   or not the token's validity period has expired.

   Throws GSSException if an error is detected.

6.8.8. isUnseqToken

   public bool isUnseqToken;

   Is Un-sequenced Token property.  The value of this property indicates
   whether or not the token is being processed out of sequence.

   Throws GSSException if an error is detected.






Luciani                 Expires January 1 2005                 [Page 74]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.8.9. isGapToken

   public bool isGapToken;

   Is Gap Token property.  The value of this property indicates
   whether or not an expected per-message was not received.

   Throws GSSException if an error is detected.


6.9.  public class ChannelBinding

   The GSS-API accommodates the concept of caller-provided channel
   binding information.  Channel bindings are used to strengthen the
   quality with which peer entity authentication is provided during
   context establishment.  They enable the GSS-API callers to bind the
   establishment of the security context to relevant characteristics
   like addresses or to application specific data.

   The caller initiating the security context must determine the
   appropriate channel binding values to set in the GSSContext object.
   The acceptor must provide an identical binding in order to validate
   that received tokens possess correct channel-related characteristics.

   Use of channel bindings is optional in GSS-API.  Since channel-
   binding information may be transmitted in context establishment
   tokens, applications should therefore not use confidential data as
   channel-binding components.























Luciani                 Expires January 1 2005                 [Page 75]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.9.1. Constructors

   public ChannelBinding(EndPoint initAddr,
                         EndPoint acceptAddr,
                         byte[] appData);

   Create a ChannelBinding object with user supplied address information
   and data.  "null" values can be used for any fields which the
   application does not want to specify.

   Throws GSSException if an error is detected.

   Parameters:

      initAddr  The address of the context initiator.  "null" value
                can be supplied to indicate that the application does
                not want to set this value.

      acceptAddrThe address of the context acceptor.  "null" value can
                be supplied to indicate that the application does not
                want to set this value.

      appData   Application supplied data to be used as part of the
                channel bindings.  "null" value can be supplied to
                indicate that the application does not want to set
                this value.

   public ChannelBinding(byte[] appData);

   Creates a ChannelBinding object without any addressing information.

   Throws GSSException if an error is detected.

   Parameters:

      appData   Application supplied data to be used as part of the
                channel bindings.

6.9.2. initiatorAddress

   public EndPoint initiatorAddress;

   Initiator Address property.  The value of this property indicates
   the initiator's address for the channel binding.  The property value
   will be set to "null" if not set.

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 76]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.9.3. acceptorAddress

   public EndPoint acceptorAddress;

   Acceptor Address property.  The value of this property indicates
   the acceptor's address for the channel binding.  The property value
   will be set to "null" if not set.

   Throws GSSException if an error is detected.

6.9.4. applicationData

   public byte[] applicationData;

   Application Data property.  The value of this property indicates
   the application data being used for the channel binding.  The
   property value will be set to "null" if not set.

   Throws GSSException if an error is detected.

6.9.8. Equals

   public override bool Equals(Object obj);

   Tests whether or not two channel binding objects match.

   Throws GSSException if an error is detected.

   Parameters:

      obj       Another channel binding to compare with.

6.10. public class Oid

   This class represents Universal Object Identifiers (Oids) and their
   associated operations.

   Oids are hierarchically globally-interpretable identifiers used
   within the GSS-API framework to identify mechanisms and name formats.

   The structure and encoding of Oids is defined in ISOIEC-8824 and
   ISOIEC-8825.  For example the Oid representation of Kerberos V5
   mechanism is "1.2.840.113554.1.2.2"

   The GSSName name class contains public static Oid objects
   representing the standard name types defined in GSS-API.





Luciani                 Expires January 1 2005                 [Page 77]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.1. Constructors

   public Oid(string strOid);

   Creates an Oid object from a string representation of its integer
   components (e.g. "1.2.840.113554.1.2.2").

   Throws GSSException if an error is detected.

   Parameters:

      strOid    The string representation for the oid.

   public Oid(Stream derOid);

   Creates an Oid object from its DER encoding.  This refers to the full
   encoding including tag and length.  The structure and encoding of
   Oids is defined in ISOIEC-8824 and ISOIEC-8825.  This method is
   identical in functionality to its byte array counterpart.

   Throws GSSException if an error is detected.

   Parameters:

      derOid    Stream containing the DER encoded oid.

   public Oid(byte[] DEROid);

   Creates an Oid object from its DER encoding.  This refers to the full
   encoding including tag and length.  The structure and encoding of
   Oids is defined in ISOIEC-8824 and ISOIEC-8825.  This method is
   identical in functionality to its byte array counterpart.

   Throws GSSException if an error is detected.

   Parameters:

      derOid    Byte array storing a DER encoded oid.

6.10.2. ToString

   public override string ToString();

   Returns a string representation of the oid's integer components in
   dot separated notation (e.g. "1.2.840.113554.1.2.2").

   Throws GSSException if an error is detected.




Luciani                 Expires January 1 2005                 [Page 78]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.10.3. Equals

   public override bool Equals(Object Obj);

   Tests if two OID objects represent the same oid value.

   Throws GSSException if an error is detected.

   Parameters:

      obj       Another Oid object to compare with.

6.10.4. DER

   public byte[] DER;

   DER property. Property of the object which refers to its full ASN.1
   DER encoding, the property includes the tag and length.

   Throws GSSException if an error is detected.

6.10.5. containedIn

   public bool containedIn(Oid[] oids);

   Method to test if an Oid object is contained within the
   supplied Oid object array.

   Throws GSSException if an error is detected.

   Parameters:

      oids      An array of oids to search.

6.11. public class GSSException : Exception

   This exception is thrown whenever a fatal GSS-API error occurs
   including mechanism specific errors.  It may contain both, the major
   and minor, GSS-API status codes.  The mechanism implementers are
   responsible for setting appropriate minor status codes when throwing
   this exception.  Aside from delivering the numeric error code(s) to
   the caller, this class performs the mapping from their numeric values
   to textual representations.  All C# GSS-API methods and properties
   are declared throwing this exception.







Luciani                 Expires January 1 2005                 [Page 79]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.11.1. Constants

   All valid major GSS-API error code values are declared as constants
   in this class.

   public const int BAD_BINDINGS

   Channel bindings mismatch error.

   public const int BAD_MECH

   Unsupported mechanism requested error.

   public const int BAD_NAME

   Invalid name provided error.

   public const int BAD_NAMETYPE

   Name of unsupported type provided error.

   public const int BAD_STATUS

   Invalid status code error - this is the default status value.

   public const int BAD_MIC

   Token had invalid integrity check error.

   public const int CONTEXT_EXPIRED

   Specified security context expired error.

   public const int CREDENTIALS_EXPIRED

   Expired credentials detected error.

   public const int DEFECTIVE_CREDENTIAL

   Defective credential error.

   public const int DEFECTIVE_TOKEN

   Defective token error.

   public const int FAILURE

   General failure, unspecified at GSS-API level.



Luciani                 Expires January 1 2005                 [Page 80]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   public const int NO_CONTEXT

   Invalid security context error.

   public const int NO_CRED

   Invalid credentials error.

   public const int BAD_QOP

   Unsupported QOP value error.

   public const int UNAUTHORIZED

   Operation unauthorized error.

   public const int UNAVAILABLE

   Operation unavailable error.

   public const int DUPLICATE_ELEMENT

   Duplicate credential element requested error.

   public const int NAME_NOT_MN

   Name contains multi-mechanism elements error.

   public const int DUPLICATE_TOKEN

   The token was a duplicate of an earlier token.  This is a fatal error
   code that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.

   public const int OLD_TOKEN

   The token's validity period has expired.  This is a fatal error code
   that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.

   public const int UNSEQ_TOKEN

   A later token has already been processed.  This is a fatal error code
   that may occur during context establishment.  It is not used to
   indicate supplementary status values.  The MessageProp object is used
   for that purpose.



Luciani                 Expires January 1 2005                 [Page 81]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


   public const int GAP_TOKEN

   An expected per-message token was not received.  This is a fatal
   error code that may occur during context establishment.  It is not
   used to indicate supplementary status values.  The MessageProp object
   is used for that purpose.

6.11.2. Constructors

   public GSSException(int majorCode);

   Creates a GSSException object with a specified major code.

   Parameters:

      majorCode The GSS error code causing this exception to be
                thrown.

   public GSSException(int majorCode, int minorCode,
                       string minorString);

   Creates a GSSException object with the specified major code, minor
   code, and minor code textual explanation.  This constructor is to be
   used when the exception is originating from the security mechanism.
   It allows to specify the GSS code and the mechanism code.

   Parameters:

      majorCode      The GSS error code causing this exception to be
                     thrown.

      minorCode      The mechanism error code causing this exception
                     to be thrown.

      minorString    The textual explanation of the mechanism error
                     code.

6.11.3. major

   public int major;

   Major code property.  Property of the object representing the GSS
   error code that caused the exception to be thrown.








Luciani                 Expires January 1 2005                 [Page 82]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


6.11.4. minor

   public int minor;

   Minor code property.  Property of the object representing the
   mechanism error code that caused the exception to be thrown.  The
   minor code property is set by the underlying mechanism.  A setting of
   0 for this property indicates that the mechanism error code is not
   set.

6.11.5. majorString

   public string majorString;

   Major string property.  Property of the object explaining the GSS
   major error code causing the exception to be thrown.

6.11.6. minorString

   public string minorString;

   Minor string property.  Property of the object explaining the
   mechanism specific error code causing the exception to be thrown.
   The string will be empty if no mechanism error code has been set.

6.11.7. ToString

   public override string ToString();

   Returns a textual representation of both the major and minor status
   codes.

6.11.8. Message

   public string Message;

   Message property.  Error message explaining the reason for the
   exception.













Luciani                 Expires January 1 2005                 [Page 83]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


7. Sample Applications

7.1. Simple GSS Context Initiator

   using org.ietf.gss;

   /**
    * This is a partial sketch for a simple client program that acts
    * as a GSS context initiator.  It illustrates how to use the C#
    * bindings for the GSS-API specified in
    * Generic Security Service API Version 2 : C# bindings
    *
    *
    * This code sketch assumes the existence of a GSS-API
    * implementation that supports the mechanism that it will need and
    * is present as a library package (org.ietf.jgss) either as part of
    * the standard JRE or in the CLASSPATH the application specifies.
    */

   public class SimpleClient {

      private string serviceName; // name of peer (ie. server)
      private GSSCredential clientCred = null;
      private GSSContext context = null;
      private Oid mech; // underlying mechanism to use

      private GSSManager mgr = GSSManager.getInstance();

      ...
      ...

      private void clientActions() {

         initializeGSS();
         establishContext();
         doCommunication();
      }














Luciani                 Expires January 1 2005                 [Page 84]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Acquire credentials for the client.
       */
      private void initializeGSS() {

         try {

            clientCred = mgr.createCredential(null /*default princ*/,
                 GSSConstants.INDEFINITE_LIFETIME /* max lifetime */,
                 mech /* mechanism to use */,
                 GSSCredentialUsage.INITIATE_ONLY /* init context */);

            Console.Writeline("GSSCredential created for " +
                              cred.getName().ToString());
            Console.Writeline("Credential lifetime (sec)=" +
                              cred.getRemainingLifetime());

         } catch (GSSException e) {
            Console.Writeline("GSS-API error in credential acquisition:"
                              + e.Message);
                   ...
                   ...
           }

           ...
           ...
      }
























Luciani                 Expires January 1 2005                 [Page 85]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Does the security context establishment with the
       * server.
       */
      private void establishContext() {

         byte[] inToken = new byte[0];
         byte[] outToken = null;

         try {

            GSSName peer = mgr.createName(
                                     serviceName,
                                     GSSNameTypes.NT_HOSTBASED_SERVICE);

            context = mgr.createContext(
                          peer,
                          mech,
                          gssCred,
                          GSSConstants.INDEFINITE_LIFETIME/*lifetime*/);

            // Will need to support confidentiality
            context.confidentiality = true;

            while (!context.isEstablished) {

               outToken = context.initSecContext(inToken,
                                                 0,
                                                 inToken.length);

               if (outToken != null)
                  writeGSSToken(outToken);

               if (!context.isEstablished)
                  inToken = readGSSToken();
            }

            GSSName peer = context.srcName;
            Console.Writeline(
                     "Security context established with " +
                     peer +
                     " using underlying mechanism " + mech.toString());

         } catch (GSSException e) {
            Console.Writeline(
               "GSS-API error during context establishment: " +
               e.Message);
         }
           ...
      }

Luciani                 Expires January 1 2005                 [Page 86]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      /**
       * Sends some data to the server and reads back the
       * response.
       */
      private void doCommunication()  {

         byte[] inToken = null;
         byte[] outToken = null;
         byte[] buffer;

         // Container for multiple input-output arguments to and
         // from the per-message routines (e.g., wrap/unwrap).
         MessageProp messgInfo = new MessageProp();

         try {

            /*
             * Now send some bytes to the server to be
             * processed. They will be integrity protected but
             * not encrypted for privacy.
             */

            buffer = readFromFile();

            // Set privacy to false and use the default QOP
            messgInfo.privacy = false;

            outToken = context.wrap(buffer,
                                    0,
                                    buffer.length,
                                    messgInfo);

            writeGSSToken(outToken);

            /*
             * Now read the response from the server.
             */

            inToken = readGSSToken();
            buffer = context.unwrap(inToken,
                                    0,
                                    inToken.length,
                                    messgInfo);








Luciani                 Expires January 1 2005                 [Page 87]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


            // All ok if no exception was thrown!

            GSSName peer = context.srcName;

            Console.Writeline("Message from " +
                              peer.ToString() +
                              " arrived.");
            Console.Writeline("Was it encrypted? " +
                              messgInfo.privacy);
            Console.Writeline("Duplicate Token? " +
                              messgInfo.isDuplicateToken);
            Console.Writeline("Old Token? " +
                              messgInfo.isOldToken);
            Console.Writeline("Unsequenced Token? " +
                              messgInfo.isUnseqToken);
            Console.Writeline("Gap Token? " +
                              messgInfo.isGapToken);

            ...
            ...

         } catch (GSSException e) {
            Console.Writeline("GSS-API error in per-message calls: " +
                              e.Message);
            ...
            ...

         }

         ...
         ...

      } // end of doCommunication method

      ...
      ...

   } // end of class SimpleClient













Luciani                 Expires January 1 2005                 [Page 88]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


7.2. Simple GSS Context Acceptor

   using org.ietf.gss;

   /**
    * This is a partial sketch for a simple server program that acts
    * as a GSS context acceptor. It illustrates how to use the C#
    * bindings for the GSS-API specified in
    * Generic Security Service API Version 2 : C# bindings
    *
    * This code sketch assumes the existence of a GSS-API
    * implementation that supports the mechanisms that it will need and
    * is present as a library package (org.ietf.jgss) either as part of
    * the standard JRE or in the CLASSPATH the application specifies.
    */

   public class SimpleServer {

      private string serviceName;
      private GSSName name;
      private GSSCredential cred;

      private GSSManager mgr;

      ...
      ...

      /**
       * Wait for client connections, establish security contexts and
       * provide service.
       */
      private void loop() {

         ...
         ...

         mgr = GSSManager.getInstance();

         name = mgr.createName(serviceName,
                               GSSNameTypes.NT_HOSTBASED_SERVICE);

         cred = mgr.createCredential(name,
                                     GSSConstants.INDEFINITE_LIFETIME,
                                     null,
                                     GSSCredentialUsage.ACCEPT_ONLY);






Luciani                 Expires January 1 2005                 [Page 89]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


         // Loop infinitely
         while (true) {

            Socket s = serverSock.accept();

            // Start a new thread to serve this connection
            Thread serverThread = new ServerThread(s);
            serverThread.start();

         }
      }

      /**
       * Inner class ServerThread whose run() method provides the
       * secure service to a connection.
       */

      private class ServerThread extends Thread {

         ...
         ...

         /**
          * Deals with the connection from one client. It also
          * handles all GSSException's thrown while talking to
          * this client.
          */
         public void run() {

            byte[] inToken = null;
            byte[] outToken = null;
            byte[] buffer;

            GSSName peer;

            // Container for multiple input-output arguments to and
            // from the per-message routines (ie. wrap/unwrap).
            MessageProp supplInfo = new MessageProp();

            GSSContext secContext = null;

            try {

               // Now do the context establishment loop

               GSSContext context = mgr.createContext(cred);





Luciani                 Expires January 1 2005                 [Page 90]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


               while (!context.isEstablished) {

                  inToken = readGSSToken();

                  outToken = context.acceptSecContext(inToken,
                                                      0,
                                                      inToken.length);

                  if (outToken != null)
                     writeGSSToken(outToken);

               }

               // SimpleServer wants confidentiality to be
               // available. Check for it.
               if (!context.confidentiality) {
                  ...
                  ...
               }

               GSSName peer = context.srcName;
               Oid mech = context.getMech();
               Console.Writeline("Security context established with " +
                                 peer.ToString() +
                                 " using underlying mechanism " +
                                 mech.ToString());

               // Now read the bytes sent by the client to be
               // processed.
               inToken = readGSSToken();

               // Unwrap the message
               buffer = context.unwrap(inToken,
                                       0,
                                       inToken.length,
                                       supplInfo);

               // All ok if no exception was thrown!













Luciani                 Expires January 1 2005                 [Page 91]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


               // Print other supplementary per-message status
               // information
               Console.Writeline("Message from " +
                                 peer.ToString() +
                                 " arrived.");
               Console.Writeline("Was it encrypted? " +
                                 supplInfo.privacy);
               Console.Writeline("Duplicate Token? " +
                                 supplInfo.isDuplicateToken);
               Console.Writeline("Old Token? "  + supplInfo.isOldToken);
               Console.Writeline("Unsequenced Token? " +
                                 supplInfo.isUnseqToken);
               Console.Writeline("Gap Token? "  + supplInfo.isGapToken);

               /*
                * Now process the bytes and send back an encrypted
                * response.
                */

               buffer = serverProcess(buffer);

               // Encipher it and send it across
               supplInfo.privacy = true; // privacy requested
               supplInfo.QOP = 0; // default QOP
               outToken = context.wrap(buffer,
                                       0,
                                       buffer.length,
                                       supplInfo);
               writeGSSToken(outToken);

            } catch (GSSException e) {

               Console.Writeline("GSS-API Error: " + e.Message);

               // Alternatively, could read the e.majorString
               // and the e.minorString properties.
               
               Console.Writeline("Abandoning security context.");

               ...
               ...
            }

            ...
            ...

         } // end of run method in ServerThread

      } // end of inner class ServerThread


Luciani                 Expires January 1 2005                 [Page 92]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


      ...
      ...

   } // end of class SimpleServer


8. Security Considerations

   The level of security that can be obtained by using GSS-API is
   dependent on the following factors:
   
   - The integrity of the libraries being utilized.
   - The integrity of the systems where the application executes.
   - The GSS-API mechanism utilized.
   - The GSS-API services utilized by the application.
   - The way that the application utilizes GSS-API.
   
   Application as well as system installers need to be aware of
   the factors mentioned above to avoid security vulnerabilities.


9. IANA Considerations

   This document has no actions for IANA.


10. Acknowledgments

   The author would like to thank the following:
   
   Kabat, J. and Upadhyay, M. for writing the Generic Security Service
   API Version 2 : Java Bindings specification [RFC2853] that
   constitutes the basis of this work.
   
   Jeff Altman for his support and suggestions.
   
   Corby Morris for his initial implementation.
   
   Funding for the RFC Editor function is currently provided by the
   Internet Society.











Luciani                 Expires January 1 2005                 [Page 93]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


11. Normative References

   [RFC2743]  Linn, J., "Generic Security Service Application Program
              Interface Version 2, Update 1", RFC 2743, January 2000.
              
   [RFC2853]  Kabat, J. and Upadhyay, M., "Generic Security Service API
              Version 2 : Java Bindings", RFC 2853, June 2000.
	      
   [RFC1509]  Wray, J., "Generic Security Service API : C-bindings",
              RFC 1509, September 1993.


12. Authors' Addresses

   Juan Carlos Luciani
   Novell, Inc.
   1800 South Novell Place
   Provo, Utah  84606
   US

   EMail: jluciani@novell.com


13. Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.





Luciani                 Expires January 1 2005                 [Page 94]

Internet-Draft          GSS-API V2: C# Bindings            November 2005


14. Disclaimer of Validity

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


15. Copyright Statement

   Copyright (C) The Internet Society (2005).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.
 


































Luciani                 Expires January 1 2005                 [Page 95]
--=__Part5D7F6FB8.0__=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten

--=__Part5D7F6FB8.0__=--




From kitten-bounces@lists.ietf.org Thu Nov 17 13:50:36 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcoqC-00024P-P6; Thu, 17 Nov 2005 13:50:36 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcoqB-00023r-C7
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 13:50:35 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id NAA13762
	for <kitten@ietf.org>; Thu, 17 Nov 2005 13:49:58 -0500 (EST)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Ecp7p-0004sz-2o
	for kitten@ietf.org; Thu, 17 Nov 2005 14:08:50 -0500
Received: from centralmail2brm.Central.Sun.COM
	(centralmail2brm.central.sun.com [129.147.62.14])
	by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id jAHIoUD7022022
	for <kitten@ietf.org>; Thu, 17 Nov 2005 11:50:30 -0700 (MST)
Received: from binky.Central.Sun.COM (binky.Central.Sun.COM [129.153.128.104])
	by centralmail2brm.Central.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,
	v2.2) with ESMTP id jAHIoTgt027016
	for <kitten@ietf.org>; Thu, 17 Nov 2005 11:50:30 -0700 (MST)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3) with ESMTP id
	jAHIoTft011165; Thu, 17 Nov 2005 12:50:29 -0600 (CST)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3/Submit) id jAHIoSCn011164; 
	Thu, 17 Nov 2005 12:50:28 -0600 (CST)
Date: Thu, 17 Nov 2005 12:50:28 -0600
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Jeffrey Altman <jaltman@columbia.edu>
Message-ID: <20051117185028.GA7275@binky.Central.Sun.COM>
Mail-Followup-To: Jeffrey Altman <jaltman@columbia.edu>, kitten@ietf.org
References: <20051117001217.GR20237@binky.Central.Sun.COM>
	<20051117014718.GV7275@binky.Central.Sun.COM>
	<437CAC96.6090401@columbia.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <437CAC96.6090401@columbia.edu>
User-Agent: Mutt/1.5.7i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 21c69d3cfc2dd19218717dbe1d974352
Cc: kitten@ietf.org
Subject: Re: Interesting multi-mech/multi-bindings exported sec
	context	token issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

On Thu, Nov 17, 2005 at 11:15:18AM -0500, Jeffrey Altman wrote:
> Nicolas Williams wrote:
> >> Thoughts?
> > 
> > I should add my thoughts on how to solve the problem while I'm at it:
> > 
> >  - RECOMMEND the use of a token header, much like the exported name
> >    token header, for exported security context tokens.
> > 
> >    I say RECOMMEND but would rather REQUIRE.
> > 
> > Nico
> 
> Nico:
> 
> This sounds like another topic for which text should be added to
> GSSAPIv2u1 Clarifications.
> 
> I agree with you that exporting tokens with a header should be
> strongly recommended.   You will need to specify what the header
> format is.

Yes.

> One thing that the Java implementation can do in this case because
> it is binding to a particular implementation is to keep track of
> whether or not a header is being used and strip it off itself
> or add it as needed.

If it knows what the implementation is, yes, if not then it's a
heuristic (does the token begin with what looks like the right header?).
We might be able to improve that by adding a checksum.

> Even assuming that such a change is made for all future gss library
> distributions it will be the case that the existing distributions
> will still exist for a long time to come.

Of course.  In such cases implementors could say "upgrade" or "apply
this patch" (or do what you suggest above).

Thanks.  I'll write up some text.

Nico
-- 

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 15:17:26 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcqCE-0001bu-Ff; Thu, 17 Nov 2005 15:17:26 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcqCC-0001bl-2A
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 15:17:24 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA17209
	for <kitten@ietf.org>; Thu, 17 Nov 2005 15:16:48 -0500 (EST)
Received: from smtpde02.sap-ag.de ([155.56.68.170])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EcqTq-0007GI-7S
	for kitten@ietf.org; Thu, 17 Nov 2005 15:35:42 -0500
Received: from sap-ag.de (smtpde02)
	by smtpde02.sap-ag.de (out) with ESMTP id VAA12455;
	Thu, 17 Nov 2005 21:16:55 +0100 (MEZ)
From: Martin Rex <martin.rex@sap.com>
Message-Id: <200511172016.VAA29742@uw1048.wdf.sap.corp>
To: Nicolas.Williams@sun.com (Nicolas Williams)
Date: Thu, 17 Nov 2005 21:16:54 +0100 (MET)
In-Reply-To: <20051117001217.GR20237@binky.Central.Sun.COM> from "Nicolas
	Williams" at Nov 16, 5 06:12:17 pm
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-SAP: out
X-SAP: out
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 0a7aa2e6e558383d84476dc338324fab
Content-Transfer-Encoding: 8bit
Cc: kitten@ietf.org
Subject: Re: Interesting multi-mech/multi-bindings exported sec context token
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: martin.rex@sap.com
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org


Nicolas Williams wrote:
> 
> Exported security context tokens, unlike exported name tokens, have no
> header identifying a mechanism or anything else.
> 
> Thoughts?

The reasons why exported name tokens have a header identifying the
mechanism was to prevent collisions of ACL entries between two
independent gssapi mechanisms for different users.

Since ACLs on objects can be fairly long-lived, we thought it would
be a very good idea if they were guaranteed to be constant over
time (reliably backwards compatibility for different revisions
of a gssapi mechanism).  Ultimately, a full spec for the format
of the exported name token should become part of a gssapi mechanism
spec (as done in rfc1964) so that ACL entries become independent
from the particular mechanism implementation which created them
and can be used by other, independent implementations of this
mechanism as well.

Exported security context tokens were created with a very limited
scope in mind.  The purpose was to be able to pass security contexts
around between processes (somewhat similar to passing established
network sockets between processes).  Since gssapi security contexts
should have a limited lifetime anyway, and performance of the security
context transfer operations was deemed important, there were
no requirements defined for contents of security context tokens.

Security context tokens in GSS-API v2 are by design extremely non-portable.
They're very likely not transferable among different implementations
of the same gssapi mechanism, likely not transferable across host boundaries
and they may have additional restrictions (like when a context is bound
to a hardware credential, and the access to these credentials is protected,
then it may be that the context can not be used by a process running
under a different user, etc.


Your scenario where you want to transfer a gss-api security
context that you exported in Java over to pure-C code or the other
way round is something that will NOT work in general, and I see
no good reason why it should (no reason to burden mechanism
implementors).

As you noted, you could address this issue in your multi-mech glue
by adding a particular framing/container on context export and strip
that container on context import.  You're free to do that today and
it's fine with the GSS-API spec if some mechanism do this.


*I* completely dislike the idea of defining such a framing/container
at the GSS-API level.  Even at the mechanism level I consider it
a bad idea, because we do *NOT* want to standardize the entire contents
of the security context token, not even at the mechanism level!


-Martin


_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 15:24:07 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcqIh-0002xS-Pb; Thu, 17 Nov 2005 15:24:07 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcqIV-0002tx-FG
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 15:23:55 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA17942
	for <kitten@ietf.org>; Thu, 17 Nov 2005 15:23:20 -0500 (EST)
Received: from host50.foretec.com ([65.246.255.50] helo=mx2.foretec.com)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EcqZ4-0007Sr-Da
	for kitten@ietf.org; Thu, 17 Nov 2005 15:41:03 -0500
Received: from carter-zimmerman.suchdamage.org ([69.25.196.178]
	helo=carter-zimmerman.mit.edu)
	by mx2.foretec.com with esmtp (Exim 4.24) id 1EcoJQ-0005z8-Nt
	for kitten@ietf.org; Thu, 17 Nov 2005 13:16:44 -0500
Received: by carter-zimmerman.mit.edu (Postfix, from userid 8042)
	id 05BF1E0070; Thu, 17 Nov 2005 13:16:01 -0500 (EST)
To: kitten@ietf.org
References: <20051117001217.GR20237@binky.Central.Sun.COM>
From: Sam Hartman <hartmans@mit.edu>
Date: Thu, 17 Nov 2005 13:16:01 -0500
In-Reply-To: <20051117001217.GR20237@binky.Central.Sun.COM> (Nicolas
	Williams's message of "Wed, 16 Nov 2005 18:12:17 -0600")
Message-ID: <tslsltvrvha.fsf@cz.mit.edu>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 8ac499381112328dd60aea5b1ff596ea
Cc: 
Subject: Re: Interesting multi-mech/multi-bindings exported sec context
 token issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

I think you're even more fundamentally challenged because there's no
reason to believe two different implementations of the mechanism will
have compatible export tokens.

Seems like at the same point you add support for reading another
implementation's token you could add support for the java wrapper.

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 15:24:10 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcqIk-0002yq-1B; Thu, 17 Nov 2005 15:24:10 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcqIW-0002u4-0a
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 15:23:56 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA17948
	for <kitten@ietf.org>; Thu, 17 Nov 2005 15:23:20 -0500 (EST)
Received: from host50.foretec.com ([65.246.255.50] helo=mx2.foretec.com)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EcqZ5-0007Sr-Rp
	for kitten@ietf.org; Thu, 17 Nov 2005 15:41:05 -0500
Received: from carter-zimmerman.suchdamage.org ([69.25.196.178]
	helo=carter-zimmerman.mit.edu)
	by mx2.foretec.com with esmtp (Exim 4.24) id 1EcoKc-000697-HB
	for kitten@ietf.org; Thu, 17 Nov 2005 13:17:58 -0500
Received: by carter-zimmerman.mit.edu (Postfix, from userid 8042)
	id 92440E0070; Thu, 17 Nov 2005 13:17:19 -0500 (EST)
To: Jeffrey Altman <jaltman@columbia.edu>
References: <20051117001217.GR20237@binky.Central.Sun.COM>
	<20051117014718.GV7275@binky.Central.Sun.COM>
	<437CAC96.6090401@columbia.edu>
From: Sam Hartman <hartmans@mit.edu>
Date: Thu, 17 Nov 2005 13:17:19 -0500
In-Reply-To: <437CAC96.6090401@columbia.edu> (Jeffrey Altman's message of
	"Thu, 17 Nov 2005 11:15:18 -0500")
Message-ID: <tsloe4jrvf4.fsf@cz.mit.edu>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 9182cfff02fae4f1b6e9349e01d62f32
Cc: kitten@ietf.org
Subject: Re: Interesting multi-mech/multi-bindings exported sec context
	token issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

>>>>> "Jeffrey" == Jeffrey Altman <jaltman@columbia.edu> writes:

    Jeffrey> Nicolas Williams wrote:
    >>> Thoughts?
    >>  I should add my thoughts on how to solve the problem while I'm
    >> at it:
    >> 
    >> - RECOMMEND the use of a token header, much like the exported
    >> name token header, for exported security context tokens.
    >> 
    >> I say RECOMMEND but would rather REQUIRE.
    >> 
    >> Nico

    Jeffrey> Nico:

    Jeffrey> This sounds like another topic for which text should be
    Jeffrey> added to GSSAPIv2u1 Clarifications.

I totally don't see the point.  The header would need to describe the
mechanism implementation, not just the mechanism.  We don't have a
good way to do that.


--Sam

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 15:24:30 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcqJ4-00033b-OR; Thu, 17 Nov 2005 15:24:30 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcqJ2-00032d-Jt
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 15:24:28 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA18040
	for <kitten@ietf.org>; Thu, 17 Nov 2005 15:23:53 -0500 (EST)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Ecqaj-0007dY-UC
	for kitten@ietf.org; Thu, 17 Nov 2005 15:42:46 -0500
Received: from centralmail1brm.Central.Sun.COM
	(centralmail1brm.central.sun.com [129.147.62.1])
	by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id jAHKOQD7016584
	for <kitten@ietf.org>; Thu, 17 Nov 2005 13:24:26 -0700 (MST)
Received: from binky.Central.Sun.COM (binky.Central.Sun.COM [129.153.128.104])
	by centralmail1brm.Central.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,
	v2.2) with ESMTP id jAHKOP5I009123
	for <kitten@ietf.org>; Thu, 17 Nov 2005 13:24:26 -0700 (MST)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3) with ESMTP id
	jAHKOPkP011211; Thu, 17 Nov 2005 14:24:25 -0600 (CST)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3/Submit) id jAHKOP5w011210; 
	Thu, 17 Nov 2005 14:24:25 -0600 (CST)
Date: Thu, 17 Nov 2005 14:24:25 -0600
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Martin Rex <martin.rex@sap.com>
Message-ID: <20051117202425.GE7275@binky.Central.Sun.COM>
Mail-Followup-To: Martin Rex <martin.rex@sap.com>, kitten@ietf.org
References: <20051117001217.GR20237@binky.Central.Sun.COM>
	<200511172016.VAA29742@uw1048.wdf.sap.corp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200511172016.VAA29742@uw1048.wdf.sap.corp>
User-Agent: Mutt/1.5.7i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: d0bdc596f8dd1c226c458f0b4df27a88
Cc: kitten@ietf.org
Subject: Re: Interesting multi-mech/multi-bindings exported sec context token
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

On Thu, Nov 17, 2005 at 09:16:54PM +0100, Martin Rex wrote:
> Nicolas Williams wrote:
> > 
> > Exported security context tokens, unlike exported name tokens, have no
> > header identifying a mechanism or anything else.
> > 
> > Thoughts?
> 
> The reasons why exported name tokens have a header identifying the
> mechanism was to prevent collisions of ACL entries between two
> independent gssapi mechanisms for different users.
> [...]

No question.

> Exported security context tokens were created with a very limited
> scope in mind.  The purpose was to be able to pass security contexts
> around between processes (somewhat similar to passing established
> network sockets between processes).  Since gssapi security contexts
> should have a limited lifetime anyway, and performance of the security
> context transfer operations was deemed important, there were
> no requirements defined for contents of security context tokens.
> 
> Security context tokens in GSS-API v2 are by design extremely non-portable.

I think there may be a false assumption here.  More on that later.

> They're very likely not transferable among different implementations
> of the same gssapi mechanism, likely not transferable across host boundaries
> and they may have additional restrictions (like when a context is bound
> to a hardware credential, and the access to these credentials is protected,
> then it may be that the context can not be used by a process running
> under a different user, etc.
> 
> 
> Your scenario where you want to transfer a gss-api security
> context that you exported in Java over to pure-C code or the other
> way round is something that will NOT work in general, and I see
> no good reason why it should (no reason to burden mechanism
> implementors).

Not quite.

The scenario is that an exported security context token made by a given
implementation cannot be re-imported by that SAME implementation WHEN in
one case that implementation is wrapped by a multi-mechanism library and
in the other case it is not.

I do see good reason why this should work.

> As you noted, you could address this issue in your multi-mech glue
> by adding a particular framing/container on context export and strip
> that container on context import.  You're free to do that today and
> it's fine with the GSS-API spec if some mechanism do this.

See above.

> *I* completely dislike the idea of defining such a framing/container
> at the GSS-API level.  Even at the mechanism level I consider it
> a bad idea, because we do *NOT* want to standardize the entire contents
> of the security context token, not even at the mechanism level!

We're talking about new mechanisms that may share the existing Kerberos
V mechanism's [RFC4121] per-message tokens.  Such mechanisms will have
much the same exported security context state, with differences
appearing only as a result of extensions relating to naming.  I see no
reason why we should not be able to have a standard exported security
context HEADER, plus SOME standard exported security context CONTENTS
for mechanisms that share a specification for per-message tokens.

Nico
-- 

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 15:32:11 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcqQV-0004i6-Fp; Thu, 17 Nov 2005 15:32:11 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcqQT-0004i1-Hb
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 15:32:09 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA18683
	for <kitten@ietf.org>; Thu, 17 Nov 2005 15:31:34 -0500 (EST)
Received: from brmea-mail-3.sun.com ([192.18.98.34])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EcqiA-0007wi-4S
	for kitten@ietf.org; Thu, 17 Nov 2005 15:50:27 -0500
Received: from centralmail1brm.Central.Sun.COM
	(centralmail1brm.central.sun.com [129.147.62.1])
	by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id jAHKW63F026989
	for <kitten@ietf.org>; Thu, 17 Nov 2005 13:32:06 -0700 (MST)
Received: from binky.Central.Sun.COM (binky.Central.Sun.COM [129.153.128.104])
	by centralmail1brm.Central.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,
	v2.2) with ESMTP id jAHKW55K013297
	for <kitten@ietf.org>; Thu, 17 Nov 2005 13:32:06 -0700 (MST)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3) with ESMTP id
	jAHKW5L3011220; Thu, 17 Nov 2005 14:32:05 -0600 (CST)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3/Submit) id jAHKW4Ts011219; 
	Thu, 17 Nov 2005 14:32:04 -0600 (CST)
Date: Thu, 17 Nov 2005 14:32:04 -0600
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Sam Hartman <hartmans@mit.edu>
Message-ID: <20051117203204.GF7275@binky.Central.Sun.COM>
Mail-Followup-To: Sam Hartman <hartmans@mit.edu>,
	Jeffrey Altman <jaltman@columbia.edu>, kitten@ietf.org
References: <20051117001217.GR20237@binky.Central.Sun.COM>
	<20051117014718.GV7275@binky.Central.Sun.COM>
	<437CAC96.6090401@columbia.edu> <tsloe4jrvf4.fsf@cz.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <tsloe4jrvf4.fsf@cz.mit.edu>
User-Agent: Mutt/1.5.7i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 9466e0365fc95844abaf7c3f15a05c7d
Cc: kitten@ietf.org
Subject: Re: Interesting multi-mech/multi-bindings exported sec
	context	token issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

On Thu, Nov 17, 2005 at 01:17:19PM -0500, Sam Hartman wrote:
> >>>>> "Jeffrey" == Jeffrey Altman <jaltman@columbia.edu> writes:
> 
>     Jeffrey> Nicolas Williams wrote:
>     >>> Thoughts?
>     >>  I should add my thoughts on how to solve the problem while I'm
>     >> at it:
>     >> 
>     >> - RECOMMEND the use of a token header, much like the exported
>     >> name token header, for exported security context tokens.
>     >> 
>     >> I say RECOMMEND but would rather REQUIRE.
>     >> 
>     >> Nico
> 
>     Jeffrey> Nico:
> 
>     Jeffrey> This sounds like another topic for which text should be
>     Jeffrey> added to GSSAPIv2u1 Clarifications.
> 
> I totally don't see the point.  The header would need to describe the
> mechanism implementation, not just the mechanism.  We don't have a
> good way to do that.

For the problem at hand it suffices to describe only the mechanism OID.

This is because the same implementation is being used in two cases, but
in one case wrapped in a multi-mechanism framework and in the other not
(or with a different multi-mechanism framework).

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 15:46:00 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1Ecqds-0004VB-QK; Thu, 17 Nov 2005 15:46:00 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1Ecqdr-0004Uw-Bm
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 15:45:59 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA19629
	for <kitten@ietf.org>; Thu, 17 Nov 2005 15:45:23 -0500 (EST)
Received: from carter-zimmerman.suchdamage.org ([69.25.196.178]
	helo=carter-zimmerman.mit.edu)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EcqvY-00007v-4A
	for kitten@ietf.org; Thu, 17 Nov 2005 16:04:17 -0500
Received: by carter-zimmerman.mit.edu (Postfix, from userid 8042)
	id 82EFFE0070; Thu, 17 Nov 2005 15:45:48 -0500 (EST)
To: Jeffrey Altman <jaltman@columbia.edu>
References: <20051117001217.GR20237@binky.Central.Sun.COM>
	<20051117014718.GV7275@binky.Central.Sun.COM>
	<437CAC96.6090401@columbia.edu> <tsloe4jrvf4.fsf@cz.mit.edu>
	<20051117203204.GF7275@binky.Central.Sun.COM>
From: Sam Hartman <hartmans@mit.edu>
Date: Thu, 17 Nov 2005 15:45:48 -0500
In-Reply-To: <20051117203204.GF7275@binky.Central.Sun.COM> (Nicolas
	Williams's message of "Thu, 17 Nov 2005 14:32:04 -0600")
Message-ID: <tslhdabq9z7.fsf@cz.mit.edu>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: 0.0 (/)
X-Scan-Signature: cf4fa59384e76e63313391b70cd0dd25
Cc: kitten@ietf.org
Subject: Re: Interesting multi-mech/multi-bindings exported sec context
	token issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

>>>>> "Nicolas" == Nicolas Williams <Nicolas.Williams@sun.com> writes:

    Nicolas> For the problem at hand it suffices to describe only the
    Nicolas> mechanism OID.

    Nicolas> This is because the same implementation is being used in
    Nicolas> two cases, but in one case wrapped in a multi-mechanism
    Nicolas> framework and in the other not (or with a different
    Nicolas> multi-mechanism framework).

It seems like it is best to handle as a local matter at least until we
standardize export tokens for mechanisms.

Adding advice that within a platform people should figure out how to
handle this issue also seems fine.


_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Thu Nov 17 15:52:50 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EcqkU-0007mE-4q; Thu, 17 Nov 2005 15:52:50 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EcqkS-0007lj-UK
	for kitten@megatron.ietf.org; Thu, 17 Nov 2005 15:52:49 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA20066
	for <kitten@ietf.org>; Thu, 17 Nov 2005 15:52:13 -0500 (EST)
Received: from nwkea-mail-2.sun.com ([192.18.42.14])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Ecr27-0000NC-K8
	for kitten@ietf.org; Thu, 17 Nov 2005 16:11:07 -0500
Received: from centralmail1brm.Central.Sun.COM ([129.147.62.1])
	by nwkea-mail-2.sun.com (8.12.10/8.12.9) with ESMTP id jAHKqh4u026085
	for <kitten@ietf.org>; Thu, 17 Nov 2005 12:52:43 -0800 (PST)
Received: from binky.Central.Sun.COM (binky.Central.Sun.COM [129.153.128.104])
	by centralmail1brm.Central.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,
	v2.2) with ESMTP id jAHKqg5K022746
	for <kitten@ietf.org>; Thu, 17 Nov 2005 13:52:43 -0700 (MST)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3) with ESMTP id
	jAHKqgeq011233; Thu, 17 Nov 2005 14:52:42 -0600 (CST)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.13.3+Sun/8.13.3/Submit) id jAHKqgtY011232; 
	Thu, 17 Nov 2005 14:52:42 -0600 (CST)
Date: Thu, 17 Nov 2005 14:52:42 -0600
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Sam Hartman <hartmans@mit.edu>
Message-ID: <20051117205242.GG7275@binky.Central.Sun.COM>
Mail-Followup-To: Sam Hartman <hartmans@mit.edu>,
	Jeffrey Altman <jaltman@columbia.edu>, kitten@ietf.org
References: <20051117001217.GR20237@binky.Central.Sun.COM>
	<20051117014718.GV7275@binky.Central.Sun.COM>
	<437CAC96.6090401@columbia.edu> <tsloe4jrvf4.fsf@cz.mit.edu>
	<20051117203204.GF7275@binky.Central.Sun.COM>
	<tslhdabq9z7.fsf@cz.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <tslhdabq9z7.fsf@cz.mit.edu>
User-Agent: Mutt/1.5.7i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 7d33c50f3756db14428398e2bdedd581
Cc: kitten@ietf.org
Subject: Re: Interesting multi-mech/multi-bindings exported sec
	context	token issue
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

On Thu, Nov 17, 2005 at 03:45:48PM -0500, Sam Hartman wrote:
> >>>>> "Nicolas" == Nicolas Williams <Nicolas.Williams@sun.com> writes:
> 
>     Nicolas> For the problem at hand it suffices to describe only the
>     Nicolas> mechanism OID.
> 
>     Nicolas> This is because the same implementation is being used in
>     Nicolas> two cases, but in one case wrapped in a multi-mechanism
>     Nicolas> framework and in the other not (or with a different
>     Nicolas> multi-mechanism framework).
> 
> It seems like it is best to handle as a local matter at least until we
> standardize export tokens for mechanisms.
> 
> Adding advice that within a platform people should figure out how to
> handle this issue also seems fine.

That is the minimum.  I'd add that I would recommend doing that.

Nico
-- 

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Mon Nov 21 18:50:04 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EeLQC-0002kz-Bs; Mon, 21 Nov 2005 18:50:04 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EeLQA-0002k4-HT
	for kitten@megatron.ietf.org; Mon, 21 Nov 2005 18:50:02 -0500
Received: from newodin.ietf.org (newodin.ietf.org [10.27.6.50])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id SAA28992
	for <kitten@lists.ietf.org>; Mon, 21 Nov 2005 18:49:24 -0500 (EST)
Received: from mlee by newodin.ietf.org with local (Exim 4.43)
	id 1EeLQ9-00086q-SV; Mon, 21 Nov 2005 18:50:01 -0500
Content-Type: Multipart/Mixed; Boundary="NextPart"
Mime-Version: 1.0
To: i-d-announce@ietf.org
From: Internet-Drafts@ietf.org
Message-Id: <E1EeLQ9-00086q-SV@newodin.ietf.org>
Date: Mon, 21 Nov 2005 18:50:01 -0500
Cc: kitten@ietf.org
Subject: I-D ACTION:draft-ietf-kitten-gssapi-csharp-bindings-00.txt 
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

--NextPart

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the Kitten (GSS-API Next Generation) Working Group of the IETF.

	Title		: GSS_API V2: C# Bindings
	Author(s)	: J. Luciani
	Filename	: draft-ietf-kitten-gssapi-csharp-bindings-00.txt
	Pages		: 95
	Date		: 2005-11-21
	
   The Generic Security Services Application Program Interface (GSS-API)
   offers application programmers uniform access to security services
   atop a variety of underlying cryptographic mechanisms.  This document
   specifies the C# language bindings for GSS-API which is described at
   a language independent conceptual level in RFC 2743 [RFC2743].

   The GSS-API C# bindings were designed to emulate the Java bindings as
   defined in RFC 2853 [RFC2853].

A URL for this Internet-Draft is:
http://www.ietf.org/internet-drafts/draft-ietf-kitten-gssapi-csharp-bindings-00.txt

To remove yourself from the I-D Announcement list, send a message to 
i-d-announce-request@ietf.org with the word unsubscribe in the body of the message.  
You can also visit https://www1.ietf.org/mailman/listinfo/I-D-announce 
to change your subscription settings.


Internet-Drafts are also available by anonymous FTP. Login with the username
"anonymous" and a password of your e-mail address. After logging in,
type "cd internet-drafts" and then
	"get draft-ietf-kitten-gssapi-csharp-bindings-00.txt".

A list of Internet-Drafts directories can be found in
http://www.ietf.org/shadow.html 
or ftp://ftp.ietf.org/ietf/1shadow-sites.txt


Internet-Drafts can also be obtained by e-mail.

Send a message to:
	mailserv@ietf.org.
In the body type:
	"FILE /internet-drafts/draft-ietf-kitten-gssapi-csharp-bindings-00.txt".
	
NOTE:	The mail server at ietf.org can return the document in
	MIME-encoded form by using the "mpack" utility.  To use this
	feature, insert the command "ENCODING mime" before the "FILE"
	command.  To decode the response(s), you will need "munpack" or
	a MIME-compliant mail reader.  Different MIME-compliant mail readers
	exhibit different behavior, especially when dealing with
	"multipart" MIME messages (i.e. documents which have been split
	up into multiple messages), so check your local documentation on
	how to manipulate these messages.
		
		
Below is the data which will enable a MIME compliant mail reader
implementation to automatically retrieve the ASCII version of the
Internet-Draft.

--NextPart
Content-Type: Multipart/Alternative; Boundary="OtherAccess"

--OtherAccess
Content-Type: Message/External-body; access-type="mail-server";
	server="mailserv@ietf.org"

Content-Type: text/plain
Content-ID: <2005-11-21154719.I-D@ietf.org>

ENCODING mime
FILE /internet-drafts/draft-ietf-kitten-gssapi-csharp-bindings-00.txt

--OtherAccess
Content-Type: Message/External-body;
	name="draft-ietf-kitten-gssapi-csharp-bindings-00.txt";
	site="ftp.ietf.org"; access-type="anon-ftp";
	directory="internet-drafts"

Content-Type: text/plain
Content-ID: <2005-11-21154719.I-D@ietf.org>


--OtherAccess--

--NextPart
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten

--NextPart--





From kitten-bounces@lists.ietf.org Tue Nov 22 15:39:24 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EeevE-0004j2-5M; Tue, 22 Nov 2005 15:39:24 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EeevB-0004gs-Hi
	for kitten@megatron.ietf.org; Tue, 22 Nov 2005 15:39:23 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA08332
	for <kitten@ietf.org>; Tue, 22 Nov 2005 15:38:41 -0500 (EST)
Received: from smtpde02.sap-ag.de ([155.56.68.170])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EefDt-0002je-Ol
	for kitten@ietf.org; Tue, 22 Nov 2005 15:58:42 -0500
Received: from sap-ag.de (smtpde02)
	by smtpde02.sap-ag.de (out) with ESMTP id VAA19932;
	Tue, 22 Nov 2005 21:38:52 +0100 (MEZ)
From: Martin Rex <martin.rex@sap.com>
Message-Id: <200511222038.VAA10945@uw1048.wdf.sap.corp>
To: jaltman@columbia.edu (Jeffrey Altman)
Date: Tue, 22 Nov 2005 21:38:49 +0100 (MET)
In-Reply-To: <4370ED21.7090404@columbia.edu> from "Jeffrey Altman" at Nov 8,
	5 10:23:29 am
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-SAP: out
X-SAP: out
X-Spam-Score: 2.0 (++)
X-Scan-Signature: e16ce0269ccb2f59707d16700199d13b
Content-Transfer-Encoding: 8bit
Cc: kitten@ietf.org
Subject: Re: Work Group Last Call:  Desired Enhancements to GSSAPI Naming
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: martin.rex@sap.com
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org


Jeffrey Altman wrote:
> 
> I am happy to announce the start of a two week working group last call
> for the Kitten work item "Desired Enhancements to GSSAPI Naming".
> http://www.ietf.org/internet-drafts/draft-ietf-kitten-gss-naming-03.txt

Sorry for not having read and commented on this draft earlier.


I have a different perception about gssapi naming issues
than what is described in this document.  You expected that, didn't you  :)



General comments:

First of all, I'd like the issue of authorization (which includes
group memberships, attributes, etc.) to remain entirely seperate from
authentication in GSS-API.  

Where authorization is desired (be it in a pseudo-generic fashion
or as proprietary as gssapi mechanism implement it today), it should
be done through an entirely seperate set of API calls and not
be hacked into the existing naming API.

Any kind of hacking up / overloading the naming API is likely to break
existing applications.  In order to make use of new extensions/concepts,
the application will have to be changed anyway -- so we better use
a seperate and clean API calls for that purpose instead of making
contortions to the existing API.  With seperate API calls, it
will be much easier for the application to distinguish whether
and which additional attributes, group memberships, etc. are
available, the application will not have to frob existing API calls
in new ways and try to make sense of the results.


Comments on specific sections:

Section 2. Kerberos Naming 

The existing scheme of binary canonical names for ACLs is perfect.
No gssapi (v2) mechanism should ever be allowed to fail gss_export_name()
for a mechanism name (MN).

Implementing an Enterprise Name could be done in a straightforward
and fully GSS-API v2 compliant fashion!

Remember that ACLs may be large (could be more than a million entries;
we have around 40000 entries on some of our systems and we already have
customers with 200000 entries), so an ACL lookup that would not only
require a linear search, but also costly transformations on each entry
would be prohibitively expensive.

I consider an Enterprise Name an extension of the Kerberos protocol,
so the necessary provisions to make it work transparently for
GSS-API v2 apps is with the Kerberos GSS-API mechanism.

If Enterprise Names are implemented in a way that they entirely replace
the original Kerberos principal names at the GSS-API level, then
the existing model would work just fine.  In the representation of
the exported names, they should receive a different OID in the generic
framing than traditional Kerberos principal names, but I don't see
a problem with that (there, the wording of GSS-API v2 would only need
a slight adjustment, but no actual change).   Of course, Kerberos must
be able to distinguish Enterprise Names them from traditional Kerberos
Principal names for the purpose of ACL maintenance (printable to exported
binary conversion), but that should be fine.  *I* wouldn't mind if
that meant a new nametype -- this is why the nametypes parameter
exists in gss_import_name().

At the Kerberos protocol level, the Enterprise name should become
part of the ticket -- it could accompany or replace the existing
Kerberos principal name (that's up to the Kerberos protocol wranglers
to decide), potentially with an indicator supplied by the KDC which
name is to be the default if both names are included in the ticket,
and then an (updated) Kerberos GSS-API mechanism would export
the enterprise name through gss_export_name() instead of the Kerberos
principal name.


There really is no need to make things any more complicated
at the GSS-API level and for GSS-API portable applications.


While you're at it: It might be a good idea to make those enterprise
names case-insensitive and force them all lowercase on output --
several bugs in Microsoft's software (API,UI,wire protocol) are a royal PITA
in combination with the case-sensitivity of the Kerberos principal
names in the standardized Kerberos protocol (which can not be avoided
in heterogeneous environments with non-Microsoft Kerberos implementations).


Section 3. X.509 Names

There are plenty of reasons why particular certificates may not be
usable with a particular SPKM-like gssapi mechanism, not just
"it has an empty DName".  Many CAs issue certificates with strict
limits on their usability in order to defend their business model...

The decision which subjectAltName extension should be used might
be difficult to decide.
  * should there be a seperate subjectAltName extension for every application?
    - this would require a registry for apps to preven collisions/ambiguity
    - this would grow the size of certificates with every new app
    - it would require a new or different certificate for every new app
or should there rather be a list of subjectAltNames and each application
should search for best fit (or leave the mechanism default if the app
doesn't recognize any)?

It also depends of the capabilities or willingness of the CA to issue
specially tailored certs.  I assume that sysadmins/customers today
would like to start with subjectAltNames encoded into a RDN component
today (because that is what their current CA software would allow them
to do), and eventually switch to using a real subjectAltName extension
whenever the software supports that switch (preferable: a migration).
That will, of course, require the necessary hooks (hacks) in the
gssapi mechanism implementation. :)


One possibility would be to add one new gssapi call
  gss_set_nametypes_preference(gss_OID mech, gss_OID_set nametypes )
where the application can tell the gssapi mechanism which nametype(s)
should be used when gss_display_name() is called and when gss_export_name()
is called.  The gssapi mechanism needs to be configurable by the
sysadmin for the list of attributes that are going to be present
in certificates (and a fallback identifier or fallback preference
list if the attribute is not present).  From that admin-configured
list, the gssapi mechanism will should use those nametype(s) which
it implements for the output of gss_display_name()
and gss_export_name(), and show that to the application when it calls
gss_inquire_names_for_mech().

The application should be permitted to "blindly" provide a preference
list through its preference call (above) and have the mechanism ignore
unrecognized nametypes (resulting in default behaviour if either
no nametype is recognized or the parameter did not contain a nametype).

With a call like gss_set_nametype_preferences(), we could additionally
solve the character set issue that currently exists in GSS-API v2:
by defining a Pseudo-nametype OID "GSS_C_NT_USE_UTF8_PRINTABLES"
we could provide a mechanism-independent forward migration path
for the encoding of the printable output of gss_display_name().
If the supplied mech_oid is GSS_C_NULL_OID, then the preference
list should equally apply to all mechanisms of a multi-mechanism.

(I admit that support for GSS_C_NULL_OID might difficult for a
 layered multi-mechanism where some mechs support the optional
 gss_set_nametype_preferences() and some don't)


No matter what we define or implement, the sysadmins will have to
change all of their ACLs at least one more time if they want to
make any use of those features.

And one should also not forget that quite a number of sysadmins
and managers see it as a feature that they effectively revoke
access rights by issuing new credentials to a user that moves
to a different department or (sub)division within a company,
and I can see as many advantages as there are inconveniences.

If the ACLs do *NOT* distinguish between "access granted based
on identity" and "access granted based on role/authority/membership"
then it will be impossible to come up with a silver bullet to the
user rename/relocate within organization problem.


But no matter that whatever we define today, I'm convinced that
we can not protect sysadmins and end users from going through
ACLs troubles because of new credentials tomorrow.  There
will be continuous invention of new naming scheme and
authorization models, just as there have been in the past.



4. Composite Name , Name Attibutes

There is an extremely high lock-in potential in authorization information
besides the authentication itself, no matter whether one looks at
X.509v3 certificate extensions, contents of a Microsoft PAC or a
DCE privilege certificate or something along those lines.

Once you start depending on those attributes in your application,
you may no longer be able to support gssapi mechanisms or
authentication schemes that do not provide this information.
This SIGNIFICANTLY reduces the portability of the application.

The other significant issue with this is that all existing schemes
do not scale well, and the way they work this isn't going to change.
There is a fairly low limit on the number of group memberships on
Microsoft Windows, and in the current architecture, the attributes
always travel the wire during authentication.  This creates a bandwidth
issue and it also means that fine-grained authorization (with 1000+
capabilities/authorizations) may be entirely impossible with
certain applications.


A lot of security architectures assume that everything can be
mapped to a filesystem with ACLs on files.  Once you learn how
business process work, you have to realize that this perception
is extremely flawed, and Posix-style ACLs are a dead-end road
for some types of applications.


It's fine if GSS-API is used for access control to, what essentially are
"network file services" -- be it a NFS-, CIFS-, FTP- or simple HTTP-server.
But there are other services that need GSS-API services and which do
not fit the "one size fits all" everything-is-a-file access control model.


And even the "file server" model is several magnitudes more difficult with
Microsoft's Access control model than with the traditional Unix access
control based on User/Group/Other permissions.

In the Unix world it has been fairly simply to apply appropriate access
control to files, and a lot of software has been applying access control
on Unix.  On Microsoft Windows, however, access control has been notoriously
difficult and it took Microsoft 10 years to learn how to implement it
(one of the reasons for the many backwards incompatible NTFS revs)
and how to use it.  Trying to apply an ACL for private use to a file
in software where a single binary runs on all Win32 plattforms
(nt3.5+,win95+), and correctly dealing with network shares that are
connected with non-default credentials is neither easy nor straightforward...


The use of GSS-API based authorization information is something that
can only be used by entirely new designed applications once the necessary
apis and gssapi mechanisms and authorization infrastructure&configuration
is available -- very few, if any, legacy application will use it (and I
do mean "legacy application" here, not simple network file services).

If you look at the GSS-API spec, it was invented with legacy applications
in mind, which is why it has a clear focus on authentication and
proctection of the communication, and doesn't touch the details
of authorization (in the base spec).


4.3 Handling of gss_export_name

An authentication mechanism for which gss_export_name can not meaningfully
be defined is so seriously broken that it should not be
considered a GSS-API mechanism, i.e. if a mechanism can not be used
by a portable gssapi-based application that requires name-based
authentication, then this mechanism is not generic enough to deserve
the term "Genenric Security Service".

There's no problem if a mechanism provides additional features (which
portable apps do not care about), but there is a real problem if
there is less than the base GSS-API v2 spec.



7. Selection of Source Identity

This interpretation in the document is somewhat too strict:

   Currently GSS-API credentials represent a single mechanism name. that
   is, by the time credentials are acquired, a particular single
   identity must be chosen for each mechanism in the credential.  All
   these identities must correspond to a single mechanism independent
   name.

Traditionally, GSS-API initiators are recommended not to worry about
the name tags on their credentials.  Instead, they were suggested
to call gss_init_sec_context() with GSS_C_NO_CREDENTIAL, which
would cause the mechanism to select the default credential
(or maybe the most appropriate credential for the given target).
If you check rfc1508, gssapi v1 mechanisms were allowed to entirely fail
gss_acquire_cred() for initiator or both credentials, or to fail it for
anything other than a NULL name (called GSS_C_NO_NAME in v2).

If the initiator passes GSS_C_NO_NAME into gss_acquire_cred()
along with a set of OIDs, the mechanism is permitted to delay
the selection of an actual credential until this handle is passed
into gss_init_sec_context(), (or when it is passed to
gss_inquire_cred() or gss_inquire_cred_by_mech() with an output
handle for the name or when the credentials have individual lifetimes.)
Only those characteristics of GSS-API objects (contexts,credentials)
that are revealed to the application caller must be nailed down once
they're revealed, unrevealed characteristics may delay their resolution
until a GSS-API call needs them to take a particular fixed value.
A call to gss_init_sec_context() and gss_accept_sec_context()
which returns GSS_S_COMPLETE will have to nail down the particular
name in an explicitly supplied credential for the suceeding mechanism,
as does gss_inquire_cred_by_mech() or gss_inquire_cred() for the default
mechanism. 

Delaying the local selection of a credential/identity based on the target
name passed into gss_init_sec_context() is therefore *NOT* generally
precluded in the existing GSS-API v2.

For a mechanism where identity and privileges are not cleanly
seperated, it might be useful to delay the selection of the
a specific default credential until gss_init_sec_context() is called,
wherever/whenever possible.


The preferable solution would be that gssapi mechanisms cleanly
seperate identities from privileges/authorization information,
so that the identity selection can happen during gss_acquire_cred()
and the creation of tailored/target-specific privilege attributes is
performed during gss_init_sec_context() in a seperate step, when
the communication peer is specified.

Addition of a new API call like gss_acquire_cred_for_target()
might be easier to deal with by a gssapi mechanism, but
it would be preferable if the necessary magic happens already
within the existing GSS-API v2 calls because that is what
the existing GSS-API-based apps are calling.



-Martin

_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



From kitten-bounces@lists.ietf.org Mon Nov 28 15:23:21 2005
Received: from localhost.cnri.reston.va.us ([127.0.0.1] helo=megatron.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32)
	id 1EgpWy-0007u8-WE; Mon, 28 Nov 2005 15:23:21 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.32) id 1EgpWx-0007s8-Sf
	for kitten@megatron.ietf.org; Mon, 28 Nov 2005 15:23:19 -0500
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1])
	by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA00322
	for <kitten@ietf.org>; Mon, 28 Nov 2005 15:22:35 -0500 (EST)
Received: from carter-zimmerman.dyn.mit.edu ([18.188.3.148]
	helo=carter-zimmerman.mit.edu)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1Egpqr-0005Mu-5K
	for kitten@ietf.org; Mon, 28 Nov 2005 15:43:56 -0500
Received: by carter-zimmerman.mit.edu (Postfix, from userid 8042)
	id 885AEE0073; Mon, 28 Nov 2005 15:22:58 -0500 (EST)
To: martin.rex@sap.com
References: <200511222038.VAA10945@uw1048.wdf.sap.corp>
From: Sam Hartman <hartmans-ietf@mit.edu>
Date: Mon, 28 Nov 2005 15:22:58 -0500
In-Reply-To: <200511222038.VAA10945@uw1048.wdf.sap.corp> (Martin Rex's
	message of "Tue, 22 Nov 2005 21:38:49 +0100 (MET)")
Message-ID: <tslr790bjz1.fsf@cz.mit.edu>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 7bac9cb154eb5790ae3b2913587a40de
Cc: kitten@ietf.org
Subject: Re: Work Group Last Call:  Desired Enhancements to GSSAPI Naming
X-BeenThere: kitten@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Common Authentication Technologies - Next Generation
	<kitten.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/kitten>
List-Post: <mailto:kitten@lists.ietf.org>
List-Help: <mailto:kitten-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/kitten>,
	<mailto:kitten-request@lists.ietf.org?subject=subscribe>
Sender: kitten-bounces@lists.ietf.org
Errors-To: kitten-bounces@lists.ietf.org

Martin, thanks for your comments.  This week the IESG has a long
telechat agenda--35 documents.

I have spent about an hour thinking about responses to your comments
and have a general outline of what I want to say.  However it will
take me more time to actually write up a response.  I'm concerned that
I may not find that time before Thursday.

--Sam


_______________________________________________
Kitten mailing list
Kitten@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/kitten



