#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Idp {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub details: ::core::option::Option<super::super::v1::ObjectDetails>,
#[prost(enumeration="IdpState", tag="3")]
pub state: i32,
#[prost(string, tag="4")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration="IdpStylingType", tag="5")]
pub styling_type: i32,
#[prost(enumeration="IdpOwnerType", tag="6")]
pub owner: i32,
#[prost(bool, tag="8")]
pub auto_register: bool,
#[prost(oneof="idp::Config", tags="7, 9")]
pub config: ::core::option::Option<idp::Config>,
}
pub mod idp {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag="7")]
OidcConfig(super::OidcConfig),
#[prost(message, tag="9")]
JwtConfig(super::JwtConfig),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpUserLink {
#[prost(string, tag="1")]
pub user_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub idp_id: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub idp_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub provided_user_id: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub provided_user_name: ::prost::alloc::string::String,
#[prost(enumeration="IdpType", tag="6")]
pub idp_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpLoginPolicyLink {
#[prost(string, tag="1")]
pub idp_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub idp_name: ::prost::alloc::string::String,
#[prost(enumeration="IdpType", tag="3")]
pub idp_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OidcConfig {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub issuer: ::prost::alloc::string::String,
#[prost(string, repeated, tag="3")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration="OidcMappingField", tag="4")]
pub display_name_mapping: i32,
#[prost(enumeration="OidcMappingField", tag="5")]
pub username_mapping: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JwtConfig {
#[prost(string, tag="1")]
pub jwt_endpoint: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub issuer: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub keys_endpoint: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub header_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpidQuery {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpNameQuery {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")]
pub method: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpOwnerTypeQuery {
#[prost(enumeration="IdpOwnerType", tag="1")]
pub owner_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Provider {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub details: ::core::option::Option<super::super::v1::ObjectDetails>,
#[prost(enumeration="IdpState", tag="3")]
pub state: i32,
#[prost(string, tag="4")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration="IdpOwnerType", tag="5")]
pub owner: i32,
#[prost(enumeration="ProviderType", tag="6")]
pub r#type: i32,
#[prost(message, optional, tag="7")]
pub config: ::core::option::Option<ProviderConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProviderConfig {
#[prost(message, optional, tag="1")]
pub options: ::core::option::Option<Options>,
#[prost(oneof="provider_config::Config", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
pub config: ::core::option::Option<provider_config::Config>,
}
pub mod provider_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag="2")]
Ldap(super::LdapConfig),
#[prost(message, tag="3")]
Google(super::GoogleConfig),
#[prost(message, tag="4")]
Oauth(super::OAuthConfig),
#[prost(message, tag="5")]
Oidc(super::GenericOidcConfig),
#[prost(message, tag="6")]
Jwt(super::JwtConfig),
#[prost(message, tag="7")]
Github(super::GitHubConfig),
#[prost(message, tag="8")]
GithubEs(super::GitHubEnterpriseServerConfig),
#[prost(message, tag="9")]
Gitlab(super::GitLabConfig),
#[prost(message, tag="10")]
GitlabSelfHosted(super::GitLabSelfHostedConfig),
#[prost(message, tag="11")]
AzureAd(super::AzureAdConfig),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OAuthConfig {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub authorization_endpoint: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub token_endpoint: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub user_endpoint: ::prost::alloc::string::String,
#[prost(string, repeated, tag="5")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag="6")]
pub id_attribute: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenericOidcConfig {
#[prost(string, tag="1")]
pub issuer: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag="3")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag="4")]
pub is_id_token_mapping: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitHubConfig {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag="2")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitHubEnterpriseServerConfig {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub authorization_endpoint: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub token_endpoint: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub user_endpoint: ::prost::alloc::string::String,
#[prost(string, repeated, tag="5")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GoogleConfig {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag="2")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitLabConfig {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag="2")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitLabSelfHostedConfig {
#[prost(string, tag="1")]
pub issuer: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag="3")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LdapConfig {
#[prost(string, repeated, tag="1")]
pub servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag="2")]
pub start_tls: bool,
#[prost(string, tag="3")]
pub base_dn: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub bind_dn: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub user_base: ::prost::alloc::string::String,
#[prost(string, repeated, tag="6")]
pub user_object_classes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag="7")]
pub user_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag="8")]
pub timeout: ::core::option::Option<::pbjson_types::Duration>,
#[prost(message, optional, tag="9")]
pub attributes: ::core::option::Option<LdapAttributes>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AzureAdConfig {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub tenant: ::core::option::Option<AzureAdTenant>,
#[prost(bool, tag="3")]
pub email_verified: bool,
#[prost(string, repeated, tag="4")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Options {
#[prost(bool, tag="1")]
pub is_linking_allowed: bool,
#[prost(bool, tag="2")]
pub is_creation_allowed: bool,
#[prost(bool, tag="3")]
pub is_auto_creation: bool,
#[prost(bool, tag="4")]
pub is_auto_update: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LdapAttributes {
#[prost(string, tag="1")]
pub id_attribute: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub first_name_attribute: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub last_name_attribute: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub display_name_attribute: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub nick_name_attribute: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub preferred_username_attribute: ::prost::alloc::string::String,
#[prost(string, tag="7")]
pub email_attribute: ::prost::alloc::string::String,
#[prost(string, tag="8")]
pub email_verified_attribute: ::prost::alloc::string::String,
#[prost(string, tag="9")]
pub phone_attribute: ::prost::alloc::string::String,
#[prost(string, tag="10")]
pub phone_verified_attribute: ::prost::alloc::string::String,
#[prost(string, tag="11")]
pub preferred_language_attribute: ::prost::alloc::string::String,
#[prost(string, tag="12")]
pub avatar_url_attribute: ::prost::alloc::string::String,
#[prost(string, tag="13")]
pub profile_attribute: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AzureAdTenant {
#[prost(oneof="azure_ad_tenant::Type", tags="1, 2")]
pub r#type: ::core::option::Option<azure_ad_tenant::Type>,
}
pub mod azure_ad_tenant {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(enumeration="super::AzureAdTenantType", tag="1")]
TenantType(i32),
#[prost(string, tag="2")]
TenantId(::prost::alloc::string::String),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IdpState {
Unspecified = 0,
Active = 1,
Inactive = 2,
}
impl IdpState {
pub fn as_str_name(&self) -> &'static str {
match self {
IdpState::Unspecified => "IDP_STATE_UNSPECIFIED",
IdpState::Active => "IDP_STATE_ACTIVE",
IdpState::Inactive => "IDP_STATE_INACTIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IDP_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"IDP_STATE_ACTIVE" => Some(Self::Active),
"IDP_STATE_INACTIVE" => Some(Self::Inactive),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IdpStylingType {
StylingTypeUnspecified = 0,
StylingTypeGoogle = 1,
}
impl IdpStylingType {
pub fn as_str_name(&self) -> &'static str {
match self {
IdpStylingType::StylingTypeUnspecified => "STYLING_TYPE_UNSPECIFIED",
IdpStylingType::StylingTypeGoogle => "STYLING_TYPE_GOOGLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STYLING_TYPE_UNSPECIFIED" => Some(Self::StylingTypeUnspecified),
"STYLING_TYPE_GOOGLE" => Some(Self::StylingTypeGoogle),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IdpType {
Unspecified = 0,
Oidc = 1,
Jwt = 3,
}
impl IdpType {
pub fn as_str_name(&self) -> &'static str {
match self {
IdpType::Unspecified => "IDP_TYPE_UNSPECIFIED",
IdpType::Oidc => "IDP_TYPE_OIDC",
IdpType::Jwt => "IDP_TYPE_JWT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IDP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IDP_TYPE_OIDC" => Some(Self::Oidc),
"IDP_TYPE_JWT" => Some(Self::Jwt),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IdpOwnerType {
Unspecified = 0,
System = 1,
Org = 2,
}
impl IdpOwnerType {
pub fn as_str_name(&self) -> &'static str {
match self {
IdpOwnerType::Unspecified => "IDP_OWNER_TYPE_UNSPECIFIED",
IdpOwnerType::System => "IDP_OWNER_TYPE_SYSTEM",
IdpOwnerType::Org => "IDP_OWNER_TYPE_ORG",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IDP_OWNER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IDP_OWNER_TYPE_SYSTEM" => Some(Self::System),
"IDP_OWNER_TYPE_ORG" => Some(Self::Org),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OidcMappingField {
Unspecified = 0,
PreferredUsername = 1,
Email = 2,
}
impl OidcMappingField {
pub fn as_str_name(&self) -> &'static str {
match self {
OidcMappingField::Unspecified => "OIDC_MAPPING_FIELD_UNSPECIFIED",
OidcMappingField::PreferredUsername => "OIDC_MAPPING_FIELD_PREFERRED_USERNAME",
OidcMappingField::Email => "OIDC_MAPPING_FIELD_EMAIL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OIDC_MAPPING_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
"OIDC_MAPPING_FIELD_PREFERRED_USERNAME" => Some(Self::PreferredUsername),
"OIDC_MAPPING_FIELD_EMAIL" => Some(Self::Email),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IdpFieldName {
Unspecified = 0,
Name = 1,
}
impl IdpFieldName {
pub fn as_str_name(&self) -> &'static str {
match self {
IdpFieldName::Unspecified => "IDP_FIELD_NAME_UNSPECIFIED",
IdpFieldName::Name => "IDP_FIELD_NAME_NAME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IDP_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified),
"IDP_FIELD_NAME_NAME" => Some(Self::Name),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProviderType {
Unspecified = 0,
Oidc = 1,
Jwt = 2,
Ldap = 3,
Oauth = 4,
AzureAd = 5,
Github = 6,
GithubEs = 7,
Gitlab = 8,
GitlabSelfHosted = 9,
Google = 10,
}
impl ProviderType {
pub fn as_str_name(&self) -> &'static str {
match self {
ProviderType::Unspecified => "PROVIDER_TYPE_UNSPECIFIED",
ProviderType::Oidc => "PROVIDER_TYPE_OIDC",
ProviderType::Jwt => "PROVIDER_TYPE_JWT",
ProviderType::Ldap => "PROVIDER_TYPE_LDAP",
ProviderType::Oauth => "PROVIDER_TYPE_OAUTH",
ProviderType::AzureAd => "PROVIDER_TYPE_AZURE_AD",
ProviderType::Github => "PROVIDER_TYPE_GITHUB",
ProviderType::GithubEs => "PROVIDER_TYPE_GITHUB_ES",
ProviderType::Gitlab => "PROVIDER_TYPE_GITLAB",
ProviderType::GitlabSelfHosted => "PROVIDER_TYPE_GITLAB_SELF_HOSTED",
ProviderType::Google => "PROVIDER_TYPE_GOOGLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PROVIDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PROVIDER_TYPE_OIDC" => Some(Self::Oidc),
"PROVIDER_TYPE_JWT" => Some(Self::Jwt),
"PROVIDER_TYPE_LDAP" => Some(Self::Ldap),
"PROVIDER_TYPE_OAUTH" => Some(Self::Oauth),
"PROVIDER_TYPE_AZURE_AD" => Some(Self::AzureAd),
"PROVIDER_TYPE_GITHUB" => Some(Self::Github),
"PROVIDER_TYPE_GITHUB_ES" => Some(Self::GithubEs),
"PROVIDER_TYPE_GITLAB" => Some(Self::Gitlab),
"PROVIDER_TYPE_GITLAB_SELF_HOSTED" => Some(Self::GitlabSelfHosted),
"PROVIDER_TYPE_GOOGLE" => Some(Self::Google),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AzureAdTenantType {
Common = 0,
Organisations = 1,
Consumers = 2,
}
impl AzureAdTenantType {
pub fn as_str_name(&self) -> &'static str {
match self {
AzureAdTenantType::Common => "AZURE_AD_TENANT_TYPE_COMMON",
AzureAdTenantType::Organisations => "AZURE_AD_TENANT_TYPE_ORGANISATIONS",
AzureAdTenantType::Consumers => "AZURE_AD_TENANT_TYPE_CONSUMERS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AZURE_AD_TENANT_TYPE_COMMON" => Some(Self::Common),
"AZURE_AD_TENANT_TYPE_ORGANISATIONS" => Some(Self::Organisations),
"AZURE_AD_TENANT_TYPE_CONSUMERS" => Some(Self::Consumers),
_ => None,
}
}
}