Skip to content

Commit

Permalink
Use bcrypt with password_hash (#35)
Browse files Browse the repository at this point in the history
Changes:

- Reinstate the `bcrypt` option for `password_hash`

This has been done since `node_exporter` expects hashed password for
basic authentication to be created with `brypt`. I initially removed
because the following appears when running the `monitoring_client` role:

```
AttributeError: module 'bcrypt' has no attribute '__about__'
```

The play proceeds and `node_exporter` is correctly installed. I tried
pinning `bcrypt` to `4.0.1` as suggested in
pyca/bcrypt#684 but the traceback still
appears. Without `bcrypt` the `node_exporter` service fails to start.
  • Loading branch information
drmatthews authored Jan 5, 2024
1 parent 075d789 commit 53267d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/monitoring_client/templates/node_exporter_web.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ tls_server_config:
cert_file: node_exporter.crt
key_file: node_exporter.key
basic_auth_users:
{{ monitoring_client_exporter_username }}: {{ monitoring_client_exporter_password | password_hash }}
{{ monitoring_client_exporter_username }}: {{ monitoring_client_exporter_password | password_hash('bcrypt') }}

0 comments on commit 53267d2

Please sign in to comment.