/
getFederatedSettingsIdentityProvider.go
289 lines (252 loc) · 15.5 KB
/
getFederatedSettingsIdentityProvider.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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package mongodbatlas
import (
"context"
"reflect"
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// `FederatedSettingsIdentityProvider` provides a federated settings identity provider data source. Atlas federated settings identity provider provides federated settings outputs for the configured identity provider.
//
// > **NOTE:** OIDC Workforce IdP is currently in preview. To learn more about OIDC and existing limitations see the [OIDC Authentication Documentation](https://www.mongodb.com/docs/atlas/security-oidc/)
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// identityProvider, err := mongodbatlas.NewFederatedSettingsIdentityProvider(ctx, "identityProvider", &mongodbatlas.FederatedSettingsIdentityProviderArgs{
// FederationSettingsId: pulumi.String("627a9687f7f7f7f774de306f14"),
// AssociatedDomains: pulumi.StringArray{
// pulumi.String("yourdomain.com"),
// },
// SsoDebugEnabled: pulumi.Bool(true),
// Status: pulumi.String("ACTIVE"),
// SsoUrl: pulumi.String("https://mysso.oktapreview.com/app/mysso_terraformtest_1/exk177f7f7f70h8/sso/saml"),
// IssuerUri: pulumi.String("http://www.okta.com/exk17f7f7f7f7p50h8"),
// RequestBinding: pulumi.String("HTTP-POST"),
// ResponseSignatureAlgorithm: pulumi.String("SHA-256"),
// })
// if err != nil {
// return err
// }
// _ = mongodbatlas.LookupFederatedSettingsIdentityProviderOutput(ctx, mongodbatlas.GetFederatedSettingsIdentityProviderOutputArgs{
// FederationSettingsId: identityProvider.ID(),
// IdentityProviderId: pulumi.String("0oad47f7fXnk1297"),
// }, nil)
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func LookupFederatedSettingsIdentityProvider(ctx *pulumi.Context, args *LookupFederatedSettingsIdentityProviderArgs, opts ...pulumi.InvokeOption) (*LookupFederatedSettingsIdentityProviderResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupFederatedSettingsIdentityProviderResult
err := ctx.Invoke("mongodbatlas:index/getFederatedSettingsIdentityProvider:getFederatedSettingsIdentityProvider", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getFederatedSettingsIdentityProvider.
type LookupFederatedSettingsIdentityProviderArgs struct {
// Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
FederationSettingsId string `pulumi:"federationSettingsId"`
IdentityProviderId string `pulumi:"identityProviderId"`
}
// A collection of values returned by getFederatedSettingsIdentityProvider.
type LookupFederatedSettingsIdentityProviderResult struct {
// Assertion consumer service URL to which the IdP sends the SAML response.
AcsUrl string `pulumi:"acsUrl"`
// List that contains the configured domains from which users can log in for this IdP.
AssociatedDomains []string `pulumi:"associatedDomains"`
// List that contains the organizations from which users can log in for this IdP.
AssociatedOrgs []GetFederatedSettingsIdentityProviderAssociatedOrg `pulumi:"associatedOrgs"`
// Identifier of the intended recipient of the token.
AudienceClaims []string `pulumi:"audienceClaims"`
// Identifier for the intended audience of the SAML Assertion.
AudienceUri string `pulumi:"audienceUri"`
// Client identifier that is assigned to an application by the Identity Provider.
ClientId string `pulumi:"clientId"`
// Human-readable label that identifies the IdP.
DisplayName string `pulumi:"displayName"`
// Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
FederationSettingsId string `pulumi:"federationSettingsId"`
// Identifier of the claim which contains IdP Group IDs in the token.
GroupsClaim string `pulumi:"groupsClaim"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
IdentityProviderId string `pulumi:"identityProviderId"`
// Unique 24-hexadecimal digit string that identifies the IdP
IdpId string `pulumi:"idpId"`
// Identifier for the issuer of the SAML Assertion.
IssuerUri string `pulumi:"issuerUri"`
// Unique 20-hexadecimal digit string that identifies the IdP.
OktaIdpId string `pulumi:"oktaIdpId"`
PemFileInfos []GetFederatedSettingsIdentityProviderPemFileInfo `pulumi:"pemFileInfos"`
// The protocol of the identity provider. Either SAML or OIDC.
Protocol string `pulumi:"protocol"`
// SAML Authentication Request Protocol binding used to send the AuthNRequest. Atlas supports the following binding values:
// - HTTP POST
// - HTTP REDIRECT
RequestBinding string `pulumi:"requestBinding"`
// Scopes that MongoDB applications will request from the authorization endpoint.
RequestedScopes []string `pulumi:"requestedScopes"`
// Algorithm used to encrypt the IdP signature. Atlas supports the following signature algorithm values:
// - SHA-1
// - SHA-256
ResponseSignatureAlgorithm string `pulumi:"responseSignatureAlgorithm"`
// Flag that indicates whether the IdP has enabled Bypass SAML Mode. Enabling this mode generates a URL that allows you bypass SAML and login to your organizations at any point. You can authenticate with this special URL only when Bypass Mode is enabled. Set this parameter to true during testing. This keeps you from getting locked out of MongoDB.
SsoDebugEnabled bool `pulumi:"ssoDebugEnabled"`
// URL of the receiver of the SAML AuthNRequest.
SsoUrl string `pulumi:"ssoUrl"`
// Label that indicates whether the identity provider is active. The IdP is Inactive until you map at least one domain to the IdP.
Status string `pulumi:"status"`
// Identifier of the claim which contains the user ID in the token.
UserClaim string `pulumi:"userClaim"`
}
func LookupFederatedSettingsIdentityProviderOutput(ctx *pulumi.Context, args LookupFederatedSettingsIdentityProviderOutputArgs, opts ...pulumi.InvokeOption) LookupFederatedSettingsIdentityProviderResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupFederatedSettingsIdentityProviderResult, error) {
args := v.(LookupFederatedSettingsIdentityProviderArgs)
r, err := LookupFederatedSettingsIdentityProvider(ctx, &args, opts...)
var s LookupFederatedSettingsIdentityProviderResult
if r != nil {
s = *r
}
return s, err
}).(LookupFederatedSettingsIdentityProviderResultOutput)
}
// A collection of arguments for invoking getFederatedSettingsIdentityProvider.
type LookupFederatedSettingsIdentityProviderOutputArgs struct {
// Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
FederationSettingsId pulumi.StringInput `pulumi:"federationSettingsId"`
IdentityProviderId pulumi.StringInput `pulumi:"identityProviderId"`
}
func (LookupFederatedSettingsIdentityProviderOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupFederatedSettingsIdentityProviderArgs)(nil)).Elem()
}
// A collection of values returned by getFederatedSettingsIdentityProvider.
type LookupFederatedSettingsIdentityProviderResultOutput struct{ *pulumi.OutputState }
func (LookupFederatedSettingsIdentityProviderResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupFederatedSettingsIdentityProviderResult)(nil)).Elem()
}
func (o LookupFederatedSettingsIdentityProviderResultOutput) ToLookupFederatedSettingsIdentityProviderResultOutput() LookupFederatedSettingsIdentityProviderResultOutput {
return o
}
func (o LookupFederatedSettingsIdentityProviderResultOutput) ToLookupFederatedSettingsIdentityProviderResultOutputWithContext(ctx context.Context) LookupFederatedSettingsIdentityProviderResultOutput {
return o
}
// Assertion consumer service URL to which the IdP sends the SAML response.
func (o LookupFederatedSettingsIdentityProviderResultOutput) AcsUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.AcsUrl }).(pulumi.StringOutput)
}
// List that contains the configured domains from which users can log in for this IdP.
func (o LookupFederatedSettingsIdentityProviderResultOutput) AssociatedDomains() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) []string { return v.AssociatedDomains }).(pulumi.StringArrayOutput)
}
// List that contains the organizations from which users can log in for this IdP.
func (o LookupFederatedSettingsIdentityProviderResultOutput) AssociatedOrgs() GetFederatedSettingsIdentityProviderAssociatedOrgArrayOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) []GetFederatedSettingsIdentityProviderAssociatedOrg {
return v.AssociatedOrgs
}).(GetFederatedSettingsIdentityProviderAssociatedOrgArrayOutput)
}
// Identifier of the intended recipient of the token.
func (o LookupFederatedSettingsIdentityProviderResultOutput) AudienceClaims() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) []string { return v.AudienceClaims }).(pulumi.StringArrayOutput)
}
// Identifier for the intended audience of the SAML Assertion.
func (o LookupFederatedSettingsIdentityProviderResultOutput) AudienceUri() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.AudienceUri }).(pulumi.StringOutput)
}
// Client identifier that is assigned to an application by the Identity Provider.
func (o LookupFederatedSettingsIdentityProviderResultOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.ClientId }).(pulumi.StringOutput)
}
// Human-readable label that identifies the IdP.
func (o LookupFederatedSettingsIdentityProviderResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
func (o LookupFederatedSettingsIdentityProviderResultOutput) FederationSettingsId() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.FederationSettingsId }).(pulumi.StringOutput)
}
// Identifier of the claim which contains IdP Group IDs in the token.
func (o LookupFederatedSettingsIdentityProviderResultOutput) GroupsClaim() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.GroupsClaim }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupFederatedSettingsIdentityProviderResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupFederatedSettingsIdentityProviderResultOutput) IdentityProviderId() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.IdentityProviderId }).(pulumi.StringOutput)
}
// Unique 24-hexadecimal digit string that identifies the IdP
func (o LookupFederatedSettingsIdentityProviderResultOutput) IdpId() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.IdpId }).(pulumi.StringOutput)
}
// Identifier for the issuer of the SAML Assertion.
func (o LookupFederatedSettingsIdentityProviderResultOutput) IssuerUri() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.IssuerUri }).(pulumi.StringOutput)
}
// Unique 20-hexadecimal digit string that identifies the IdP.
func (o LookupFederatedSettingsIdentityProviderResultOutput) OktaIdpId() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.OktaIdpId }).(pulumi.StringOutput)
}
func (o LookupFederatedSettingsIdentityProviderResultOutput) PemFileInfos() GetFederatedSettingsIdentityProviderPemFileInfoArrayOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) []GetFederatedSettingsIdentityProviderPemFileInfo {
return v.PemFileInfos
}).(GetFederatedSettingsIdentityProviderPemFileInfoArrayOutput)
}
// The protocol of the identity provider. Either SAML or OIDC.
func (o LookupFederatedSettingsIdentityProviderResultOutput) Protocol() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.Protocol }).(pulumi.StringOutput)
}
// SAML Authentication Request Protocol binding used to send the AuthNRequest. Atlas supports the following binding values:
// - HTTP POST
// - HTTP REDIRECT
func (o LookupFederatedSettingsIdentityProviderResultOutput) RequestBinding() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.RequestBinding }).(pulumi.StringOutput)
}
// Scopes that MongoDB applications will request from the authorization endpoint.
func (o LookupFederatedSettingsIdentityProviderResultOutput) RequestedScopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) []string { return v.RequestedScopes }).(pulumi.StringArrayOutput)
}
// Algorithm used to encrypt the IdP signature. Atlas supports the following signature algorithm values:
// - SHA-1
// - SHA-256
func (o LookupFederatedSettingsIdentityProviderResultOutput) ResponseSignatureAlgorithm() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.ResponseSignatureAlgorithm }).(pulumi.StringOutput)
}
// Flag that indicates whether the IdP has enabled Bypass SAML Mode. Enabling this mode generates a URL that allows you bypass SAML and login to your organizations at any point. You can authenticate with this special URL only when Bypass Mode is enabled. Set this parameter to true during testing. This keeps you from getting locked out of MongoDB.
func (o LookupFederatedSettingsIdentityProviderResultOutput) SsoDebugEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) bool { return v.SsoDebugEnabled }).(pulumi.BoolOutput)
}
// URL of the receiver of the SAML AuthNRequest.
func (o LookupFederatedSettingsIdentityProviderResultOutput) SsoUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.SsoUrl }).(pulumi.StringOutput)
}
// Label that indicates whether the identity provider is active. The IdP is Inactive until you map at least one domain to the IdP.
func (o LookupFederatedSettingsIdentityProviderResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.Status }).(pulumi.StringOutput)
}
// Identifier of the claim which contains the user ID in the token.
func (o LookupFederatedSettingsIdentityProviderResultOutput) UserClaim() pulumi.StringOutput {
return o.ApplyT(func(v LookupFederatedSettingsIdentityProviderResult) string { return v.UserClaim }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupFederatedSettingsIdentityProviderResultOutput{})
}