Skip to main content

akeyless_api/models/
auth_method_update_cert.rs

1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AuthMethodUpdateCert : authMethodUpdateCert is a command that updates a new auth method that will be able to authenticate using a client certificate
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AuthMethodUpdateCert {
17    /// Access expiration date in Unix timestamp (select 0 for access without expiry date)
18    #[serde(rename = "access-expires", skip_serializing_if = "Option::is_none")]
19    pub access_expires: Option<i64>,
20    /// limit the auth method usage for specific client types [cli,ui,gateway-admin,sdk,mobile,extension]
21    #[serde(rename = "allowed-client-type", skip_serializing_if = "Option::is_none")]
22    pub allowed_client_type: Option<Vec<String>>,
23    /// Comma separated list of allowed CORS domains to be validated as part of the authentication flow.
24    #[serde(rename = "allowed-cors", skip_serializing_if = "Option::is_none")]
25    pub allowed_cors: Option<String>,
26    /// Subclaims to include in audit logs, e.g \"--audit-logs-claims email --audit-logs-claims username\"
27    #[serde(rename = "audit-logs-claims", skip_serializing_if = "Option::is_none")]
28    pub audit_logs_claims: Option<Vec<String>>,
29    /// A list of names. At least one must exist in the Common Name. Supports globbing.
30    #[serde(rename = "bound-common-names", skip_serializing_if = "Option::is_none")]
31    pub bound_common_names: Option<Vec<String>>,
32    /// A list of DNS names. At least one must exist in the SANs. Supports globbing.
33    #[serde(rename = "bound-dns-sans", skip_serializing_if = "Option::is_none")]
34    pub bound_dns_sans: Option<Vec<String>>,
35    /// A list of Email Addresses. At least one must exist in the SANs. Supports globbing.
36    #[serde(rename = "bound-email-sans", skip_serializing_if = "Option::is_none")]
37    pub bound_email_sans: Option<Vec<String>>,
38    /// A list of extensions formatted as \"oid:value\". Expects the extension value to be some type of ASN1 encoded string. All values much match. Supports globbing on \"value\".
39    #[serde(rename = "bound-extensions", skip_serializing_if = "Option::is_none")]
40    pub bound_extensions: Option<Vec<String>>,
41    /// A CIDR whitelist with the IPs that the access is restricted to
42    #[serde(rename = "bound-ips", skip_serializing_if = "Option::is_none")]
43    pub bound_ips: Option<Vec<String>>,
44    /// A list of Organizational Units names. At least one must exist in the OU field.
45    #[serde(rename = "bound-organizational-units", skip_serializing_if = "Option::is_none")]
46    pub bound_organizational_units: Option<Vec<String>>,
47    /// A list of URIs. At least one must exist in the SANs. Supports globbing.
48    #[serde(rename = "bound-uri-sans", skip_serializing_if = "Option::is_none")]
49    pub bound_uri_sans: Option<Vec<String>>,
50    /// The certificate data in base64, if no file was provided
51    #[serde(rename = "certificate-data", skip_serializing_if = "Option::is_none")]
52    pub certificate_data: Option<String>,
53    /// Protection from accidental deletion of this object [true/false]
54    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
55    pub delete_protection: Option<String>,
56    /// Auth Method description
57    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
58    pub description: Option<String>,
59    /// How many days before the expiration of the auth method would you like to be notified.
60    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
61    pub expiration_event_in: Option<Vec<String>>,
62    /// if true: enforce role-association must include sub claims
63    #[serde(rename = "force-sub-claims", skip_serializing_if = "Option::is_none")]
64    pub force_sub_claims: Option<bool>,
65    /// A CIDR whitelist with the GW IPs that the access is restricted to
66    #[serde(rename = "gw-bound-ips", skip_serializing_if = "Option::is_none")]
67    pub gw_bound_ips: Option<Vec<String>>,
68    /// Set output format to JSON
69    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
70    pub json: Option<bool>,
71    /// Jwt TTL
72    #[serde(rename = "jwt-ttl", skip_serializing_if = "Option::is_none")]
73    pub jwt_ttl: Option<i64>,
74    /// Auth Method name
75    #[serde(rename = "name")]
76    pub name: String,
77    /// Auth Method new name
78    #[serde(rename = "new-name", skip_serializing_if = "Option::is_none")]
79    pub new_name: Option<String>,
80    /// Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
81    #[serde(rename = "product-type", skip_serializing_if = "Option::is_none")]
82    pub product_type: Option<Vec<String>>,
83    /// Require certificate CRL distribution points (CDP) and enforce CRL validation during authentication.
84    #[serde(rename = "require-crl-dp", skip_serializing_if = "Option::is_none")]
85    pub require_crl_dp: Option<bool>,
86    /// A list of revoked cert ids
87    #[serde(rename = "revoked-cert-ids", skip_serializing_if = "Option::is_none")]
88    pub revoked_cert_ids: Option<Vec<String>>,
89    /// Authentication token (see `/auth` and `/configure`)
90    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
91    pub token: Option<String>,
92    /// The universal identity token, Required only for universal_identity authentication
93    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
94    pub uid_token: Option<String>,
95    /// A unique identifier (ID) value should be configured, such as common_name or organizational_unit Whenever a user logs in with a token, these authentication types issue a \"sub claim\" that contains details uniquely identifying that user. This sub claim includes a key containing the ID value that you configured, and is used to distinguish between different users from within the same organization.
96    #[serde(rename = "unique-identifier")]
97    pub unique_identifier: String,
98}
99
100impl AuthMethodUpdateCert {
101    /// authMethodUpdateCert is a command that updates a new auth method that will be able to authenticate using a client certificate
102    pub fn new(name: String, unique_identifier: String) -> AuthMethodUpdateCert {
103        AuthMethodUpdateCert {
104            access_expires: None,
105            allowed_client_type: None,
106            allowed_cors: None,
107            audit_logs_claims: None,
108            bound_common_names: None,
109            bound_dns_sans: None,
110            bound_email_sans: None,
111            bound_extensions: None,
112            bound_ips: None,
113            bound_organizational_units: None,
114            bound_uri_sans: None,
115            certificate_data: None,
116            delete_protection: None,
117            description: None,
118            expiration_event_in: None,
119            force_sub_claims: None,
120            gw_bound_ips: None,
121            json: None,
122            jwt_ttl: None,
123            name,
124            new_name: None,
125            product_type: None,
126            require_crl_dp: None,
127            revoked_cert_ids: None,
128            token: None,
129            uid_token: None,
130            unique_identifier,
131        }
132    }
133}
134