github.com/Venafi/vcert/v5@v5.10.2/pkg/policy/policyStructures.go (about) 1 package policy 2 3 type PolicyPayloadRequest struct { 4 Class string `json:"Class"` 5 ObjectDN string `json:"ObjectDN"` 6 } 7 8 type PolicySetAttributePayloadRequest struct { 9 Locked bool `json:"Locked"` 10 ObjectDN string `json:"ObjectDN"` 11 Class string `json:"Class"` 12 AttributeName string `json:"AttributeName"` 13 Values []string `json:"Values"` 14 } 15 16 type PolicySetAttributeResponse struct { 17 Error string `json:"Error"` 18 Result int `json:"Result"` 19 } 20 21 type PolicyGetAttributePayloadRequest struct { 22 ObjectDN string `json:"ObjectDN"` 23 Class string `json:"Class"` 24 AttributeName string `json:"AttributeName"` 25 Values []string `json:"Values"` 26 } 27 28 type PolicyExistPayloadRequest struct { 29 ObjectDN string `json:"ObjectDN"` 30 } 31 32 type PolicyIsValidResponse struct { 33 Error string `json:"Error"` 34 Result int `json:"Result"` 35 PolicyObject PolicyObject `json:"Object"` 36 } 37 38 type PolicyGetAttributeResponse struct { 39 Locked bool `json:"Locked"` 40 Result int `json:"Result"` 41 Values []string `json:"Values"` 42 } 43 44 type CloudPolicyRequest struct { 45 Name string `json:"name"` 46 CertificateAuthority string `json:"certificateAuthority"` 47 CertificateAuthorityProductOptionId string `json:"certificateAuthorityProductOptionId"` 48 Product Product `json:"product"` 49 TrackingData *TrackingData `json:"trackingData"` 50 SubjectCNRegexes []string `json:"subjectCNRegexes"` 51 SubjectORegexes []string `json:"subjectORegexes"` 52 SubjectOURegexes []string `json:"subjectOURegexes"` 53 SubjectLRegexes []string `json:"subjectLRegexes"` 54 SubjectSTRegexes []string `json:"subjectSTRegexes"` 55 SubjectCValues []string `json:"subjectCValues"` 56 SanRegexes []string `json:"sanRegexes"` 57 SanIpAddressRegexes []string `json:"sanIpAddressRegexes"` 58 SanRfc822NameRegexes []string `json:"sanRfc822NameRegexes"` 59 SanUniformResourceIdentifierRegexes []string `json:"sanUniformResourceIdentifierRegexes"` 60 KeyTypes []KeyType `json:"keyTypes"` 61 KeyReuse *bool `json:"keyReuse"` 62 RecommendedSettings *RecommendedSettings `json:"recommendedSettings"` 63 CsrUploadAllowed bool `json:"csrUploadAllowed"` 64 KeyGeneratedByVenafiAllowed bool `json:"keyGeneratedByVenafiAllowed"` 65 } 66 67 type Product struct { 68 CertificateAuthority string `json:"certificateAuthority"` 69 ProductName string `json:"productName"` 70 ValidityPeriod string `json:"validityPeriod"` 71 HashAlgorithm *string `json:"hashAlgorithm,omitempty"` 72 AutoRenew *bool `json:"autoRenew,omitempty"` 73 OrganizationId *int64 `json:"organizationId,omitempty"` 74 } 75 76 type KeyType struct { 77 KeyType string `json:"keyType"` 78 KeyLengths []int `json:"keyLengths,omitempty"` 79 KeyCurves []string `json:"keyCurves,omitempty"` 80 } 81 82 type TrackingData struct { 83 CertificateAuthority string `json:"certificateAuthority"` 84 RequesterName string `json:"requesterName"` 85 RequesterEmail string `json:"requesterEmail"` 86 RequesterPhone string `json:"requesterPhone"` 87 } 88 89 type RecommendedSettings struct { 90 SubjectCNRegexes []string `json:"subjectCNRegexes"` 91 SubjectOValue *string `json:"subjectOValue"` 92 SubjectOUValue *string `json:"subjectOUValue"` 93 SubjectLValue *string `json:"subjectLValue"` 94 SubjectSTValue *string `json:"subjectSTValue"` 95 SubjectCValue *string `json:"subjectCValue"` 96 SanRegexes []string `json:"sanRegexes"` 97 Key *Key `json:"key"` 98 } 99 100 type Key struct { 101 Type string `json:"type"` 102 Length int `json:"length,omitempty"` 103 Curve string `json:"curve,omitempty"` 104 } 105 106 type Application struct { 107 OwnerIdsAndTypes []OwnerIdType `json:"ownerIdsAndTypes"` 108 Name string `json:"name"` 109 Description string `json:"description"` 110 Fqdns []string `json:"fqdns"` 111 InternalFqdns []string `json:"internalFqdns"` 112 InternalIpRanges []string `json:"internalIpRanges"` 113 ExternalIpRanges []string `json:"externalIpRanges"` 114 InternalPorts []string `json:"internalPorts"` 115 FullyQualifiedDomainNames []string `json:"fullyQualifiedDomainNames"` 116 IpRanges []string `json:"ipRanges"` 117 Ports []string `json:"ports"` 118 CertificateIssuingTemplateAliasIdMap map[string]string `json:"certificateIssuingTemplateAliasIdMap"` 119 StartTargetedDiscovery bool `json:"startTargetedDiscovery"` 120 } 121 122 type OwnerIdType struct { 123 OwnerId string `json:"ownerId"` 124 OwnerType string `json:"ownerType"` 125 } 126 127 type TppPolicy struct { 128 //general values 129 Name *string 130 //Owners []string "owners": string[],(permissions only) prefixed name/universal 131 Contact []string 132 //Permissions string "userAccess": string, (permissions) prefixed name/universal 133 Approver []string 134 135 //policy's values 136 ProhibitWildcard *int 137 DomainSuffixWhitelist []string 138 ProhibitedSANType []string 139 CertificateAuthority *string 140 ManagementType *LockedAttribute 141 142 //subject attributes 143 Organization *LockedAttribute 144 OrganizationalUnit *LockedArrayAttribute 145 City *LockedAttribute 146 State *LockedAttribute 147 Country *LockedAttribute 148 149 // KeyPair attributes 150 PkixParameterSetDefault *LockedAttribute 151 PkixParameterSet *LockedArrayAttribute 152 153 KeyAlgorithm *LockedAttribute //Deprecated in TPP 25.1, use PkixParameterSet 154 KeyBitStrength *LockedAttribute //Deprecated in TPP 25.1, use PkixParameterSet 155 EllipticCurve *LockedAttribute //Deprecated in TPP 25.1, use PkixParameterSet 156 ManualCsr *LockedAttribute 157 AllowPrivateKeyReuse *int 158 WantRenewal *int 159 } 160 161 type LockedAttribute struct { 162 Value string 163 Locked bool 164 } 165 type LockedIntAttribute struct { 166 Value int 167 Locked bool 168 } 169 type LockedArrayAttribute struct { 170 Value []string `json:"Values"` 171 Locked bool 172 } 173 174 type CertificateAuthorityInfo struct { 175 CAType string 176 CAAccountKey string 177 VendorProductName string 178 } 179 180 type Accounts struct { 181 Accounts []AccountDetails 182 } 183 184 type AccountDetails struct { 185 Account Account `json:"account"` 186 ProductOption []ProductOption `json:"productOptions"` 187 } 188 189 type Account struct { 190 Id string `json:"id"` 191 Key string `json:"Key"` 192 CertificateAuthority string `json:"certificateAuthority"` 193 } 194 195 type ProductOption struct { 196 ProductName string `json:"productName"` 197 Id string `json:"id"` 198 ProductDetails ProductDetails `json:"productDetails"` 199 } 200 201 type ProductDetails struct { 202 ProductTemplate ProductTemplate `json:"productTemplate"` 203 } 204 205 type ProductTemplate struct { 206 OrganizationId int64 `json:"organizationId"` 207 } 208 209 type PolicyObject struct { 210 AbsoluteGUID string `json:"AbsoluteGUID"` 211 DN string `json:"DN"` 212 GUID string `json:"GUID"` 213 Id int `json:"Id"` 214 Name string `json:"Name"` 215 Parent string `json:"Parent"` 216 Revision int `json:"Revision"` 217 TypeName string `json:"TypeName"` 218 } 219 220 type CheckPolicyResponse struct { 221 Error string `json:"Error"` 222 Policy *PolicyResponse `json:"Policy"` 223 } 224 225 type PolicyResponse struct { 226 CertificateAuthority LockedAttribute `json:"CertificateAuthority"` 227 CsrGeneration LockedAttribute `json:"CsrGeneration"` 228 KeyGeneration LockedAttribute `json:"KeyGeneration"` 229 KeyPairResponse KeyPairResponse `json:"KeyPair"` 230 ManagementType LockedAttribute `json:"ManagementType"` 231 PrivateKeyReuseAllowed bool `json:"PrivateKeyReuseAllowed"` 232 SubjAltNameDnsAllowed bool `json:"SubjAltNameDnsAllowed"` 233 SubjAltNameEmailAllowed bool `json:"SubjAltNameEmailAllowed"` 234 SubjAltNameIpAllowed bool `json:"SubjAltNameIpAllowed"` 235 SubjAltNameUpnAllowed bool `json:"SubjAltNameUpnAllowed"` 236 SubjAltNameUriAllowed bool `json:"SubjAltNameUriAllowed"` 237 Subject SubjectResponse `json:"Subject"` 238 UniqueSubjectEnforced bool `json:"UniqueSubjectEnforced"` 239 WhitelistedDomains []string `json:"WhitelistedDomains"` 240 WildcardsAllowed bool `json:"WildcardsAllowed"` 241 } 242 243 type KeyPairResponse struct { 244 KeyAlgorithm LockedAttribute `json:"KeyAlgorithm"` 245 KeySize LockedIntAttribute `json:"KeySize"` 246 EllipticCurve LockedAttribute `json:"EllipticCurve"` 247 } 248 249 type SubjectResponse struct { 250 City LockedAttribute `json:"City"` 251 Country LockedAttribute `json:"Country"` 252 Organization LockedAttribute `json:"Organization"` 253 OrganizationalUnit LockedArrayAttribute `json:"OrganizationalUnit"` 254 State LockedAttribute `json:"State"` 255 } 256 257 type CheckPolicyRequest struct { 258 PolicyDN string `json:"PolicyDN"` 259 } 260 261 type ClearTTPAttributesRequest struct { 262 ObjectDN string `json:"ObjectDN"` 263 Class string `json:"Class"` 264 AttributeName string `json:"AttributeName"` 265 } 266 267 type CADetails struct { 268 CertificateAuthorityProductOptionId *string 269 CertificateAuthorityOrganizationId *int64 270 }