Hello,

##### SUMMARY
When I tried to apply filter on variable password, Traefik BasicAuth 
rejected password.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME

##### ANSIBLE VERSION
```
ansible 2.9.12
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/fred/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = 
/home/fred/devops/lib/python3.6/site-packages/ansible
  executable location = /home/fred/devops/bin/ansible
  python version = 3.6.9 (default, Jul 17 2020, 12:50:27) [GCC 8.4.0]

```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" 
between quotes -->
```
Empty
```

##### OS / ENVIRONMENT
Ubuntu 18.04
venv python3.8


##### STEPS TO REPRODUCE

A part of my playbook:
```
        username_auth: admin
        user_password: hello
        #user_combinehash: "admin:{SHA}qvTGHdzF6KLavt4PO0gs2a6pQ00="
        #user_combinehash: "admin:$$apr1$$2mYRX92I$$udcUHex5PBj4vMOVHRWiD."
        user_combinehash: "{{ username_auth }}:{{ user_password | 
hash('md5') }}"

```

A part of my role task:
```
          labels:
            - "traefik.http.routers.dashboard.rule=(PathPrefix(`/api`) || 
PathPrefix(`/dashboard`))"
            - "traefik.http.routers.dashboard.service=api@internal"
            - "traefik.http.routers.dashboard.middlewares=auth"
            - "traefik.http.middlewares.auth.basicauth.users={{ 
user_combinehash }}"
```

##### EXPECTED RESULTS
BasicAuth module of Traefik accept my hash password


##### ACTUAL RESULTS
Playbook works, but When I tried to access to traefik Dashboard, access 
denied, password unrecongnized.

When I use variable:
`user_combinehash: "admin:{SHA}qvTGHdzF6KLavt4PO0gs2a6pQ00="`
It's works

all others did not work. But I need to have hash filter instead.

I tried with filter SHA1 and MD5

I already install python3-passlib

I'm sorry to don't understand where is the problem,
Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8aa5c24d-6dad-4222-8506-c8fa829b4a70n%40googlegroups.com.

Reply via email to