Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update password validation #962

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 10.7.6 (May 10, 2024)

BUG FIXES:

* resource/artifactory_managed_user: Update `password` minimum length validation to 8 characters which matches default length for both cloud and self-hosted versions. Issue: [#959](https://github.com/jfrog/terraform-provider-artifactory/issues/959) PR: [#962](https://github.com/jfrog/terraform-provider-artifactory/pull/962)

## 10.7.5 (May 2, 2024)

IMPROVEMENTS:
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/managed_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "artifactory_managed_user" "test-user" {
- `disable_ui_access` (Boolean) (Optional, Default: true) When enabled, this user can only access the system through the REST API. This option cannot be set if the user has Admin privileges.
- `groups` (Set of String) List of groups this user is a part of. **Notes:** If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
- `internal_password_disabled` (Boolean) (Optional, Default: false) When enabled, disables the fallback mechanism for using an internal password when external authentication (such as LDAP) is enabled.
- `password` (String, Sensitive) (Optional, Sensitive) Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters
- `password` (String, Sensitive) (Optional, Sensitive) Password for the user.
- `profile_updatable` (Boolean) (Optional, Default: true) When enabled, this user can update their profile details (except for the password. Only an administrator can update the password). There may be cases in which you want to leave this unset to prevent users from updating their profile. For example, a departmental user with a single password shared between all department members.

### Read-Only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestAccScopedToken_UpgradeGH_818(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(fqrn, "username", "testuser"),
resource.TestCheckResourceAttr(fqrn, "scopes.#", "1"),
resource.TestCheckResourceAttr(fqrn, "expires_in", "31536000"),
resource.TestCheckResourceAttr(fqrn, "expires_in", "32000000"),
resource.TestCheckNoResourceAttr(fqrn, "audiences"),
resource.TestCheckResourceAttrSet(fqrn, "access_token"),
resource.TestCheckNoResourceAttr(fqrn, "refresh_token"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (r *ArtifactoryManagedUserResource) Schema(ctx context.Context, req resourc
MarkdownDescription: "Password for the user.",
Required: true,
Sensitive: true,
Validators: []validator.String{stringvalidator.LengthAtLeast(12)},
Validators: []validator.String{stringvalidator.LengthAtLeast(8)},
},
}

Expand Down
Loading