1# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
2#
3# This software is subject to the provisions of the Zope Public License,
4# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
5# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
6# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
8# FOR A PARTICULAR PURPOSE.
9"""Namespace module, so you don't need PyXML
10"""
11
12ident = "$Id: Namespaces.py 1160 2006-03-17 19:28:11Z boverhof $"
13try:
14    from xml.ns import SOAP, SCHEMA, WSDL, XMLNS, DSIG, ENCRYPTION
15    DSIG.C14N       = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
16
17except:
18    class SOAP:
19        ENV         = "http://schemas.xmlsoap.org/soap/envelope/"
20        ENC         = "http://schemas.xmlsoap.org/soap/encoding/"
21        ACTOR_NEXT  = "http://schemas.xmlsoap.org/soap/actor/next"
22
23    class SCHEMA:
24        XSD1        = "http://www.w3.org/1999/XMLSchema"
25        XSD2        = "http://www.w3.org/2000/10/XMLSchema"
26        XSD3        = "http://www.w3.org/2001/XMLSchema"
27        XSD_LIST    = [ XSD1, XSD2, XSD3 ]
28        XSI1        = "http://www.w3.org/1999/XMLSchema-instance"
29        XSI2        = "http://www.w3.org/2000/10/XMLSchema-instance"
30        XSI3        = "http://www.w3.org/2001/XMLSchema-instance"
31        XSI_LIST    = [ XSI1, XSI2, XSI3 ]
32        BASE        = XSD3
33
34    class WSDL:
35        BASE        = "http://schemas.xmlsoap.org/wsdl/"
36        BIND_HTTP   = "http://schemas.xmlsoap.org/wsdl/http/"
37        BIND_MIME   = "http://schemas.xmlsoap.org/wsdl/mime/"
38        BIND_SOAP   = "http://schemas.xmlsoap.org/wsdl/soap/"
39        BIND_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/"
40
41    class XMLNS:
42        BASE        = "http://www.w3.org/2000/xmlns/"
43        XML         = "http://www.w3.org/XML/1998/namespace"
44        HTML        = "http://www.w3.org/TR/REC-html40"
45
46    class DSIG:
47        BASE         = "http://www.w3.org/2000/09/xmldsig#"
48        C14N         = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
49        C14N_COMM    = "http://www.w3.org/TR/2000/CR-xml-c14n-20010315#WithComments"
50        C14N_EXCL    = "http://www.w3.org/2001/10/xml-exc-c14n#"
51        DIGEST_MD2   = "http://www.w3.org/2000/09/xmldsig#md2"
52        DIGEST_MD5   = "http://www.w3.org/2000/09/xmldsig#md5"
53        DIGEST_SHA1  = "http://www.w3.org/2000/09/xmldsig#sha1"
54        ENC_BASE64   = "http://www.w3.org/2000/09/xmldsig#base64"
55        ENVELOPED    = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
56        HMAC_SHA1    = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"
57        SIG_DSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
58        SIG_RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
59        XPATH        = "http://www.w3.org/TR/1999/REC-xpath-19991116"
60        XSLT         = "http://www.w3.org/TR/1999/REC-xslt-19991116"
61
62    class ENCRYPTION:
63        BASE    = "http://www.w3.org/2001/04/xmlenc#"
64        BLOCK_3DES    = "http://www.w3.org/2001/04/xmlenc#des-cbc"
65        BLOCK_AES128    = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
66        BLOCK_AES192    = "http://www.w3.org/2001/04/xmlenc#aes192-cbc"
67        BLOCK_AES256    = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
68        DIGEST_RIPEMD160    = "http://www.w3.org/2001/04/xmlenc#ripemd160"
69        DIGEST_SHA256    = "http://www.w3.org/2001/04/xmlenc#sha256"
70        DIGEST_SHA512    = "http://www.w3.org/2001/04/xmlenc#sha512"
71        KA_DH    = "http://www.w3.org/2001/04/xmlenc#dh"
72        KT_RSA_1_5    = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"
73        KT_RSA_OAEP    = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
74        STREAM_ARCFOUR    = "http://www.w3.org/2001/04/xmlenc#arcfour"
75        WRAP_3DES    = "http://www.w3.org/2001/04/xmlenc#kw-3des"
76        WRAP_AES128    = "http://www.w3.org/2001/04/xmlenc#kw-aes128"
77        WRAP_AES192    = "http://www.w3.org/2001/04/xmlenc#kw-aes192"
78        WRAP_AES256    = "http://www.w3.org/2001/04/xmlenc#kw-aes256"
79
80
81class WSRF_V1_2:
82    '''OASIS WSRF Specifications Version 1.2
83    '''
84    class LIFETIME:
85        XSD_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
86        XSD_DRAFT4 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceLifetime-1.2-draft-04.xsd"
87
88        WSDL_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
89        WSDL_DRAFT4 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceLifetime-1.2-draft-04.wsdl"
90        LATEST = WSDL_DRAFT4
91        WSDL_LIST = (WSDL_DRAFT1, WSDL_DRAFT4)
92        XSD_LIST = (XSD_DRAFT1, XSD_DRAFT4)
93
94    class PROPERTIES:
95        XSD_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
96        XSD_DRAFT5 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draft-05.xsd"
97
98        WSDL_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
99        WSDL_DRAFT5 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draft-05.wsdl"
100        LATEST = WSDL_DRAFT5
101        WSDL_LIST = (WSDL_DRAFT1, WSDL_DRAFT5)
102        XSD_LIST = (XSD_DRAFT1, XSD_DRAFT5)
103
104    class BASENOTIFICATION:
105        XSD_DRAFT1 = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
106
107        WSDL_DRAFT1 = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
108        LATEST = WSDL_DRAFT1
109        WSDL_LIST = (WSDL_DRAFT1,)
110        XSD_LIST = (XSD_DRAFT1,)
111
112    class BASEFAULTS:
113        XSD_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
114        XSD_DRAFT3 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-BaseFaults-1.2-draft-03.xsd"
115        #LATEST = DRAFT3
116        #WSDL_LIST = (WSDL_DRAFT1, WSDL_DRAFT3)
117        XSD_LIST = (XSD_DRAFT1, XSD_DRAFT3)
118
119WSRF = WSRF_V1_2
120WSRFLIST = (WSRF_V1_2,)
121
122
123class OASIS:
124    '''URLs for Oasis specifications
125    '''
126    WSSE    = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
127    UTILITY = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
128
129    class X509TOKEN:
130        Base64Binary = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
131        STRTransform = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0"
132        PKCS7 = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#PKCS7"
133        X509 = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509"
134        X509PKIPathv1 = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509PKIPathv1"
135        X509v3SubjectKeyIdentifier = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3SubjectKeyIdentifier"
136
137    LIFETIME = WSRF_V1_2.LIFETIME.XSD_DRAFT1
138    PROPERTIES = WSRF_V1_2.PROPERTIES.XSD_DRAFT1
139    BASENOTIFICATION = WSRF_V1_2.BASENOTIFICATION.XSD_DRAFT1
140    BASEFAULTS = WSRF_V1_2.BASEFAULTS.XSD_DRAFT1
141
142
143class WSTRUST:
144    BASE = "http://schemas.xmlsoap.org/ws/2004/04/trust"
145    ISSUE = "http://schemas.xmlsoap.org/ws/2004/04/trust/Issue"
146
147class WSSE:
148    BASE    = "http://schemas.xmlsoap.org/ws/2002/04/secext"
149    TRUST   = WSTRUST.BASE
150
151
152class WSU:
153    BASE    = "http://schemas.xmlsoap.org/ws/2002/04/utility"
154    UTILITY = "http://schemas.xmlsoap.org/ws/2002/07/utility"
155
156
157class WSR:
158    PROPERTIES = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceProperties"
159    LIFETIME   = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceLifetime"
160
161
162class WSA200408:
163    ADDRESS    = "http://schemas.xmlsoap.org/ws/2004/08/addressing"
164    ANONYMOUS  = "%s/role/anonymous" %ADDRESS
165    FAULT      = "%s/fault" %ADDRESS
166
167class WSA200403:
168    ADDRESS    = "http://schemas.xmlsoap.org/ws/2004/03/addressing"
169    ANONYMOUS  = "%s/role/anonymous" %ADDRESS
170    FAULT      = "%s/fault" %ADDRESS
171
172class WSA200303:
173    ADDRESS    = "http://schemas.xmlsoap.org/ws/2003/03/addressing"
174    ANONYMOUS  = "%s/role/anonymous" %ADDRESS
175    FAULT      = None
176
177
178WSA = WSA200408
179WSA_LIST = (WSA200408, WSA200403, WSA200303)
180
181class WSP:
182    POLICY = "http://schemas.xmlsoap.org/ws/2002/12/policy"
183
184class BEA:
185    SECCONV = "http://schemas.xmlsoap.org/ws/2004/04/sc"
186    SCTOKEN = "http://schemas.xmlsoap.org/ws/2004/04/security/sc/sct"
187
188class GLOBUS:
189    SECCONV = "http://wsrf.globus.org/core/2004/07/security/secconv"
190    CORE    = "http://www.globus.org/namespaces/2004/06/core"
191    SIG     = "http://www.globus.org/2002/04/xmlenc#gssapi-sign"
192    TOKEN   = "http://www.globus.org/ws/2004/09/security/sc#GSSAPI_GSI_TOKEN"
193
194ZSI_SCHEMA_URI = 'http://www.zolera.com/schemas/ZSI/'
195