Move auth-client as independent
[aaf/authz.git] / auth / auth-client / src / main / xsd / certman_2_0.xsd
1 <!-- 
2  * ============LICENSE_START====================================================
3  * org.onap.aaf
4  * ===========================================================================
5  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6  * ===========================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END====================================================
19  *
20 -->
21
22 <xs:schema 
23         xmlns:xs="http://www.w3.org/2001/XMLSchema" 
24         xmlns:certman="urn:certman:v2_0"
25         targetNamespace="urn:certman:v2_0" 
26         elementFormDefault="qualified">
27         
28         
29         <!-- Jonathan 4/21/2016 New for Certificate Info  -->
30         <xs:element name="certInfo">
31                 <xs:complexType>
32                         <xs:sequence>
33                                 <!-- Base64 Encoded Private Key -->
34                                 <xs:element name="privatekey" type="xs:string" minOccurs="0" maxOccurs="1"/>
35                                 <!-- Base64 Encoded Certificate -->
36                                 <xs:element name="certs" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
37                                 <!-- Challenge Password (2 method Auth) -->
38                                 <xs:element name="challenge" type="xs:string" minOccurs="0" maxOccurs="1"/>
39                                 <!-- Notes from Server concerning Cert (not an error) -->
40                                 <xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"/>
41                                 <!-- Issuer DNs from CA -->
42                                 <xs:element name="caIssuerDNs" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
43                                 <!-- ENV in Cert -->
44                                 <xs:element name="env" type="xs:string" minOccurs="0" maxOccurs="1"/>
45                         </xs:sequence>
46                 </xs:complexType>
47         </xs:element>
48         
49         <xs:complexType name="baseRequest">
50                 <xs:sequence>
51                         <xs:element name="mechid" type="xs:string" minOccurs="1" maxOccurs="1"/>
52                         <!-- Sponsor is only required if the caller is not Sponsor.  In that case, the calling ID must be delegated to do the work. -->
53                         <xs:element name="sponsor" type="xs:string" minOccurs="0" maxOccurs="1"/>
54                         <xs:element name="start" type="xs:dateTime" minOccurs="1" maxOccurs="1" />
55                         <xs:element name="end" type="xs:date" minOccurs="1" maxOccurs="1"/>
56                 </xs:sequence>
57         </xs:complexType>
58
59         <xs:complexType name="specificRequest">
60                 <xs:complexContent>
61                         <xs:extension base="certman:baseRequest">
62                                 <xs:sequence>
63                                         <xs:element name="serial" type="xs:string" minOccurs="1" maxOccurs="1"/>
64                                         <!-- Certificate has been compromised or other security issue -->
65                                         <xs:element name="revoke" type="xs:boolean" minOccurs="0" maxOccurs="1" default="false"/>
66                                 </xs:sequence>
67                         </xs:extension>
68                 </xs:complexContent>
69         </xs:complexType>
70                 
71         <xs:element name="certificateRequest">
72                 <xs:complexType>
73                         <xs:complexContent>
74                                 <xs:extension base="certman:baseRequest">
75                                         <xs:sequence>
76                                                 <!-- One FQDN is required.  Multiple driven by Policy -->
77                                                 <xs:element name="fqdns" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
78                                                 <!-- Optional Email for getting Public Certificate -->
79                                                 <xs:element name="email" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
80                                         </xs:sequence>
81                                 </xs:extension>
82                         </xs:complexContent>
83                 </xs:complexType>
84         </xs:element>
85         
86         <xs:element name="clientX509Request">
87                 <xs:complexType>
88                         <xs:sequence>
89                                 <xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
90                                 <xs:element name="email" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
91                                 <xs:element name="start" type="xs:dateTime" minOccurs="1" maxOccurs="1" />
92                                 <xs:element name="end" type="xs:date" minOccurs="1" maxOccurs="1"/>
93                         </xs:sequence>
94                 </xs:complexType>
95         </xs:element>
96
97         <xs:element name="certificateRenew">
98                 <xs:complexType>
99                         <xs:complexContent>
100                                 <xs:extension base="certman:specificRequest">
101                                         <xs:sequence>
102                                                 <!-- One FQDN is required.  Multiple driven by Policy -->
103                                                 <xs:element name="fqdns" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
104                                                 <!-- Challenge Password (for accessing manually) TODO Is it necessary? -->
105                                                 <xs:element name="challenge" type="xs:string" minOccurs="0" maxOccurs="1"/>
106                                                 <!-- Optional Email for getting Public Certificate -->
107                                                 <xs:element name="email" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
108                                         </xs:sequence>
109                                 </xs:extension>
110                         </xs:complexContent>
111                 </xs:complexType>
112         </xs:element>
113         
114         <xs:element name="certificateDrop">
115                 <xs:complexType>
116                         <xs:complexContent>
117                                 <xs:extension base="certman:specificRequest">
118                                         <xs:sequence>
119                                                 <!-- Challenge Password (for accessing manually) TODO Is it necessary? -->
120                                                 <xs:element name="challenge" type="xs:string" minOccurs="0" maxOccurs="1"/>
121                                         </xs:sequence>
122                                 </xs:extension>
123                         </xs:complexContent>
124                 </xs:complexType>
125         </xs:element>
126         
127         <!-- Placement Structures -->
128         
129         <xs:element name="artifacts">
130                 <xs:complexType>
131                         <xs:sequence>
132                                 <xs:element name="artifact" minOccurs="0" maxOccurs="unbounded"> 
133                                         <xs:complexType>
134                                                 <xs:sequence>
135                                                         <xs:element name="mechid" type="xs:string" minOccurs="1" maxOccurs="1"/>
136                                                         <xs:element name="machine" type="xs:string" minOccurs="0" maxOccurs="1" />
137                                                     <xs:element name="type" minOccurs="1" maxOccurs="3">
138                                                         <xs:simpleType>
139                                                                     <xs:restriction base="xs:string">
140                                                                       <xs:enumeration value="file"/>
141                                                                       <xs:enumeration value="jks"/>
142                                                                       <xs:enumeration value="print"/>
143                                                                     </xs:restriction>
144                                                             </xs:simpleType>
145                                                     </xs:element>
146                                                         <xs:element name="ca" type="xs:string" minOccurs="1" maxOccurs="1" />
147                                                     <xs:element name="dir" type="xs:string" minOccurs="1" maxOccurs="1"/>
148                                                         <xs:element name="os_user" type="xs:string" minOccurs="1" maxOccurs="1"/>
149                                                         <!-- Ignored on input, and set by TABLES.  However, returned  on output -->
150                                                         <xs:element name="sponsor" type="xs:string" minOccurs="0" maxOccurs="1" />
151                                                     <!-- Optional... if empty, will use MechID Namespace -->
152                                                     <xs:element name="ns" type="xs:string" minOccurs="0" maxOccurs="1"/>
153                                                     <!-- Optional... if empty, will notify Sponsor -->
154                                                     <xs:element name="notification" type="xs:string" minOccurs="0" maxOccurs="1"/>
155                                                     <!-- Optional... Days before auto renewal.  Min is 10.  Max is 1/3 expiration (60) -->
156                                                     <xs:element name="renewDays" type="xs:int" minOccurs="0" maxOccurs="1" default="30"/>
157                                                     <!-- Optional... Additional SANS. May be denied by CA. -->
158                                                     <xs:element name="sans" type="xs:string" minOccurs="0" maxOccurs="99"/>
159                                                     
160                                                 </xs:sequence>
161                                         </xs:complexType>
162                                 </xs:element>
163                         </xs:sequence>
164                 </xs:complexType>
165         </xs:element>
166         
167         
168                                 
169 </xs:schema>