Skip to content

Commit ffed591

Browse files
Bump goauthentik.io/api/v3 from 3.2024123.7 to 3.2025022.5 (#666)
* Bump goauthentik.io/api/v3 from 3.2024123.7 to 3.2025022.5 Bumps [goauthentik.io/api/v3](https://github.com/goauthentik/client-go) from 3.2024123.7 to 3.2025022.5. - [Release notes](https://github.com/goauthentik/client-go/releases) - [Changelog](https://github.com/goauthentik/client-go/blob/main/model_version_history.go) - [Commits](goauthentik/client-go@v3.2024123.7...v3.2025022.5) --- updated-dependencies: - dependency-name: goauthentik.io/api/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * update token expiry * brand: add default flow background and custom CSS * providers: add dry-run for sync providers * providers/scim: add compatibility mode * providers/saml: add authn_context_class_ref_mapping * events: update webhook mappings for webhook transport * fix schema * fix default flow background --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer <[email protected]>
1 parent 6c8303e commit ffed591

18 files changed

+109
-12
lines changed

docs/data-sources/brand.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ data "authentik_brand" "authentik-default" {
2727

2828
### Optional
2929

30+
- `branding_custom_css` (String) Generated.
31+
- `branding_default_flow_background` (String) Generated.
3032
- `branding_favicon` (String) Generated.
3133
- `branding_logo` (String) Generated.
3234
- `branding_title` (String) Generated.

docs/resources/brand.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ resource "authentik_brand" "default" {
3131
### Optional
3232

3333
- `attributes` (String) JSON format expected. Use jsonencode() to pass objects. Defaults to `{}`.
34+
- `branding_custom_css` (String)
35+
- `branding_default_flow_background` (String) Defaults to `/static/dist/assets/images/flow_background.jpg`.
3436
- `branding_favicon` (String)
3537
- `branding_logo` (String)
3638
- `branding_title` (String) Defaults to `authentik`.

docs/resources/event_transport.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ resource "authentik_event_transport" "transport" {
4444
### Optional
4545

4646
- `send_once` (Boolean) Defaults to `true`.
47-
- `webhook_mapping` (String)
47+
- `webhook_mapping_body` (String)
48+
- `webhook_mapping_headers` (String)
4849
- `webhook_url` (String)
4950

5051
### Read-Only

docs/resources/provider_google_workspace.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ description: |-
2323

2424
- `credentials` (String) JSON format expected. Use jsonencode() to pass objects. Defaults to `{}`.
2525
- `delegated_subject` (String) Defaults to `seconds=0`.
26+
- `dry_run` (Boolean) Defaults to `false`.
2627
- `exclude_users_service_account` (Boolean)
2728
- `filter_group` (String)
2829
- `group_delete_action` (String) Allowed values:

docs/resources/provider_microsoft_entra.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ description: |-
2323

2424
### Optional
2525

26+
- `dry_run` (Boolean) Defaults to `false`.
2627
- `exclude_users_service_account` (Boolean)
2728
- `filter_group` (String)
2829
- `group_delete_action` (String) Allowed values:

docs/resources/provider_saml.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ resource "authentik_application" "name" {
4747
- `assertion_valid_not_on_or_after` (String) Defaults to `minutes=5`.
4848
- `audience` (String) Defaults to ``.
4949
- `authentication_flow` (String)
50+
- `authn_context_class_ref_mapping` (String)
5051
- `default_relay_state` (String) Defaults to ``.
5152
- `digest_algorithm` (String) Allowed values:
5253
- `http://www.w3.org/2000/09/xmldsig#sha1`

docs/resources/provider_scim.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ resource "authentik_provider_scim" "name" {
4242

4343
### Optional
4444

45+
- `compatibility_mode` (String) Allowed values:
46+
- `default`
47+
- `aws`
48+
- `slack`
49+
Defaults to `default`.
50+
- `dry_run` (Boolean) Defaults to `false`.
4551
- `exclude_users_service_account` (Boolean)
4652
- `filter_group` (String)
4753
- `property_mappings` (List of String)

docs/resources/stage_email.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ resource "authentik_stage_email" "name" {
3636
- `subject` (String) Defaults to `authentik`.
3737
- `template` (String) Defaults to `email/password_reset.html`.
3838
- `timeout` (Number) Defaults to `30`.
39-
- `token_expiry` (Number) Defaults to `30`.
39+
- `token_expiry` (String) Defaults to `minutes=30`.
4040
- `use_global_settings` (Boolean) Defaults to `true`.
4141
- `use_ssl` (Boolean)
4242
- `use_tls` (Boolean)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/hashicorp/terraform-plugin-sdk v1.17.2
1212
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1
1313
github.com/stretchr/testify v1.10.0
14-
goauthentik.io/api/v3 v3.2024123.7
14+
goauthentik.io/api/v3 v3.2025022.6
1515
)
1616

1717
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HY
483483
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
484484
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
485485
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
486-
goauthentik.io/api/v3 v3.2024123.7 h1:vjmEnxXTHGFylJ9kTBFNYy4kcTrUM2hSIt3ja8gNVAY=
487-
goauthentik.io/api/v3 v3.2024123.7/go.mod h1:zz+mEZg8rY/7eEjkMGWJ2DnGqk+zqxuybGCGrR2O4Kw=
486+
goauthentik.io/api/v3 v3.2025022.6 h1:M5M8Cd/1N7E8KLkvYYh7VdcdKz5nfzjKPFLK+YOtOVg=
487+
goauthentik.io/api/v3 v3.2025022.6/go.mod h1:zz+mEZg8rY/7eEjkMGWJ2DnGqk+zqxuybGCGrR2O4Kw=
488488
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
489489
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
490490
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=

internal/provider/data_source_brand.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ func dataSourceBrand() *schema.Resource {
3737
Optional: true,
3838
Computed: true,
3939
},
40+
"branding_default_flow_background": {
41+
Type: schema.TypeString,
42+
Optional: true,
43+
Computed: true,
44+
},
45+
"branding_custom_css": {
46+
Type: schema.TypeString,
47+
Optional: true,
48+
Computed: true,
49+
},
4050
"flow_authentication": {
4151
Type: schema.TypeString,
4252
Optional: true,
@@ -105,6 +115,8 @@ func dataSourceBrandRead(ctx context.Context, d *schema.ResourceData, m interfac
105115
setWrapper(d, "branding_title", f.BrandingTitle)
106116
setWrapper(d, "branding_logo", f.BrandingLogo)
107117
setWrapper(d, "branding_favicon", f.BrandingFavicon)
118+
setWrapper(d, "branding_default_flow_background", f.BrandingDefaultFlowBackground)
119+
setWrapper(d, "branding_custom_css", f.BrandingCustomCss)
108120
setWrapper(d, "flow_authentication", f.FlowAuthentication.Get())
109121
setWrapper(d, "flow_invalidation", f.FlowInvalidation.Get())
110122
setWrapper(d, "flow_recovery", f.FlowRecovery.Get())

internal/provider/resource_brand.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ func resourceBrand() *schema.Resource {
3939
Type: schema.TypeString,
4040
Optional: true,
4141
},
42+
"branding_default_flow_background": {
43+
Type: schema.TypeString,
44+
Optional: true,
45+
Default: "/static/dist/assets/images/flow_background.jpg",
46+
},
47+
"branding_custom_css": {
48+
Type: schema.TypeString,
49+
Optional: true,
50+
},
4251
"branding_favicon": {
4352
Type: schema.TypeString,
4453
Optional: true,
@@ -101,6 +110,12 @@ func resourceBrandSchemaToModel(d *schema.ResourceData) (*api.BrandRequest, diag
101110
if l, ok := d.Get("branding_favicon").(string); ok {
102111
m.BrandingFavicon = &l
103112
}
113+
if l, ok := d.Get("branding_default_flow_background").(string); ok {
114+
m.BrandingDefaultFlowBackground = &l
115+
}
116+
if l, ok := d.Get("branding_custom_css").(string); ok {
117+
m.BrandingCustomCss = &l
118+
}
104119

105120
if l, ok := d.Get("flow_authentication").(string); ok {
106121
m.FlowAuthentication.Set(&l)
@@ -191,6 +206,8 @@ func resourceBrandRead(ctx context.Context, d *schema.ResourceData, m interface{
191206
setWrapper(d, "branding_title", res.BrandingTitle)
192207
setWrapper(d, "branding_logo", res.BrandingLogo)
193208
setWrapper(d, "branding_favicon", res.BrandingFavicon)
209+
setWrapper(d, "branding_default_flow_background", res.BrandingDefaultFlowBackground)
210+
setWrapper(d, "branding_custom_css", res.BrandingCustomCss)
194211
if res.FlowAuthentication.IsSet() {
195212
setWrapper(d, "flow_authentication", res.FlowAuthentication.Get())
196213
}

internal/provider/resource_event_transport.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ func resourceEventTransport() *schema.Resource {
3333
Type: schema.TypeString,
3434
Optional: true,
3535
},
36-
"webhook_mapping": {
36+
"webhook_mapping_body": {
37+
Type: schema.TypeString,
38+
Optional: true,
39+
},
40+
"webhook_mapping_headers": {
3741
Type: schema.TypeString,
3842
Optional: true,
3943
},
@@ -57,8 +61,11 @@ func resourceEventTransportSchemaToModel(d *schema.ResourceData) (*api.Notificat
5761
m.WebhookUrl = &w
5862
}
5963

60-
if w, ok := d.Get("webhook_mapping").(string); ok {
61-
m.WebhookMapping.Set(&w)
64+
if w, ok := d.Get("webhook_mapping_body").(string); ok {
65+
m.WebhookMappingBody.Set(&w)
66+
}
67+
if w, ok := d.Get("webhook_mapping_headers").(string); ok {
68+
m.WebhookMappingHeaders.Set(&w)
6269
}
6370
return &m, nil
6471
}
@@ -93,7 +100,8 @@ func resourceEventTransportRead(ctx context.Context, d *schema.ResourceData, m i
93100
setWrapper(d, "mode", res.Mode)
94101
setWrapper(d, "send_once", res.SendOnce)
95102
setWrapper(d, "webhook_url", res.WebhookUrl)
96-
setWrapper(d, "webhook_mapping", res.WebhookMapping.Get())
103+
setWrapper(d, "webhook_mapping_body", res.WebhookMappingBody.Get())
104+
setWrapper(d, "webhook_mapping_headers", res.WebhookMappingHeaders.Get())
97105
return diags
98106
}
99107

internal/provider/resource_provider_google_workspace.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ func resourceProviderGoogleWorkspace() *schema.Resource {
2626
Type: schema.TypeString,
2727
Required: true,
2828
},
29+
"dry_run": {
30+
Type: schema.TypeBool,
31+
Default: false,
32+
Optional: true,
33+
},
2934

3035
"credentials": {
3136
Type: schema.TypeString,
@@ -104,6 +109,9 @@ func resourceProviderGoogleWorkspaceSchemaToProvider(d *schema.ResourceData) (*a
104109
if l, ok := d.Get("filter_group").(string); ok {
105110
r.FilterGroup = *api.NewNullableString(&l)
106111
}
112+
if d, dok := d.GetOk("dry_run"); dok {
113+
r.DryRun = api.PtrBool(d.(bool))
114+
}
107115
credentials := make(map[string]interface{})
108116
if l, ok := d.Get("credentials").(string); ok && l != "" {
109117
err := json.NewDecoder(strings.NewReader(l)).Decode(&credentials)
@@ -151,6 +159,7 @@ func resourceProviderGoogleWorkspaceRead(ctx context.Context, d *schema.Resource
151159
setWrapper(d, "user_delete_action", res.UserDeleteAction)
152160
setWrapper(d, "group_delete_action", res.GroupDeleteAction)
153161
setWrapper(d, "filter_group", res.FilterGroup)
162+
setWrapper(d, "dry_run", res.DryRun)
154163
localMappings := castSlice[string](d.Get("property_mappings").([]interface{}))
155164
if len(localMappings) > 0 {
156165
setWrapper(d, "property_mappings", listConsistentMerge(localMappings, res.PropertyMappings))

internal/provider/resource_provider_microsoft_entra.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ func resourceProviderMicrosoftEntra() *schema.Resource {
2424
Type: schema.TypeString,
2525
Required: true,
2626
},
27+
"dry_run": {
28+
Type: schema.TypeBool,
29+
Default: false,
30+
Optional: true,
31+
},
2732
"client_id": {
2833
Type: schema.TypeString,
2934
Required: true,
@@ -105,6 +110,9 @@ func resourceProviderMicrosoftEntraSchemaToProvider(d *schema.ResourceData) (*ap
105110
if l, ok := d.Get("filter_group").(string); ok {
106111
r.FilterGroup = *api.NewNullableString(&l)
107112
}
113+
if d, dok := d.GetOk("dry_run"); dok {
114+
r.DryRun = api.PtrBool(d.(bool))
115+
}
108116
return &r, nil
109117
}
110118

@@ -145,6 +153,7 @@ func resourceProviderMicrosoftEntraRead(ctx context.Context, d *schema.ResourceD
145153
setWrapper(d, "user_delete_action", res.UserDeleteAction)
146154
setWrapper(d, "group_delete_action", res.GroupDeleteAction)
147155
setWrapper(d, "filter_group", res.FilterGroup)
156+
setWrapper(d, "dry_run", res.DryRun)
148157
localMappings := castSlice[string](d.Get("property_mappings").([]interface{}))
149158
if len(localMappings) > 0 {
150159
setWrapper(d, "property_mappings", listConsistentMerge(localMappings, res.PropertyMappings))

internal/provider/resource_provider_saml.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ func resourceProviderSAML() *schema.Resource {
103103
Type: schema.TypeString,
104104
Optional: true,
105105
},
106+
"authn_context_class_ref_mapping": {
107+
Type: schema.TypeString,
108+
Optional: true,
109+
},
106110
"digest_algorithm": {
107111
Type: schema.TypeString,
108112
Optional: true,
@@ -180,6 +184,9 @@ func resourceProviderSAMLSchemaToProvider(d *schema.ResourceData) *api.SAMLProvi
180184
if s, sok := d.GetOk("name_id_mapping"); sok && s.(string) != "" {
181185
r.NameIdMapping.Set(api.PtrString(s.(string)))
182186
}
187+
if s, sok := d.GetOk("authn_context_class_ref_mapping"); sok && s.(string) != "" {
188+
r.AuthnContextClassRefMapping.Set(api.PtrString(s.(string)))
189+
}
183190
if s, sok := d.GetOk("encryption_kp"); sok && s.(string) != "" {
184191
r.EncryptionKp.Set(api.PtrString(s.(string)))
185192
}
@@ -240,6 +247,9 @@ func resourceProviderSAMLRead(ctx context.Context, d *schema.ResourceData, m int
240247
if res.NameIdMapping.IsSet() {
241248
setWrapper(d, "name_id_mapping", res.NameIdMapping.Get())
242249
}
250+
if res.AuthnContextClassRefMapping.IsSet() {
251+
setWrapper(d, "authn_context_class_ref_mapping", res.AuthnContextClassRefMapping.Get())
252+
}
243253
if res.SigningKp.IsSet() {
244254
setWrapper(d, "signing_kp", res.SigningKp.Get())
245255
}

internal/provider/resource_provider_scim.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ func resourceProviderSCIM() *schema.Resource {
2424
Type: schema.TypeString,
2525
Required: true,
2626
},
27+
"dry_run": {
28+
Type: schema.TypeBool,
29+
Default: false,
30+
Optional: true,
31+
},
2732
"url": {
2833
Type: schema.TypeString,
2934
Required: true,
@@ -33,6 +38,13 @@ func resourceProviderSCIM() *schema.Resource {
3338
Sensitive: true,
3439
Required: true,
3540
},
41+
"compatibility_mode": {
42+
Type: schema.TypeString,
43+
Optional: true,
44+
Default: api.COMPATIBILITYMODEENUM_DEFAULT,
45+
Description: EnumToDescription(api.AllowedCompatibilityModeEnumEnumValues),
46+
ValidateDiagFunc: StringInEnum(api.AllowedCompatibilityModeEnumEnumValues),
47+
},
3648
"property_mappings": {
3749
Type: schema.TypeList,
3850
Optional: true,
@@ -67,10 +79,14 @@ func resourceProviderSCIMSchemaToProvider(d *schema.ResourceData) *api.SCIMProvi
6779
PropertyMappings: castSlice[string](d.Get("property_mappings").([]interface{})),
6880
PropertyMappingsGroup: castSlice[string](d.Get("property_mappings_group").([]interface{})),
6981
ExcludeUsersServiceAccount: api.PtrBool(d.Get("exclude_users_service_account").(bool)),
82+
CompatibilityMode: api.CompatibilityModeEnum(d.Get("compatibility_mode").(string)).Ptr(),
7083
}
7184
if l, ok := d.Get("filter_group").(string); ok {
7285
r.FilterGroup = *api.NewNullableString(&l)
7386
}
87+
if d, dok := d.GetOk("dry_run"); dok {
88+
r.DryRun = api.PtrBool(d.(bool))
89+
}
7490
return &r
7591
}
7692

@@ -109,6 +125,8 @@ func resourceProviderSCIMRead(ctx context.Context, d *schema.ResourceData, m int
109125
setWrapper(d, "property_mappings_group", listConsistentMerge(localGroupMappings, res.PropertyMappingsGroup))
110126
setWrapper(d, "exclude_users_service_account", res.ExcludeUsersServiceAccount)
111127
setWrapper(d, "filter_group", res.FilterGroup.Get())
128+
setWrapper(d, "dry_run", res.DryRun)
129+
setWrapper(d, "compatibility_mode", res.CompatibilityMode)
112130
return diags
113131
}
114132

internal/provider/resource_stage_email.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ func resourceStageEmail() *schema.Resource {
6666
Default: "[email protected]",
6767
},
6868
"token_expiry": {
69-
Type: schema.TypeInt,
69+
Type: schema.TypeString,
7070
Optional: true,
71-
Default: 30,
71+
Default: "minutes=30",
7272
},
7373
"subject": {
7474
Type: schema.TypeString,
@@ -119,7 +119,7 @@ func resourceStageEmailSchemaToProvider(d *schema.ResourceData) *api.EmailStageR
119119
r.FromAddress = api.PtrString(h.(string))
120120
}
121121
if p, pSet := d.GetOk("token_expiry"); pSet {
122-
r.TokenExpiry = api.PtrInt32(int32(p.(int)))
122+
r.TokenExpiry = api.PtrString(p.(string))
123123
}
124124
if h, hSet := d.GetOk("subject"); hSet {
125125
r.Subject = api.PtrString(h.(string))

0 commit comments

Comments
 (0)