Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertToRegex(values []string, wildcardAllowed bool) []string
- func ConvertToRfc822Regex(values []string) []string
- func GetApplicationName(zone string) string
- func GetCitName(zone string) string
- func GetFileAndBytes(p string) (*os.File, []byte, error)
- func GetFileType(f string) string
- func GetParent(p string) string
- func IsDefaultEmpty(ps *PolicySpecification) bool
- func IsMLDSAKeyType(keyType string) bool
- func IsPolicyEmpty(ps *PolicySpecification) bool
- func IsWildcardAllowed(ps PolicySpecification) bool
- func RemoveRegex(values []string) []string
- func ValidateCloudPolicySpecification(ps *PolicySpecification) error
- func ValidateTppPolicySpecification(ps *PolicySpecification) error
- func VerifyPolicySpec(bytes []byte, fileExt string) error
- type Account
- type AccountDetails
- type Accounts
- type Application
- type CADetails
- type CertificateAuthorityInfo
- type CheckPolicyRequest
- type CheckPolicyResponse
- type ClearTTPAttributesRequest
- type CloudPolicyRequest
- type DecodedPkixParameterSet
- type Default
- type DefaultKeyPair
- type DefaultSubject
- type Key
- type KeyAlgorithm
- type KeyPair
- type KeyPairResponse
- type KeyType
- type LockedArrayAttribute
- type LockedAttribute
- type LockedIntAttribute
- type OwnerIdType
- type PkixOidKeyAlgorithm
- type Policy
- type PolicyExistPayloadRequest
- type PolicyGetAttributePayloadRequest
- type PolicyGetAttributeResponse
- type PolicyIsValidResponse
- type PolicyObject
- type PolicyPayloadRequest
- type PolicyResponse
- type PolicySetAttributePayloadRequest
- type PolicySetAttributeResponse
- type PolicySpecification
- type Product
- type ProductDetails
- type ProductOption
- type ProductTemplate
- type RecommendedSettings
- type Subject
- type SubjectAltNames
- type SubjectResponse
- type TppPolicy
- type TrackingData
Constants ¶
const ( JsonExtension = ".json" YamlExtension = ".yaml" RootPath = util.PathSeparator + "VED" + util.PathSeparator + "Policy" PolicyClass = "Policy" PolicyAttributeClass = "X509 Certificate" //CyberArk Certificate Manager, Self-Hosted policy attributes TppContact = "Contact" TppApprover = "Approver" TppCertificateAuthority = "Certificate Authority" TppProhibitWildcard = "Prohibit Wildcard" TppDomainSuffixWhitelist = "Domain Suffix Whitelist" TppOrganization = "Organization" TppOrganizationalUnit = "Organizational Unit" TppCity = "City" TppState = "State" TppCountry = "Country" TppPkixParameterSetPolicy = "PKIX Parameter Set Policy" TppPkixParameterSetPolicyDefault = "PKIX Parameter Set Policy Default" TppKeyAlgorithm = "Key Algorithm" TppKeyBitStrength = "Key Bit Strength" TppEllipticCurve = "Elliptic Curve" ServiceGenerated = "Manual Csr" TppProhibitedSANTypes = "Prohibited SAN Types" TppAllowPrivateKeyReuse = "Allow Private Key Reuse" TppWantRenewal = "Want Renewal" TppDnsAllowed = "DNS" TppIpAllowed = "IP" TppEmailAllowed = "Email" TppUriAllowed = "URI" TppUpnAllowed = "UPN" AllowAll = ".*" UserProvided = "UserProvided" DefaultCA = "BUILTIN\\Built-In CA\\Default Product" TppManagementType = "Management Type" TppManagementTypeEnrollment = "Enrollment" TppManagementTypeProvisioning = "Provisioning" CloudEntrustCA = "ENTRUST" CloudDigicertCA = "DIGICERT" CloudRequesterName = "Venafi Cloud Service" CloudRequesterEmail = "no-reply@venafi.cloud" CloudRequesterPhone = "801-555-0123" IdentityUser = 1 IdentitySecurityGroup = 2 IdentityDistributionGroup = 8 AllIdentities = IdentityUser + IdentitySecurityGroup + IdentityDistributionGroup )
const ( // CloudKeyTypeMLDSA is the key type CyberArk Certificate Manager, SaaS and NGTS use for ML-DSA in an issuing // template's keyAlgorithmTypes and recommended key. The parameter set is carried separately as a key strength. CloudKeyTypeMLDSA = "ML_DSA" // KeyTypeMLDSA is the policy specification key type for ML-DSA, with the strengths in mldsaKeyStrengths and the // default strength in mldsaKeyStrength KeyTypeMLDSA = "MLDSA" )
Variables ¶
var CloudRsaKeySize = []int{1024, 2048, 3072, 4096}
CloudRsaKeySize represents the Key sizes supported by CyberArk Certificate Manager, SaaS for RSA Private Keys
var KeyAlgorithmsToPKIX = map[string]map[string]string{
"RSA": {
"1024": "1.3.6.1.4.1.28783.10.1.1.1024",
"2048": "1.3.6.1.4.1.28783.10.1.1.2048",
"3072": "1.3.6.1.4.1.28783.10.1.1.3072",
"4096": "1.3.6.1.4.1.28783.10.1.1.4096",
"8192": "1.3.6.1.4.1.28783.10.1.1.8192",
},
"ECC": {
"P256": "1.3.6.1.4.1.28783.10.2.1.256",
"P384": "1.3.6.1.4.1.28783.10.2.1.384",
"P521": "1.3.6.1.4.1.28783.10.2.1.521",
"ED25519": "1.3.6.1.4.1.28783.10.3.25519",
},
KeyTypeMLDSA: {
"44": "1.3.6.1.4.1.28783.10.4.44",
"65": "1.3.6.1.4.1.28783.10.4.65",
"87": "1.3.6.1.4.1.28783.10.4.87",
},
}
KeyAlgorithmsToPKIX represents the mapping of RSA, ECDSA/ECC and ML-DSA Key Algorithms to the PKIX OIDs
var PkixToKeyAlgorithms = invertKeyAlgorithmsToPKIX(KeyAlgorithmsToPKIX)
PkixToKeyAlgorithms is the inverse of KeyAlgorithmsToPKIX: it maps a PKIX parameter set OID, as returned by TPP 25.1+'s AlgorithmSelector API (and surfaced via Certificates/CheckPolicy's KeyPair.PkixParameterSet.Values), back to the key type/size/curve it represents. It is derived from KeyAlgorithmsToPKIX so that teaching vcert a new algorithm is a single-site change and the two directions cannot drift apart.
var TppEllipticCurves = []string{"P256", "P384", "P521", "ED25519"}
TppEllipticCurves represents the curves supported by CyberArk Certificate Manager, Self-Hosted for ECDSA Private Keys. ED25519 is an Edwards curve rather than an ECDSA one, but TPP groups it with the elliptic curves, and vcert follows suit: certificate.AllSupportedCurves includes it and endpoint.checkKey validates an ED25519 key against an ECDSA AllowedKeyConfiguration.
var TppKeyType = []string{"RSA", "ECDSA", "ECC"}
TppKeyType represents the Private Key types supported by CyberArk Certificate Manager, Self-Hosted
var TppRsaKeySize = []int{1024, 2048, 3072, 4096, 8192}
TppRsaKeySize represents the Key sizes supported by CyberArk Certificate Manager, Self-Hosted for RSA Private Keys
Functions ¶
func ConvertToRegex ¶
func ConvertToRfc822Regex ¶
func GetApplicationName ¶
GetApplicationName extracts the application name from a Cloud zone string. For Cloud format "app\template", returns "app". For NGTS simple format (no backslash), returns empty string.
func GetCitName ¶
GetCitName extracts the certificate issuing template name from a zone string. For Cloud format "app\template", returns "template". For NGTS simple format (no backslash), returns the zone string itself.
func GetFileType ¶
func IsDefaultEmpty ¶
func IsDefaultEmpty(ps *PolicySpecification) bool
func IsMLDSAKeyType ¶ added in v5.14.0
IsMLDSAKeyType returns true when a policy specification key type is ML-DSA
func IsPolicyEmpty ¶
func IsPolicyEmpty(ps *PolicySpecification) bool
func IsWildcardAllowed ¶
func IsWildcardAllowed(ps PolicySpecification) bool
func RemoveRegex ¶
func ValidateCloudPolicySpecification ¶
func ValidateCloudPolicySpecification(ps *PolicySpecification) error
func ValidateTppPolicySpecification ¶
func ValidateTppPolicySpecification(ps *PolicySpecification) error
func VerifyPolicySpec ¶
Types ¶
type AccountDetails ¶
type AccountDetails struct {
Account Account `json:"account"`
ProductOption []ProductOption `json:"productOptions"`
}
type Accounts ¶
type Accounts struct {
Accounts []AccountDetails
}
type Application ¶
type Application struct {
OwnerIdsAndTypes []OwnerIdType `json:"ownerIdsAndTypes"`
Name string `json:"name"`
Description string `json:"description"`
Fqdns []string `json:"fqdns"`
InternalFqdns []string `json:"internalFqdns"`
InternalIpRanges []string `json:"internalIpRanges"`
ExternalIpRanges []string `json:"externalIpRanges"`
InternalPorts []string `json:"internalPorts"`
FullyQualifiedDomainNames []string `json:"fullyQualifiedDomainNames"`
IpRanges []string `json:"ipRanges"`
Ports []string `json:"ports"`
CertificateIssuingTemplateAliasIdMap map[string]string `json:"certificateIssuingTemplateAliasIdMap"`
StartTargetedDiscovery bool `json:"startTargetedDiscovery"`
}
type CertificateAuthorityInfo ¶
func GetCertAuthorityInfo ¶
func GetCertAuthorityInfo(certificateAuthority string) (CertificateAuthorityInfo, error)
type CheckPolicyRequest ¶
type CheckPolicyRequest struct {
PolicyDN string `json:"PolicyDN"`
}
type CheckPolicyResponse ¶
type CheckPolicyResponse struct {
Error string `json:"Error"`
Policy *PolicyResponse `json:"Policy"`
}
type CloudPolicyRequest ¶
type CloudPolicyRequest struct {
Name string `json:"name"`
CertificateAuthority string `json:"certificateAuthority"`
CertificateAuthorityProductOptionId string `json:"certificateAuthorityProductOptionId"`
Product Product `json:"product"`
TrackingData *TrackingData `json:"trackingData"`
SubjectCNRegexes []string `json:"subjectCNRegexes"`
SubjectORegexes []string `json:"subjectORegexes"`
SubjectOURegexes []string `json:"subjectOURegexes"`
SubjectLRegexes []string `json:"subjectLRegexes"`
SubjectSTRegexes []string `json:"subjectSTRegexes"`
SubjectCValues []string `json:"subjectCValues"`
SanRegexes []string `json:"sanRegexes"`
SanIpAddressRegexes []string `json:"sanIpAddressRegexes"`
SanRfc822NameRegexes []string `json:"sanRfc822NameRegexes"`
SanUniformResourceIdentifierRegexes []string `json:"sanUniformResourceIdentifierRegexes"`
KeyTypes []KeyType `json:"keyTypes,omitempty"`
KeyAlgorithmTypes []KeyType `json:"keyAlgorithmTypes,omitempty"`
KeyReuse *bool `json:"keyReuse"`
RecommendedSettings *RecommendedSettings `json:"recommendedSettings"`
CsrUploadAllowed bool `json:"csrUploadAllowed"`
KeyGeneratedByVenafiAllowed bool `json:"keyGeneratedByVenafiAllowed"`
}
func BuildCloudCitRequest ¶
func BuildCloudCitRequest(ps *PolicySpecification, ca *CADetails) (*CloudPolicyRequest, error)
type DecodedPkixParameterSet ¶ added in v5.14.0
type DecodedPkixParameterSet struct {
// Oids are the OIDs the server returned that this version of vcert recognized, in the order
// the server returned them.
Oids []string
// KeyTypes holds the distinct key algorithm names ("RSA", "ECC", "MLDSA") covered by Oids.
KeyTypes []string
// RsaKeySizes, EllipticCurves and MLDSAKeyStrengths hold the RSA bit sizes, curve names and ML-DSA strengths
// covered by Oids.
RsaKeySizes []int
EllipticCurves []string
MLDSAKeyStrengths []int
}
DecodedPkixParameterSet is the decoded form of a TPP PKIX parameter set OID list.
func DecodePkixParameterSet ¶ added in v5.14.0
func DecodePkixParameterSet(oids []string) (*DecodedPkixParameterSet, error)
DecodePkixParameterSet decodes the PKIX parameter set OIDs returned by TPP 25.1+ in Certificates/CheckPolicy's KeyPair.PkixParameterSet.Values.
Individual OIDs that this version of vcert does not recognize are skipped with a warning rather than failing the whole read: a newer TPP may offer algorithms this build predates, and refusing the policy outright would make the zone unusable even for clients requesting an algorithm vcert does understand. Skipping narrows the set of algorithms vcert will permit, so it stays fail-closed. An empty list, or one in which nothing is recognized, is an error — reporting "no restriction" for a folder that does restrict key algorithms would be fail-open.
func (*DecodedPkixParameterSet) Default ¶ added in v5.14.0
func (d *DecodedPkixParameterSet) Default(nominated string) (string, PkixOidKeyAlgorithm)
Default returns the OID and algorithm to use as the folder's default key algorithm. nominated is the folder's DefaultPkixParameterSet attribute, which TPP reports separately from the allowed set. It is used when this build recognizes it and the allowed set contains it. Otherwise the default is the first allowed algorithm, in TPP's own preference order, so that the default always satisfies the policy. Newer TPP releases keep adding OIDs, so an unrecognized default must not lose the default altogether.
type Default ¶
type Default struct {
Domain *string `json:"domain,omitempty" yaml:"domain,omitempty"`
Subject *DefaultSubject `json:"subject,omitempty" yaml:"subject,omitempty"`
KeyPair *DefaultKeyPair `json:"keyPair,omitempty" yaml:"keyPair,omitempty"`
AutoInstalled *bool `json:"autoInstalled,omitempty" yaml:"autoInstalled,omitempty"`
}
type DefaultKeyPair ¶
type DefaultKeyPair struct {
PkixParameterSetDefault *string `json:"pkixParameterSetDefault,omitempty" yaml:"pkixParameterSetDefault,omitempty"`
KeyType *string `json:"keyType,omitempty" yaml:"keyType,omitempty"`
RsaKeySize *int `json:"rsaKeySize,omitempty" yaml:"rsaKeySize,omitempty"`
EllipticCurve *string `json:"ellipticCurve,omitempty" yaml:"ellipticCurve,omitempty"`
// MLDSAKeyStrength is the default ML-DSA strength (44, 65 or 87) when KeyType is MLDSA
MLDSAKeyStrength *int `json:"mldsaKeyStrength,omitempty" yaml:"mldsaKeyStrength,omitempty"`
ServiceGenerated *bool `json:"serviceGenerated,omitempty" yaml:"serviceGenerated,omitempty"`
}
type DefaultSubject ¶
type DefaultSubject struct {
Org *string `json:"org,omitempty" yaml:"org,omitempty"`
OrgUnits []string `json:"orgUnits,omitempty" yaml:"orgUnits,omitempty"`
Locality *string `json:"locality,omitempty" yaml:"locality,omitempty"`
State *string `json:"state,omitempty" yaml:"state,omitempty"`
Country *string `json:"country,omitempty" yaml:"country,omitempty"`
}
type KeyAlgorithm ¶ added in v5.14.0
type KeyAlgorithm struct {
KeyType string `json:"keyType"`
KeyLength int `json:"keyLength,omitempty"`
KeyCurve string `json:"keyCurve,omitempty"`
KeyStrength int `json:"keyStrength,omitempty"`
}
KeyAlgorithm is the recommended key of an issuing template, which supports every key type
type KeyPair ¶
type KeyPair struct {
PkixParameterSet []string `json:"pkixParameterSet,omitempty" yaml:"pkixParameterSet,omitempty"`
KeyTypes []string `json:"keyTypes,omitempty" yaml:"keyTypes,omitempty"`
RsaKeySizes []int `json:"rsaKeySizes,omitempty" yaml:"rsaKeySizes,omitempty"`
EllipticCurves []string `json:"ellipticCurves,omitempty" yaml:"ellipticCurves,omitempty"`
// MLDSAKeyStrengths are the ML-DSA strengths (44, 65, 87) allowed when KeyTypes includes MLDSA
MLDSAKeyStrengths []int `json:"mldsaKeyStrengths,omitempty" yaml:"mldsaKeyStrengths,omitempty"`
ServiceGenerated *bool `json:"serviceGenerated,omitempty" yaml:"generationType,omitempty"`
ReuseAllowed *bool `json:"reuseAllowed,omitempty" yaml:"reuseAllowed,omitempty"`
}
type KeyPairResponse ¶
type KeyPairResponse struct {
KeyAlgorithm LockedAttribute `json:"KeyAlgorithm"`
KeySize LockedIntAttribute `json:"KeySize"`
EllipticCurve LockedAttribute `json:"EllipticCurve"`
// PkixParameterSet lists the PKIX OIDs of the key algorithms allowed by policy. Available
// from TPP 25.1 onwards, it supersedes KeyAlgorithm/KeySize/EllipticCurve above, which TPP
// no longer locks once a policy folder's allowed algorithms are configured via the newer
// AlgorithmSelector API.
//
// Locked is true whenever the folder has an effective allowed set, which on TPP 25.1+ is
// always. It does not distinguish a folder an administrator restricted from one that merely
// permits everything the server supports.
PkixParameterSet LockedArrayAttribute `json:"PkixParameterSet"`
// DefaultPkixParameterSet is the single PKIX OID the folder recommends, i.e. the "PKIX
// Parameter Set Policy Default" attribute. It is a separate attribute from PkixParameterSet
// and must be read separately: a folder that locks its allowed set still has a default.
DefaultPkixParameterSet LockedAttribute `json:"DefaultPkixParameterSet"`
}
type KeyType ¶
type KeyType struct {
KeyType string `json:"keyType"`
KeyLengths []int `json:"keyLengths,omitempty"`
KeyCurves []string `json:"keyCurves,omitempty"`
KeyStrengths []int `json:"keyStrengths,omitempty"`
}
KeyType is an allowed key type of an issuing template. Key types added after RSA and EC, such as ML-DSA, are only available in an issuing template's keyAlgorithmTypes
type LockedArrayAttribute ¶
type LockedAttribute ¶
type LockedIntAttribute ¶
type OwnerIdType ¶
type PkixOidKeyAlgorithm ¶ added in v5.14.0
type PkixOidKeyAlgorithm struct {
// KeyType is the key algorithm name spelled as KeyAlgorithmsToPKIX and a policy
// specification's keyTypes field spell it, i.e. "RSA", "ECC" or "MLDSA".
KeyType string
KeySize int // populated for RSA (bit size) and MLDSA (strength: 44, 65 or 87)
Curve string // populated for ECC, e.g. "P256"
}
PkixOidKeyAlgorithm describes the key type/size/curve represented by a PKIX parameter set OID.
type Policy ¶
type Policy struct {
Domains []string `json:"domains,omitempty" yaml:"domains,omitempty"`
WildcardAllowed *bool `json:"wildcardAllowed,omitempty" yaml:"wildcardAllowed,omitempty"`
AutoInstalled *bool `json:"autoInstalled,omitempty" yaml:"autoInstalled,omitempty"`
MaxValidDays *int `json:"maxValidDays,omitempty" yaml:"maxValidDays,omitempty"`
CertificateAuthority *string `json:"certificateAuthority,omitempty" yaml:"certificateAuthority,omitempty"`
Subject *Subject `json:"subject,omitempty" yaml:"subject,omitempty"`
KeyPair *KeyPair `json:"keyPair,omitempty" yaml:"keyPair,omitempty"`
SubjectAltNames *SubjectAltNames `json:"subjectAltNames,omitempty" yaml:"subjectAltNames,omitempty"`
}
type PolicyExistPayloadRequest ¶
type PolicyExistPayloadRequest struct {
ObjectDN string `json:"ObjectDN"`
}
type PolicyIsValidResponse ¶
type PolicyIsValidResponse struct {
Error string `json:"Error"`
Result int `json:"Result"`
PolicyObject PolicyObject `json:"Object"`
}
type PolicyObject ¶
type PolicyPayloadRequest ¶
type PolicyResponse ¶
type PolicyResponse struct {
CertificateAuthority LockedAttribute `json:"CertificateAuthority"`
CsrGeneration LockedAttribute `json:"CsrGeneration"`
KeyGeneration LockedAttribute `json:"KeyGeneration"`
KeyPairResponse KeyPairResponse `json:"KeyPair"`
ManagementType LockedAttribute `json:"ManagementType"`
PrivateKeyReuseAllowed bool `json:"PrivateKeyReuseAllowed"`
SubjAltNameDnsAllowed bool `json:"SubjAltNameDnsAllowed"`
SubjAltNameEmailAllowed bool `json:"SubjAltNameEmailAllowed"`
SubjAltNameIpAllowed bool `json:"SubjAltNameIpAllowed"`
SubjAltNameUpnAllowed bool `json:"SubjAltNameUpnAllowed"`
SubjAltNameUriAllowed bool `json:"SubjAltNameUriAllowed"`
Subject SubjectResponse `json:"Subject"`
UniqueSubjectEnforced bool `json:"UniqueSubjectEnforced"`
WhitelistedDomains []string `json:"WhitelistedDomains"`
WildcardsAllowed bool `json:"WildcardsAllowed"`
}
type PolicySpecification ¶
type PolicySpecification struct {
Owners []string `json:"owners,omitempty" yaml:"owners,omitempty"`
Users []string `json:"users,omitempty" yaml:"users,omitempty"`
UserAccess string `json:"userAccess,omitempty" yaml:"userAccess,omitempty"`
Approvers []string `json:"approvers,omitempty" yaml:"approvers,omitempty"`
Policy *Policy `json:"policy,omitempty" yaml:"policy,omitempty"`
Default *Default `json:"defaults,omitempty" yaml:"defaults,omitempty"`
}
func BuildPolicySpecificationForTPP ¶
func BuildPolicySpecificationForTPP(checkPolicyResp CheckPolicyResponse) (*PolicySpecification, error)
func GetPolicySpec ¶
func GetPolicySpec() *PolicySpecification
type Product ¶
type Product struct {
CertificateAuthority string `json:"certificateAuthority"`
ProductName string `json:"productName"`
ValidityPeriod string `json:"validityPeriod"`
HashAlgorithm *string `json:"hashAlgorithm,omitempty"`
AutoRenew *bool `json:"autoRenew,omitempty"`
OrganizationId *int64 `json:"organizationId,omitempty"`
}
type ProductDetails ¶
type ProductDetails struct {
ProductTemplate ProductTemplate `json:"productTemplate"`
}
type ProductOption ¶
type ProductOption struct {
ProductName string `json:"productName"`
Id string `json:"id"`
ProductDetails ProductDetails `json:"productDetails"`
}
type ProductTemplate ¶
type ProductTemplate struct {
OrganizationId int64 `json:"organizationId"`
}
type RecommendedSettings ¶
type RecommendedSettings struct {
SubjectCNRegexes []string `json:"subjectCNRegexes"`
SubjectOValue *string `json:"subjectOValue"`
SubjectOUValue *string `json:"subjectOUValue"`
SubjectLValue *string `json:"subjectLValue"`
SubjectSTValue *string `json:"subjectSTValue"`
SubjectCValue *string `json:"subjectCValue"`
SanRegexes []string `json:"sanRegexes"`
// Key is the recommended key when the allowed key types are set with keyTypes
Key *Key `json:"key,omitempty"`
// KeyAlgorithm is the recommended key when the allowed key types are set with keyAlgorithmTypes
KeyAlgorithm *KeyAlgorithm `json:"keyAlgorithm,omitempty"`
}
type Subject ¶
type Subject struct {
Orgs []string `json:"orgs,omitempty" yaml:"orgs,omitempty"`
OrgUnits []string `json:"orgUnits,omitempty" yaml:"orgUnits,omitempty"`
Localities []string `json:"localities,omitempty" yaml:"localities,omitempty"`
States []string `json:"states,omitempty" yaml:"states,omitempty"`
Countries []string `json:"countries,omitempty" yaml:"countries,omitempty"`
}
type SubjectAltNames ¶
type SubjectAltNames struct {
DnsAllowed *bool `json:"dnsAllowed,omitempty" yaml:"dnsAllowed,omitempty"`
IpAllowed *bool `json:"ipAllowed,omitempty" yaml:"ipAllowed,omitempty"`
EmailAllowed *bool `json:"emailAllowed,omitempty" yaml:"emailAllowed,omitempty"`
UriAllowed *bool `json:"uriAllowed,omitempty" yaml:"uriAllowed,omitempty"`
UpnAllowed *bool `json:"upnAllowed,omitempty" yaml:"uriProtocols,omitempty"`
UriProtocols []string `json:"uriProtocols,omitempty" yaml:"uriProtocols,omitempty"`
IpConstraints []string `json:"ipConstraints,omitempty" yaml:"uriProtocols,omitempty"`
}
type SubjectResponse ¶
type SubjectResponse struct {
City LockedAttribute `json:"City"`
Country LockedAttribute `json:"Country"`
Organization LockedAttribute `json:"Organization"`
OrganizationalUnit LockedArrayAttribute `json:"OrganizationalUnit"`
State LockedAttribute `json:"State"`
}
type TppPolicy ¶
type TppPolicy struct {
//general values
Name *string
//Owners []string "owners": string[],(permissions only) prefixed name/universal
Contact []string
//Permissions string "userAccess": string, (permissions) prefixed name/universal
Approver []string
//policy's values
ProhibitWildcard *int
DomainSuffixWhitelist []string
ProhibitedSANType []string
CertificateAuthority *string
ManagementType *LockedAttribute
//subject attributes
Organization *LockedAttribute
OrganizationalUnit *LockedArrayAttribute
City *LockedAttribute
State *LockedAttribute
Country *LockedAttribute
// KeyPair attributes
PkixParameterSetDefault *LockedAttribute
PkixParameterSet *LockedArrayAttribute
KeyAlgorithm *LockedAttribute //Deprecated in TPP 25.1, use PkixParameterSet
KeyBitStrength *LockedAttribute //Deprecated in TPP 25.1, use PkixParameterSet
EllipticCurve *LockedAttribute //Deprecated in TPP 25.1, use PkixParameterSet
ManualCsr *LockedAttribute
AllowPrivateKeyReuse *int
WantRenewal *int
}
func BuildTppPolicy ¶
func BuildTppPolicy(ps *PolicySpecification) TppPolicy