Skip to content

Commit 6617c6e

Browse files
author
Christian Bongiorno
committed
Remove password requirement, but still validate. Update docs to reflect this
1 parent eef9a5c commit 6617c6e

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ Permission target V1 support has been totally removed. Dynamically testing of pe
7878
currently doesn't work because of race conditions when creating a repo. This will have to be resolved with retries at a
7979
later date.
8080

81+
### Changes to user creation ###
82+
Previously, passwords were being generated for the user if none was supplied. This was both unnecessary (since TF has a password provider)
83+
and because the internal implementation could never be entirely in line with the remote server (or, be sure it was).
84+
With the release of 2.3.1, password is still optional, but if supplied, must watch the default password requirements. These
85+
can be overridden with `JFROG_PASSWD_VALIDATION_ON=false` if a custom password policy is in place.
8186

8287

8388
## Build the Provider

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,5 @@ The following arguments are supported:
115115
Conflicts with `api_key`, and `access_token`. This can also be sourced from the `ARTIFACTORY_PASSWORD` environment variable.
116116
* `api_key` - (Optional) API key for api auth. Uses `X-JFrog-Art-Api` header.
117117
Conflicts with `username`, `password`, and `access_token`. This can also be sourced from the `ARTIFACTORY_API_KEY` environment variable.
118-
* `access_token` - (Optional) API key for token auth. Uses `Authorization: Bearer` header.
118+
* `access_token` - (Optional) API key for token auth. Uses `Authorization: Bearer` header. For xray functionality, this is the only auth method accepted
119119
Conflicts with `username` and `password`, and `api_key`. This can also be sourced from the `ARTIFACTORY_ACCESS_TOKEN` environment variable.

docs/resources/artifactory_user.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ updated in Terraform. If no password is given a random one is created otherwise
88
noting "removing" the password argument does not reset the password; it just removes Terraform from storing the "known"
99
state.
1010

11+
- Note: The password is optional, but if supplied, it will be compared to the default artifactory password rules. You can
12+
override password validation entirely by setting `export JFROG_PASSWD_VALIDATION_ON=false`, if your organization has it's own password requirements
1113

1214
## Example Usage
1315

pkg/artifactory/resource_artifactory_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func resourceArtifactoryUser() *schema.Resource {
6868
"password": {
6969
Type: schema.TypeString,
7070
Sensitive: true,
71-
Required: true,
71+
Optional: true,
7272
ValidateFunc: func(tfValue interface{}, key string) ([]string, []error) {
7373
validationOn, _ := strconv.ParseBool(os.Getenv("JFROG_PASSWD_VALIDATION_ON"))
7474
if validationOn {

0 commit comments

Comments
 (0)