/
idp_sp_connection_data_source.go
1498 lines (1468 loc) · 61.6 KB
/
idp_sp_connection_data_source.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package idpspconnection
import (
"context"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/types"
client "github.com/pingidentity/pingfederate-go-client/v1200/configurationapi"
datasourceattributecontractfulfillment "github.com/pingidentity/terraform-provider-pingfederate/internal/datasource/common/attributecontractfulfillment"
datasourceattributesources "github.com/pingidentity/terraform-provider-pingfederate/internal/datasource/common/attributesources"
"github.com/pingidentity/terraform-provider-pingfederate/internal/datasource/common/id"
datasourceissuancecriteria "github.com/pingidentity/terraform-provider-pingfederate/internal/datasource/common/issuancecriteria"
datasourceresourcelink "github.com/pingidentity/terraform-provider-pingfederate/internal/datasource/common/resourcelink"
"github.com/pingidentity/terraform-provider-pingfederate/internal/resource/common/pluginconfiguration"
"github.com/pingidentity/terraform-provider-pingfederate/internal/resource/common/resourcelink"
"github.com/pingidentity/terraform-provider-pingfederate/internal/resource/config"
internaltypes "github.com/pingidentity/terraform-provider-pingfederate/internal/types"
)
// Ensure the implementation satisfies the expected interfaces.
var (
_ datasource.DataSource = &idpSpConnectionDataSource{}
_ datasource.DataSourceWithConfigure = &idpSpConnectionDataSource{}
)
var (
targetSettingsDataSourceElemAttrType = types.ObjectType{AttrTypes: map[string]attr.Type{
"name": types.StringType,
"value": types.StringType,
"encrypted_value": types.StringType,
"inherited": types.BoolType,
}}
channelsElemDataSourceAttrType = types.ObjectType{AttrTypes: map[string]attr.Type{
"active": types.BoolType,
"channel_source": types.ObjectType{AttrTypes: channelSourceAttrTypes},
"attribute_mapping": types.SetType{ElemType: attributeMappingElemAttrTypes},
"name": types.StringType,
"max_threads": types.Int64Type,
"timeout": types.Int64Type,
}}
outboundProvisionDataSourceAttrTypes = map[string]attr.Type{
"type": types.StringType,
"target_settings": types.ListType{ElemType: targetSettingsDataSourceElemAttrType},
"custom_schema": types.ObjectType{AttrTypes: customSchemaAttrTypes},
"channels": types.ListType{ElemType: channelsElemDataSourceAttrType},
}
)
// IdpSpConnectionDataSource is a helper function to simplify the provider implementation.
func IdpSpConnectionDataSource() datasource.DataSource {
return &idpSpConnectionDataSource{}
}
// idpSpConnectionDataSource is the datasource implementation.
type idpSpConnectionDataSource struct {
providerConfig internaltypes.ProviderConfiguration
apiClient *client.APIClient
}
// GetSchema defines the schema for the datasource.
func (r *idpSpConnectionDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
certsSchema := schema.ListNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"active_verification_cert": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether this is an active signature verification certificate.",
},
"cert_view": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"crypto_provider": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Cryptographic Provider. This is only applicable if Hybrid HSM mode is true.",
},
"expires": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The end date up until which the item is valid, in ISO 8601 format (UTC).",
},
"id": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The persistent, unique ID for the certificate.",
},
"issuer_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The issuer's distinguished name.",
},
"key_algorithm": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The public key algorithm.",
},
"key_size": schema.Int64Attribute{
Computed: true,
Optional: false,
Description: "The public key size.",
},
"serial_number": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The serial number assigned by the CA.",
},
"sha1fingerprint": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "SHA-1 fingerprint in Hex encoding.",
},
"sha256fingerprint": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "SHA-256 fingerprint in Hex encoding.",
},
"signature_algorithm": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The signature algorithm.",
},
"status": schema.StringAttribute{
Computed: true,
Optional: false,
},
"subject_alternative_names": schema.ListAttribute{
ElementType: types.StringType,
Computed: true,
Optional: false,
Description: "The subject alternative names (SAN).",
},
"subject_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The subject's distinguished name.",
},
"valid_from": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The start date from which the item is valid, in ISO 8601 format (UTC).",
},
"version": schema.Int64Attribute{
Computed: true,
Optional: false,
Description: "The X.509 version to which the item conforms.",
},
},
Computed: true,
Optional: false,
Description: "Certificate details.",
},
"encryption_cert": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether to use this cert to encrypt outgoing assertions.",
},
"primary_verification_cert": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether this is the primary signature verification certificate.",
},
"secondary_verification_cert": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether this is the secondary signature verification certificate.",
},
"x509file": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"crypto_provider": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Cryptographic Provider.",
},
"file_data": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The certificate data in PEM format.",
},
"id": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The persistent, unique ID for the certificate.",
},
},
Computed: true,
Optional: false,
Description: "Encoded certificate data.",
},
},
},
Computed: true,
Optional: false,
Description: "The certificates used for signature verification and XML encryption.",
}
httpBasicCredentialsSchema := schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"encrypted_password": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "For GET requests, this field contains the encrypted password, if one exists.",
},
"password": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "User password. To update the password, specify the plaintext value in this field.",
},
"username": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The username.",
},
},
Computed: true,
Optional: false,
Description: "Username and password credentials.",
}
adapterOverrideSettingsAttribute := schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"masked": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Specifies whether this attribute is masked in PingFederate logs.",
},
"name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The name of this attribute.",
},
"pseudonym": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Specifies whether this attribute is used to construct a pseudonym for the SP.",
},
},
}
spBrowserSSOAttribute := schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The name of this attribute.",
},
"name_format": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The SAML Name Format for the attribute.",
},
},
}
wsTrustAttribute := schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The name of this attribute.",
},
"namespace": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The attribute namespace.",
},
},
}
messageCustomizationsNestedObject := schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"context_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The context in which the customization will be applied.",
},
"message_expression": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The OGNL expression that will be executed.",
},
},
}
channelsAttributeMappingNestedObject := schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"field_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The name of target field.",
},
"saas_field_info": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"attribute_names": schema.ListAttribute{
ElementType: types.StringType,
Computed: true,
Optional: false,
Description: "The list of source attribute names used to generate or map to a target field",
},
"character_case": schema.StringAttribute{
Optional: true,
Computed: true,
Description: "The character case of the field value.",
},
"create_only": schema.BoolAttribute{
Optional: true,
Computed: true,
Description: "Indicates whether this field is a create only field and cannot be updated.",
},
"default_value": schema.StringAttribute{
Optional: true,
Computed: true,
Description: "The default value for the target field",
},
"expression": schema.StringAttribute{
Optional: true,
Computed: true,
Description: "An OGNL expression to obtain a value.",
},
"masked": schema.BoolAttribute{
Optional: true,
Computed: true,
Description: "Indicates whether the attribute should be masked in server logs.",
},
"parser": schema.StringAttribute{
Optional: true,
Computed: true,
Description: "Indicates how the field shall be parsed.",
},
"trim": schema.BoolAttribute{
Optional: true,
Computed: true,
Description: "Indicates whether field should be trimmed before provisioning.",
},
},
Computed: true,
Optional: false,
Description: "The settings that represent how attribute values from source data store will be mapped into Fields specified by the service provider.",
},
},
}
outboundProvisionTargetSettingsNestedObject := schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"inherited": schema.BoolAttribute{
DeprecationMessage: "This field is now deprecated and will be removed in a future release.",
Computed: true,
Optional: false,
Description: "Whether this field is inherited from its parent instance.",
},
"name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The name of the configuration field.",
},
"value": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The value for the configuration field.",
},
"encrypted_value": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The encrypted value for the configuration field.",
},
},
}
schema := schema.Schema{
Description: "Describes an IdP SP Connection",
Attributes: map[string]schema.Attribute{
"active": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Specifies whether the connection is active and ready to process incoming requests.",
},
"additional_allowed_entities_configuration": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"additional_allowed_entities": schema.ListNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"entity_description": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Entity description.",
},
"entity_id": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Unique entity identifier.",
},
},
},
Computed: true,
Optional: false,
Description: "An array of additional allowed entities or issuers to be accepted during entity or issuer validation.",
},
"allow_additional_entities": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Set to true to configure additional entities or issuers to be accepted during entity or issuer validation.",
},
"allow_all_entities": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Set to true to accept any entity or issuer during entity or issuer validation.",
},
},
Computed: true,
Optional: false,
Description: "Additional allowed entities or issuers configuration. Currently only used in OIDC IdP (RP) connection.",
},
"application_icon_url": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The application icon url.",
},
"application_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The application name.",
},
"attribute_query": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"attribute_contract_fulfillment": datasourceattributecontractfulfillment.ToDataSourceSchema(),
"attribute_sources": datasourceattributesources.ToDataSourceSchema(),
"attributes": schema.ListAttribute{
ElementType: types.StringType,
Computed: true,
Optional: false,
Description: "The list of attributes that may be returned to the SP in the response to an attribute request.",
},
"issuance_criteria": datasourceissuancecriteria.ToDataSourceSchema(),
"policy": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"encrypt_assertion": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Encrypt the assertion.",
},
"require_encrypted_name_id": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Require an encrypted name identifier.",
},
"require_signed_attribute_query": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Require signed attribute query.",
},
"sign_assertion": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Sign the assertion.",
},
"sign_response": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Sign the response.",
},
},
Computed: true,
Optional: false,
Description: "The attribute query profile's security policy.",
},
},
Computed: true,
Optional: false,
Description: "The attribute query profile supports SPs in requesting user attributes.",
},
"base_url": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The fully-qualified hostname and port on which your partner's federation deployment runs.",
},
"connection_target_type": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The connection target type. This field is intended for bulk import/export usage.",
},
"contact_info": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"company": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Company name.",
},
"email": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Contact email address.",
},
"first_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Contact first name.",
},
"last_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Contact last name.",
},
"phone": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Contact phone number.",
},
},
Computed: true,
Optional: false,
Description: "Contact information.",
},
"creation_date": schema.StringAttribute{
Optional: false,
Computed: true,
Description: "The time at which the connection was created.",
},
"credentials": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"block_encryption_algorithm": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The algorithm used to encrypt assertions sent to this partner.",
},
"certs": certsSchema,
"decryption_key_pair_ref": resourcelink.SingleNestedAttribute(),
"inbound_back_channel_auth": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"certs": certsSchema,
"digital_signature": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "If incoming or outgoing messages must be signed.",
},
"http_basic_credentials": httpBasicCredentialsSchema,
"require_ssl": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Incoming HTTP transmissions must use a secure channel.",
},
"type": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The back channel authentication type.",
},
"verification_issuer_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "If a verification Subject DN is provided, you can optionally restrict the issuer to a specific trusted CA by specifying its DN in this field.",
},
"verification_subject_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "If this property is set, the verification trust model is Anchored. The verification certificate must be signed by a trusted CA and included in the incoming message, and the subject DN of the expected certificate is specified in this property. If this property is not set, then a primary verification certificate must be specified in the certs array.",
},
},
Computed: true,
Optional: false,
},
"key_transport_algorithm": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The algorithm used to transport keys to this partner.",
},
"outbound_back_channel_auth": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"digital_signature": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "If incoming or outgoing messages must be signed.",
},
"http_basic_credentials": httpBasicCredentialsSchema,
"ssl_auth_key_pair_ref": datasourceresourcelink.ToDataSourceSchemaSingleNestedAttribute(),
"type": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The back channel authentication type.",
},
"validate_partner_cert": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Validate the partner server certificate.",
},
},
Optional: true,
},
"secondary_decryption_key_pair_ref": datasourceresourcelink.ToDataSourceSchemaSingleNestedAttribute(),
"signing_settings": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"algorithm": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The algorithm used to sign messages sent to this partner. The default is SHA1withDSA for DSA certs, SHA256withRSA for RSA certs, and SHA256withECDSA for EC certs. For RSA certs, SHA1withRSA, SHA384withRSA, SHA512withRSA, SHA256withRSAandMGF1, SHA384withRSAandMGF1 and SHA512withRSAandMGF1 are also supported. For EC certs, SHA384withECDSA and SHA512withECDSA are also supported. If the connection is WS-Federation with JWT token type, then the possible values are RSA SHA256, RSA SHA384, RSA SHA512, RSASSA-PSS SHA256, RSASSA-PSS SHA384, RSASSA-PSS SHA512, ECDSA SHA256, ECDSA SHA384, ECDSA SHA512",
},
"alternative_signing_key_pair_refs": schema.ListNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: datasourceresourcelink.ToDataSourceSchema(),
},
Computed: true,
Optional: false,
Description: "The list of IDs of alternative key pairs used to sign messages sent to this partner. The ID of the key pair is also known as the alias and can be found by viewing the corresponding certificate under 'Signing & Decryption Keys & Certificates' in the PingFederate admin console.",
},
"include_cert_in_signature": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Determines whether the signing certificate is included in the signature <KeyInfo> element.",
},
"include_raw_key_in_signature": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Determines whether the <KeyValue> element with the raw public key is included in the signature <KeyInfo> element.",
},
"signing_key_pair_ref": datasourceresourcelink.ToDataSourceSchemaSingleNestedAttribute(),
},
Computed: true,
Optional: false,
Description: "Settings related to signing messages sent to this partner.",
},
"verification_issuer_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "If a verification Subject DN is provided, you can optionally restrict the issuer to a specific trusted CA by specifying its DN in this field.",
},
"verification_subject_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "If this property is set, the verification trust model is Anchored. The verification certificate must be signed by a trusted CA and included in the incoming message, and the subject DN of the expected certificate is specified in this property. If this property is not set, then a primary verification certificate must be specified in the certs array.",
},
},
Computed: true,
Optional: false,
Description: "The certificates and settings for encryption, signing, and signature verification.",
},
"default_virtual_entity_id": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The default alternate entity ID that identifies the local server to this partner.",
},
"entity_id": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The partner's entity ID (connection ID) or issuer value (for OIDC Connections).",
},
"extended_properties": schema.MapNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"values": schema.ListAttribute{
ElementType: types.StringType,
Computed: true,
Optional: false,
Description: "A List of values",
},
},
},
Computed: true,
Optional: false,
Description: "Extended Properties allows to store additional information for IdP/SP Connections. The names of these extended properties should be defined in /extendedProperties.",
},
"id": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The persistent, unique ID for the connection.",
},
"license_connection_group": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The license connection group.",
},
"logging_mode": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The level of transaction logging applicable for this connection.",
},
"metadata_reload_settings": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"enable_auto_metadata_update": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Specifies whether the metadata of the connection will be automatically reloaded.",
},
"metadata_url_ref": datasourceresourcelink.ToDataSourceSchemaSingleNestedAttribute(),
},
Computed: true,
Optional: false,
Description: "Configuration settings to enable automatic reload of partner's metadata.",
},
"name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The connection name.",
},
"outbound_provision": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"channels": schema.ListNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"active": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether the channel is the active channel for this connection.",
},
"attribute_mapping": schema.SetNestedAttribute{
NestedObject: channelsAttributeMappingNestedObject,
Computed: true,
Optional: false,
Description: "The mapping of attributes from the local data store into Fields specified by the service provider.",
},
"channel_source": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"account_management_settings": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"account_status_algorithm": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The account status algorithm name.",
},
"account_status_attribute_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The account status attribute name.",
},
"default_status": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "The default status of the account.",
},
"flag_comparison_status": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "The flag that represents comparison status.",
},
"flag_comparison_value": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The flag that represents comparison value.",
},
},
Computed: true,
Optional: false,
Description: "Account management settings.",
},
"base_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The base DN where the user records are located.",
},
"change_detection_settings": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"changed_users_algorithm": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The changed user algorithm. \nACTIVE_DIRECTORY_USN - For Active Directory only, this algorithm queries for update sequence numbers on user records that are larger than the last time records were checked. \nTIMESTAMP - Queries for timestamps on user records that are not older than the last time records were checked. This check is more efficient from the point of view of the PingFederate provisioner but can be more time consuming on the LDAP side, particularly with the Oracle Directory Server. \nTIMESTAMP_NO_NEGATION - Queries for timestamps on user records that are newer than the last time records were checked. This algorithm is recommended for the Oracle Directory Server.",
},
"group_object_class": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The group object class.",
},
"time_stamp_attribute_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The timestamp attribute name.",
},
"user_object_class": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The user object class.",
},
"usn_attribute_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The USN attribute name.",
},
},
Computed: true,
Optional: false,
Description: "Setting to detect changes to a user or a group.",
},
"data_source": datasourceresourcelink.ToDataSourceSchemaSingleNestedAttributeCustomDescription("Reference to an LDAP datastore."),
"group_membership_detection": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"group_member_attribute_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The name of the attribute that represents group members in a group, also known as group member attribute.",
},
"member_of_group_attribute_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The name of the attribute that indicates the entity is a member of a group, also known as member of attribute.",
},
},
Computed: true,
Optional: false,
Description: "Settings to detect group memberships.",
},
"group_source_location": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"filter": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "An LDAP filter.",
},
"group_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The group DN for users or groups.",
},
"nested_search": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether the search is nested.",
},
},
Computed: true,
Optional: false,
Description: "The location settings that includes a DN and a LDAP filter.",
},
"guid_attribute_name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "the GUID attribute name.",
},
"guid_binary": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether the GUID is stored in binary format.",
},
"user_source_location": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"filter": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "An LDAP filter.",
},
"group_dn": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The group DN for users or groups.",
},
"nested_search": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether the search is nested.",
},
},
Computed: true,
Optional: false,
Description: "The location settings that includes a DN and a LDAP filter.",
},
},
Computed: true,
Optional: false,
Description: "The source data source and LDAP settings.",
},
"max_threads": schema.Int64Attribute{
Computed: true,
Optional: false,
Description: "The number of processing threads.",
},
"name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The name of the channel.",
},
"timeout": schema.Int64Attribute{
Computed: true,
Optional: false,
Description: "Timeout, in seconds, for individual user and group provisioning operations on the target service provider.",
},
},
},
Computed: true,
Optional: false,
Description: "Includes settings of a source data store, managing provisioning threads and mapping of attributes.",
},
"custom_schema": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"attributes": schema.ListNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"multi_valued": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Indicates whether the attribute is multi-valued.",
},
"name": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "Name of the attribute.",
},
"sub_attributes": schema.ListAttribute{
ElementType: types.StringType,
Computed: true,
Optional: false,
Description: "List of sub-attributes for an attribute.",
},
"types": schema.ListAttribute{
ElementType: types.StringType,
Computed: true,
Optional: false,
Description: "Represents the name of each attribute type in case of multi-valued attribute.",
},
},
},
Computed: true,
Optional: false,
},
"namespace": schema.StringAttribute{
Computed: true,
Optional: false,
},
},
Computed: true,
Optional: false,
Description: "Custom SCIM Attributes configuration.",
},
"target_settings": schema.ListNestedAttribute{
NestedObject: outboundProvisionTargetSettingsNestedObject,
Computed: true,
Optional: false,
Description: "Configuration fields that includes credentials to target SaaS application.",
},
"type": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The SaaS plugin type.",
},
},
Computed: true,
Optional: false,
Description: "Outbound Provisioning allows an IdP to create and maintain user accounts at standards-based partner sites using SCIM as well as select-proprietary provisioning partner sites that are protocol-enabled.",
},
"sp_browser_sso": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"adapter_mappings": schema.ListNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"abort_sso_transaction_as_fail_safe": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "If set to true, SSO transaction will be aborted as a fail-safe when the data-store's attribute mappings fail to complete the attribute contract. Otherwise, the attribute contract with default values is used.",
},
"adapter_override_settings": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"attribute_contract": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"core_attributes": schema.ListNestedAttribute{
NestedObject: adapterOverrideSettingsAttribute,
Computed: true,
Optional: false,
Description: "A list of IdP adapter attributes that correspond to the attributes exposed by the IdP adapter type.",
},
"extended_attributes": schema.ListNestedAttribute{
NestedObject: adapterOverrideSettingsAttribute,
Computed: true,
Optional: false,
Description: "A list of additional attributes that can be returned by the IdP adapter. The extended attributes are only used if the adapter supports them.",
},
"inherited": schema.BoolAttribute{
DeprecationMessage: "This field is now deprecated and will be removed in a future release.",
Computed: true,
Optional: false,
Description: "Whether this attribute contract is inherited from its parent instance.",
},
"mask_ognl_values": schema.BoolAttribute{
Computed: true,
Optional: false,
Description: "Whether or not all OGNL expressions used to fulfill an outgoing assertion contract should be masked in the logs.",
},
"unique_user_key_attribute": schema.StringAttribute{
Computed: true,
Optional: false,
Description: "The attribute to use for uniquely identify a user's authentication sessions.",
},
},
Computed: true,
Optional: false,
Description: "A set of attributes exposed by an IdP adapter.",
},
"attribute_mapping": schema.SingleNestedAttribute{
Attributes: map[string]schema.Attribute{
"attribute_contract_fulfillment": datasourceattributecontractfulfillment.ToDataSourceSchema(),
"attribute_sources": datasourceattributesources.ToDataSourceSchema(),
"inherited": schema.BoolAttribute{
DeprecationMessage: "This field is now deprecated and will be removed in a future release.",
Computed: true,
Optional: false,
Description: "Whether this attribute mapping is inherited from its parent instance. If true, the rest of the properties in this model become read-only. The default value is false.",
},
"issuance_criteria": datasourceissuancecriteria.ToDataSourceSchema(),
},
Computed: true,
Optional: false,
Description: "An IdP Adapter Contract Mapping.",
},