Skip to content

Commit

Permalink
Add authentication policy to bookmark app
Browse files Browse the repository at this point in the history
closes #1352
  • Loading branch information
jakezarobsky-8451 committed Nov 15, 2022
1 parent 6c88dda commit 4381e80
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions okta/resource_okta_app_bookmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func resourceAppBookmark() *schema.Resource {
Default: false,
Optional: true,
},
"authentication_policy": {
Type: schema.TypeString,
Optional: true,
Description: "Id of this apps authentication policy",
}
}),
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(1 * time.Hour),
Expand Down Expand Up @@ -59,6 +64,10 @@ func resourceAppBookmarkCreate(ctx context.Context, d *schema.ResourceData, m in
if err != nil {
return diag.Errorf("failed to upload logo for bookmark application: %v", err)
}
err = setAuthenticationPolicy(ctx, d, m, app.id)
if err != nil {
return diag.Errorf("failed to set authentication policy for bookmark application: %v", err)
}
return resourceAppBookmarkRead(ctx, d, m)
}

Expand Down Expand Up @@ -106,6 +115,10 @@ func resourceAppBookmarkUpdate(ctx context.Context, d *schema.ResourceData, m in
return diag.Errorf("failed to upload logo for bookmark application: %v", err)
}
}
err = setAuthenticationPolicy(ctx, d, m, app.Id)
if err != nil {
return diag.Errorf("failed to set authentication policy for bookmark application: %v", err)
}
return resourceAppBookmarkRead(ctx, d, m)
}

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/app_bookmark.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ The following arguments are supported:

- `app_links_json` - (Optional) Displays specific appLinks for the app. The value for each application link should be boolean.

- `authentication_policy` - (Optional) The ID of the associated `app_signon_policy`. If this property is removed from the application the `default` sign-on-policy will be associated with this application.

- `auto_submit_toolbar` - (Optional) Display auto submit toolbar.

- `enduser_note` - (Optional) Application notes for end users.
Expand Down

0 comments on commit 4381e80

Please sign in to comment.