Skip to content

Commit c96fef5

Browse files
authored
Fix OpenAPI schema for bcrypt hashing_algorithm name (#1498)
### WHAT is this pull request doing? The OpenAPI schema listed simple algorithm names (Bcrypt, SHA256, etc.) as enum values for hashing_algorithm, but the API returns normalized values like lavinmq_bcrypt and rabbit_password_hashing_sha256. This causes Terraform to detect configuration drift when the inserted value didn't match the retrieved value. Updated users.yaml to document the normalized values the API actually returns and explain the flexible input format it accepts. The API still accepts simplified algorithm names (case-insensitive) ### HOW can this pull request be tested? Look at http api users endpoints.
1 parent f318a7c commit c96fef5

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

static/docs/schemas/users.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ user-properties:
1717
- impersonator
1818
hashing_algorithm:
1919
type: string
20-
description: Hashing algorithm used to generate the password hash (defaults to "SHA256" for PUT requests).
21-
enum:
22-
- SHA512
23-
- SHA256
24-
- Bcrypt
25-
- MD5
20+
description: |
21+
Hashing algorithm used to generate the password hash (defaults to "rabbit_password_hashing_sha256" for PUT requests).
22+
23+
The API accepts any value ending with 'bcrypt', 'sha256', 'sha512', or 'md5' (case-insensitive),
24+
but always returns one of these normalized values:
25+
- 'lavinmq_bcrypt' (for any value ending with 'bcrypt')
26+
- 'rabbit_password_hashing_sha256' (for any value ending with 'sha256')
27+
- 'rabbit_password_hashing_sha512' (for any value ending with 'sha512')
28+
- 'rabbit_password_hashing_md5' (for any value ending with 'md5')
29+
30+
To avoid configuration drift in tools like Terraform, use the normalized values listed above.
2631
password_hash:
2732
type: string
2833
description: The password hash.

0 commit comments

Comments
 (0)