diff --git a/apis/identityprovider/v1alpha1/zz_generated.conversion_hubs.go b/apis/identityprovider/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..70e4408 --- /dev/null +++ b/apis/identityprovider/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *IdentityProviderMapper) Hub() {} diff --git a/apis/identityprovider/v1alpha1/zz_generated.deepcopy.go b/apis/identityprovider/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..7e32bc4 --- /dev/null +++ b/apis/identityprovider/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,265 @@ +//go:build !ignore_autogenerated + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IdentityProviderMapper) DeepCopyInto(out *IdentityProviderMapper) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderMapper. +func (in *IdentityProviderMapper) DeepCopy() *IdentityProviderMapper { + if in == nil { + return nil + } + out := new(IdentityProviderMapper) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IdentityProviderMapper) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IdentityProviderMapperInitParameters) DeepCopyInto(out *IdentityProviderMapperInitParameters) { + *out = *in + if in.ExtraConfig != nil { + in, out := &in.ExtraConfig, &out.ExtraConfig + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.IdentityProviderAlias != nil { + in, out := &in.IdentityProviderAlias, &out.IdentityProviderAlias + *out = new(string) + **out = **in + } + if in.IdentityProviderMapper != nil { + in, out := &in.IdentityProviderMapper, &out.IdentityProviderMapper + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Realm != nil { + in, out := &in.Realm, &out.Realm + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderMapperInitParameters. +func (in *IdentityProviderMapperInitParameters) DeepCopy() *IdentityProviderMapperInitParameters { + if in == nil { + return nil + } + out := new(IdentityProviderMapperInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IdentityProviderMapperList) DeepCopyInto(out *IdentityProviderMapperList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IdentityProviderMapper, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderMapperList. +func (in *IdentityProviderMapperList) DeepCopy() *IdentityProviderMapperList { + if in == nil { + return nil + } + out := new(IdentityProviderMapperList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IdentityProviderMapperList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IdentityProviderMapperObservation) DeepCopyInto(out *IdentityProviderMapperObservation) { + *out = *in + if in.ExtraConfig != nil { + in, out := &in.ExtraConfig, &out.ExtraConfig + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IdentityProviderAlias != nil { + in, out := &in.IdentityProviderAlias, &out.IdentityProviderAlias + *out = new(string) + **out = **in + } + if in.IdentityProviderMapper != nil { + in, out := &in.IdentityProviderMapper, &out.IdentityProviderMapper + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Realm != nil { + in, out := &in.Realm, &out.Realm + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderMapperObservation. +func (in *IdentityProviderMapperObservation) DeepCopy() *IdentityProviderMapperObservation { + if in == nil { + return nil + } + out := new(IdentityProviderMapperObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IdentityProviderMapperParameters) DeepCopyInto(out *IdentityProviderMapperParameters) { + *out = *in + if in.ExtraConfig != nil { + in, out := &in.ExtraConfig, &out.ExtraConfig + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.IdentityProviderAlias != nil { + in, out := &in.IdentityProviderAlias, &out.IdentityProviderAlias + *out = new(string) + **out = **in + } + if in.IdentityProviderMapper != nil { + in, out := &in.IdentityProviderMapper, &out.IdentityProviderMapper + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Realm != nil { + in, out := &in.Realm, &out.Realm + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderMapperParameters. +func (in *IdentityProviderMapperParameters) DeepCopy() *IdentityProviderMapperParameters { + if in == nil { + return nil + } + out := new(IdentityProviderMapperParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IdentityProviderMapperSpec) DeepCopyInto(out *IdentityProviderMapperSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderMapperSpec. +func (in *IdentityProviderMapperSpec) DeepCopy() *IdentityProviderMapperSpec { + if in == nil { + return nil + } + out := new(IdentityProviderMapperSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IdentityProviderMapperStatus) DeepCopyInto(out *IdentityProviderMapperStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderMapperStatus. +func (in *IdentityProviderMapperStatus) DeepCopy() *IdentityProviderMapperStatus { + if in == nil { + return nil + } + out := new(IdentityProviderMapperStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/identityprovider/v1alpha1/zz_generated.managed.go b/apis/identityprovider/v1alpha1/zz_generated.managed.go new file mode 100644 index 0000000..d435a43 --- /dev/null +++ b/apis/identityprovider/v1alpha1/zz_generated.managed.go @@ -0,0 +1,68 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this IdentityProviderMapper. +func (mg *IdentityProviderMapper) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/identityprovider/v1alpha1/zz_generated.managedlist.go b/apis/identityprovider/v1alpha1/zz_generated.managedlist.go new file mode 100644 index 0000000..2b39eec --- /dev/null +++ b/apis/identityprovider/v1alpha1/zz_generated.managedlist.go @@ -0,0 +1,17 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this IdentityProviderMapperList. +func (l *IdentityProviderMapperList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/identityprovider/v1alpha1/zz_groupversion_info.go b/apis/identityprovider/v1alpha1/zz_groupversion_info.go new file mode 100755 index 0000000..d9878e0 --- /dev/null +++ b/apis/identityprovider/v1alpha1/zz_groupversion_info.go @@ -0,0 +1,36 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=identityprovider.keycloak.crossplane.io +// +versionName=v1alpha1 +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "identityprovider.keycloak.crossplane.io" + CRDVersion = "v1alpha1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/identityprovider/v1alpha1/zz_identityprovidermapper_terraformed.go b/apis/identityprovider/v1alpha1/zz_identityprovidermapper_terraformed.go new file mode 100755 index 0000000..4c097d8 --- /dev/null +++ b/apis/identityprovider/v1alpha1/zz_identityprovidermapper_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this IdentityProviderMapper +func (mg *IdentityProviderMapper) GetTerraformResourceType() string { + return "keycloak_custom_identity_provider_mapper" +} + +// GetConnectionDetailsMapping for this IdentityProviderMapper +func (tr *IdentityProviderMapper) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this IdentityProviderMapper +func (tr *IdentityProviderMapper) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this IdentityProviderMapper +func (tr *IdentityProviderMapper) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this IdentityProviderMapper +func (tr *IdentityProviderMapper) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this IdentityProviderMapper +func (tr *IdentityProviderMapper) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this IdentityProviderMapper +func (tr *IdentityProviderMapper) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this IdentityProviderMapper +func (tr *IdentityProviderMapper) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this IdentityProviderMapper +func (tr *IdentityProviderMapper) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this IdentityProviderMapper using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *IdentityProviderMapper) LateInitialize(attrs []byte) (bool, error) { + params := &IdentityProviderMapperParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *IdentityProviderMapper) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/identityprovider/v1alpha1/zz_identityprovidermapper_types.go b/apis/identityprovider/v1alpha1/zz_identityprovidermapper_types.go new file mode 100755 index 0000000..0bc9ced --- /dev/null +++ b/apis/identityprovider/v1alpha1/zz_identityprovidermapper_types.go @@ -0,0 +1,159 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type IdentityProviderMapperInitParameters struct { + + // Key/value attributes to add to the identity provider mapper model that is persisted to Keycloak. This can be used to extend the base model with new Keycloak features. + // +mapType=granular + ExtraConfig map[string]*string `json:"extraConfig,omitempty" tf:"extra_config,omitempty"` + + // The alias of the associated identity provider. + // IDP Alias + IdentityProviderAlias *string `json:"identityProviderAlias,omitempty" tf:"identity_provider_alias,omitempty"` + + // The type of the identity provider mapper. This can be a format string that includes a %s - this will be replaced by the provider id. + // IDP Mapper Type + IdentityProviderMapper *string `json:"identityProviderMapper,omitempty" tf:"identity_provider_mapper,omitempty"` + + // The name of the mapper. + // IDP Mapper Name + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The name of the realm. + // Realm Name + Realm *string `json:"realm,omitempty" tf:"realm,omitempty"` +} + +type IdentityProviderMapperObservation struct { + + // Key/value attributes to add to the identity provider mapper model that is persisted to Keycloak. This can be used to extend the base model with new Keycloak features. + // +mapType=granular + ExtraConfig map[string]*string `json:"extraConfig,omitempty" tf:"extra_config,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The alias of the associated identity provider. + // IDP Alias + IdentityProviderAlias *string `json:"identityProviderAlias,omitempty" tf:"identity_provider_alias,omitempty"` + + // The type of the identity provider mapper. This can be a format string that includes a %s - this will be replaced by the provider id. + // IDP Mapper Type + IdentityProviderMapper *string `json:"identityProviderMapper,omitempty" tf:"identity_provider_mapper,omitempty"` + + // The name of the mapper. + // IDP Mapper Name + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The name of the realm. + // Realm Name + Realm *string `json:"realm,omitempty" tf:"realm,omitempty"` +} + +type IdentityProviderMapperParameters struct { + + // Key/value attributes to add to the identity provider mapper model that is persisted to Keycloak. This can be used to extend the base model with new Keycloak features. + // +kubebuilder:validation:Optional + // +mapType=granular + ExtraConfig map[string]*string `json:"extraConfig,omitempty" tf:"extra_config,omitempty"` + + // The alias of the associated identity provider. + // IDP Alias + // +kubebuilder:validation:Optional + IdentityProviderAlias *string `json:"identityProviderAlias,omitempty" tf:"identity_provider_alias,omitempty"` + + // The type of the identity provider mapper. This can be a format string that includes a %s - this will be replaced by the provider id. + // IDP Mapper Type + // +kubebuilder:validation:Optional + IdentityProviderMapper *string `json:"identityProviderMapper,omitempty" tf:"identity_provider_mapper,omitempty"` + + // The name of the mapper. + // IDP Mapper Name + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The name of the realm. + // Realm Name + // +kubebuilder:validation:Optional + Realm *string `json:"realm,omitempty" tf:"realm,omitempty"` +} + +// IdentityProviderMapperSpec defines the desired state of IdentityProviderMapper +type IdentityProviderMapperSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider IdentityProviderMapperParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider IdentityProviderMapperInitParameters `json:"initProvider,omitempty"` +} + +// IdentityProviderMapperStatus defines the observed state of IdentityProviderMapper. +type IdentityProviderMapperStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider IdentityProviderMapperObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// IdentityProviderMapper is the Schema for the IdentityProviderMappers API. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,keycloak} +type IdentityProviderMapper struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.identityProviderAlias) || (has(self.initProvider) && has(self.initProvider.identityProviderAlias))",message="spec.forProvider.identityProviderAlias is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.identityProviderMapper) || (has(self.initProvider) && has(self.initProvider.identityProviderMapper))",message="spec.forProvider.identityProviderMapper is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.realm) || (has(self.initProvider) && has(self.initProvider.realm))",message="spec.forProvider.realm is a required parameter" + Spec IdentityProviderMapperSpec `json:"spec"` + Status IdentityProviderMapperStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// IdentityProviderMapperList contains a list of IdentityProviderMappers +type IdentityProviderMapperList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []IdentityProviderMapper `json:"items"` +} + +// Repository type metadata. +var ( + IdentityProviderMapper_Kind = "IdentityProviderMapper" + IdentityProviderMapper_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: IdentityProviderMapper_Kind}.String() + IdentityProviderMapper_KindAPIVersion = IdentityProviderMapper_Kind + "." + CRDGroupVersion.String() + IdentityProviderMapper_GroupVersionKind = CRDGroupVersion.WithKind(IdentityProviderMapper_Kind) +) + +func init() { + SchemeBuilder.Register(&IdentityProviderMapper{}, &IdentityProviderMapperList{}) +} diff --git a/apis/zz_register.go b/apis/zz_register.go index 6bdcbf1..44aa49c 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -17,6 +17,7 @@ import ( v1alpha1 "github.com/crossplane-contrib/provider-keycloak/apis/client/v1alpha1" v1alpha1defaults "github.com/crossplane-contrib/provider-keycloak/apis/defaults/v1alpha1" v1alpha1group "github.com/crossplane-contrib/provider-keycloak/apis/group/v1alpha1" + v1alpha1identityprovider "github.com/crossplane-contrib/provider-keycloak/apis/identityprovider/v1alpha1" v1alpha1oidc "github.com/crossplane-contrib/provider-keycloak/apis/oidc/v1alpha1" v1alpha1openidclient "github.com/crossplane-contrib/provider-keycloak/apis/openidclient/v1alpha1" v1alpha1openidgroup "github.com/crossplane-contrib/provider-keycloak/apis/openidgroup/v1alpha1" @@ -35,6 +36,7 @@ func init() { v1alpha1.SchemeBuilder.AddToScheme, v1alpha1defaults.SchemeBuilder.AddToScheme, v1alpha1group.SchemeBuilder.AddToScheme, + v1alpha1identityprovider.SchemeBuilder.AddToScheme, v1alpha1oidc.SchemeBuilder.AddToScheme, v1alpha1openidclient.SchemeBuilder.AddToScheme, v1alpha1openidgroup.SchemeBuilder.AddToScheme, diff --git a/config/external_name.go b/config/external_name.go index 11e2df8..5d9293a 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -35,6 +35,7 @@ var ExternalNameConfigs = map[string]config.ExternalName{ "keycloak_user": config.IdentifierFromProvider, "keycloak_oidc_identity_provider": config.IdentifierFromProvider, "keycloak_saml_identity_provider": config.IdentifierFromProvider, + "keycloak_custom_identity_provider_mapper": config.IdentifierFromProvider, "keycloak_saml_client": config.IdentifierFromProvider, "keycloak_saml_client_default_scopes": config.IdentifierFromProvider, "keycloak_saml_client_scope": config.IdentifierFromProvider, diff --git a/config/identityprovider/config.go b/config/identityprovider/config.go new file mode 100644 index 0000000..a214b68 --- /dev/null +++ b/config/identityprovider/config.go @@ -0,0 +1,15 @@ +package identityprovider + +import "github.com/crossplane/upjet/pkg/config" + +const ( + // Group is the short group for this provider. + Group = "identityprovider" +) + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("keycloak_custom_identity_provider_mapper", func(r *config.Resource) { + r.ShortGroup = Group + }) +} diff --git a/config/provider.go b/config/provider.go index 0e9b051..c14fc15 100644 --- a/config/provider.go +++ b/config/provider.go @@ -13,6 +13,7 @@ import ( "github.com/crossplane-contrib/provider-keycloak/config/defaults" "github.com/crossplane-contrib/provider-keycloak/config/group" + "github.com/crossplane-contrib/provider-keycloak/config/identityprovider" "github.com/crossplane-contrib/provider-keycloak/config/mapper" "github.com/crossplane-contrib/provider-keycloak/config/oidc" "github.com/crossplane-contrib/provider-keycloak/config/openidclient" @@ -60,6 +61,7 @@ func GetProvider() *ujconfig.Provider { oidc.Configure, saml.Configure, samlclient.Configure, + identityprovider.Configure, } { configure(pc) } diff --git a/examples-generated/identityprovider/v1alpha1/identityprovidermapper.yaml b/examples-generated/identityprovider/v1alpha1/identityprovidermapper.yaml new file mode 100644 index 0000000..259fcd1 --- /dev/null +++ b/examples-generated/identityprovider/v1alpha1/identityprovidermapper.yaml @@ -0,0 +1,60 @@ +apiVersion: identityprovider.keycloak.crossplane.io/v1alpha1 +kind: IdentityProviderMapper +metadata: + annotations: + meta.upbound.io/example-id: identityprovider/v1alpha1/identityprovidermapper + labels: + testing.upbound.io/example-name: oidc + name: oidc +spec: + forProvider: + extraConfig: + Claim: my-email-claim + UserAttribute: email + syncMode: INHERIT + identityProviderAlias: my-idp + identityProviderMapper: '%s-user-attribute-idp-mapper' + name: email-attribute-importer + realm: ${keycloak_realm.realm.id} + +--- + +apiVersion: oidc.keycloak.crossplane.io/v1alpha1 +kind: IdentityProvider +metadata: + annotations: + meta.upbound.io/example-id: identityprovider/v1alpha1/identityprovidermapper + labels: + testing.upbound.io/example-name: oidc + name: oidc +spec: + forProvider: + alias: oidc + authorizationUrl: https://example.com/auth + clientIdSelector: + matchLabels: + testing.upbound.io/example-name: example + clientSecretSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + defaultScopes: openid random profile + realmSelector: + matchLabels: + testing.upbound.io/example-name: realm + tokenUrl: https://example.com/token + +--- + +apiVersion: realm.keycloak.crossplane.io/v1alpha1 +kind: Realm +metadata: + annotations: + meta.upbound.io/example-id: identityprovider/v1alpha1/identityprovidermapper + labels: + testing.upbound.io/example-name: realm + name: realm +spec: + forProvider: + enabled: true + realm: my-realm diff --git a/internal/controller/identityprovider/identityprovidermapper/zz_controller.go b/internal/controller/identityprovider/identityprovidermapper/zz_controller.go new file mode 100755 index 0000000..48d2c3f --- /dev/null +++ b/internal/controller/identityprovider/identityprovidermapper/zz_controller.go @@ -0,0 +1,78 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package identityprovidermapper + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/crossplane-contrib/provider-keycloak/apis/identityprovider/v1alpha1" + features "github.com/crossplane-contrib/provider-keycloak/internal/features" +) + +// Setup adds a controller that reconciles IdentityProviderMapper managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.IdentityProviderMapper_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.IdentityProviderMapper_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.IdentityProviderMapper_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["keycloak_custom_identity_provider_mapper"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + + // register webhooks for the kind v1alpha1.IdentityProviderMapper + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.IdentityProviderMapper{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.IdentityProviderMapper") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.IdentityProviderMapper_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.IdentityProviderMapper{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 81016bb..5bf837d 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -16,6 +16,7 @@ import ( memberships "github.com/crossplane-contrib/provider-keycloak/internal/controller/group/memberships" permissions "github.com/crossplane-contrib/provider-keycloak/internal/controller/group/permissions" rolesgroup "github.com/crossplane-contrib/provider-keycloak/internal/controller/group/roles" + identityprovidermapper "github.com/crossplane-contrib/provider-keycloak/internal/controller/identityprovider/identityprovidermapper" identityprovider "github.com/crossplane-contrib/provider-keycloak/internal/controller/oidc/identityprovider" client "github.com/crossplane-contrib/provider-keycloak/internal/controller/openidclient/client" clientclientpolicy "github.com/crossplane-contrib/provider-keycloak/internal/controller/openidclient/clientclientpolicy" @@ -53,6 +54,7 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { memberships.Setup, permissions.Setup, rolesgroup.Setup, + identityprovidermapper.Setup, identityprovider.Setup, client.Setup, clientclientpolicy.Setup, diff --git a/package/crds/identityprovider.keycloak.crossplane.io_identityprovidermappers.yaml b/package/crds/identityprovider.keycloak.crossplane.io_identityprovidermappers.yaml new file mode 100644 index 0000000..30d7352 --- /dev/null +++ b/package/crds/identityprovider.keycloak.crossplane.io_identityprovidermappers.yaml @@ -0,0 +1,414 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: identityprovidermappers.identityprovider.keycloak.crossplane.io +spec: + group: identityprovider.keycloak.crossplane.io + names: + categories: + - crossplane + - managed + - keycloak + kind: IdentityProviderMapper + listKind: IdentityProviderMapperList + plural: identityprovidermappers + singular: identityprovidermapper + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: IdentityProviderMapper is the Schema for the IdentityProviderMappers + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: IdentityProviderMapperSpec defines the desired state of IdentityProviderMapper + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + extraConfig: + additionalProperties: + type: string + description: Key/value attributes to add to the identity provider + mapper model that is persisted to Keycloak. This can be used + to extend the base model with new Keycloak features. + type: object + x-kubernetes-map-type: granular + identityProviderAlias: + description: |- + The alias of the associated identity provider. + IDP Alias + type: string + identityProviderMapper: + description: |- + The type of the identity provider mapper. This can be a format string that includes a %s - this will be replaced by the provider id. + IDP Mapper Type + type: string + name: + description: |- + The name of the mapper. + IDP Mapper Name + type: string + realm: + description: |- + The name of the realm. + Realm Name + type: string + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + extraConfig: + additionalProperties: + type: string + description: Key/value attributes to add to the identity provider + mapper model that is persisted to Keycloak. This can be used + to extend the base model with new Keycloak features. + type: object + x-kubernetes-map-type: granular + identityProviderAlias: + description: |- + The alias of the associated identity provider. + IDP Alias + type: string + identityProviderMapper: + description: |- + The type of the identity provider mapper. This can be a format string that includes a %s - this will be replaced by the provider id. + IDP Mapper Type + type: string + name: + description: |- + The name of the mapper. + IDP Mapper Name + type: string + realm: + description: |- + The name of the realm. + Realm Name + type: string + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.identityProviderAlias is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.identityProviderAlias) + || (has(self.initProvider) && has(self.initProvider.identityProviderAlias))' + - message: spec.forProvider.identityProviderMapper is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.identityProviderMapper) + || (has(self.initProvider) && has(self.initProvider.identityProviderMapper))' + - message: spec.forProvider.name is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.name) + || (has(self.initProvider) && has(self.initProvider.name))' + - message: spec.forProvider.realm is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.realm) + || (has(self.initProvider) && has(self.initProvider.realm))' + status: + description: IdentityProviderMapperStatus defines the observed state of + IdentityProviderMapper. + properties: + atProvider: + properties: + extraConfig: + additionalProperties: + type: string + description: Key/value attributes to add to the identity provider + mapper model that is persisted to Keycloak. This can be used + to extend the base model with new Keycloak features. + type: object + x-kubernetes-map-type: granular + id: + type: string + identityProviderAlias: + description: |- + The alias of the associated identity provider. + IDP Alias + type: string + identityProviderMapper: + description: |- + The type of the identity provider mapper. This can be a format string that includes a %s - this will be replaced by the provider id. + IDP Mapper Type + type: string + name: + description: |- + The name of the mapper. + IDP Mapper Name + type: string + realm: + description: |- + The name of the realm. + Realm Name + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}