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

connect the ldap error:authn #2 returned error: open /tmp/ldap_password.txt: no such file or directory #9

Open
xiaonizi-github opened this issue Jun 15, 2017 · 1 comment

Comments

@xiaonizi-github
Copy link

the following is my config:

auth:

token:

realm: "https://127.0.0.1:5001/auth"

service: "Docker registry"

issuer: "Acme auth server"

rootcertbundle: "/path/to/server.pem"

server:
addr: ":5001"
certificate: "/ssl/server.pem"
key: "/ssl/server.key"

token:
issuer: "Acme auth server" # Must match issuer in the Registry config.
expiration: 900

LDAP authentication.

Authentication is performed by first binding to the server, looking up the user entry

by using the specified filter, and then re-binding using the matched DN and the password provided.

ldap_auth:
addr: "ldap:389"
#tls: true

In case bind DN and password is required for querying user information,

specify them here. Plain text password is read from the file.

bind_dn: "uid=chenlp,ou=infocenter,dc=xxx,dc=com"

Make sure you remove newlines and carriage returns from the password file.

bind_password_file: /tmp/ldap_password.txt

User query settings. ${account} is expanded from auth request

base: "ou=infocenter,dc=xxxx,dc=com"
filter: "(&(uid=${account})(objectClass=organizationalPerson))"

users:

Password is specified as a BCrypt hash. Use htpasswd -B to generate.

"admin":
password: "$2y$05$LO.vzwpWC5LZGqThvEfznu8qhb5SGqvBSWY1J3yZ4AxtMRZ3kN5jC" # badmin
"test":
password: "$2y$05$WuwBasGDAgr.QCbGIjKJaep4dhxeai9gNZdmBnQXqpKly57oNutya" # 123

acl:

Admin has full access to everything.

  • match: {account: "admin"}
    actions: ["*"]

2,the command
docker run -d --name docker_auth -p 5001:5001
-v /data/192.168.111.128/config:/config:ro
--restart=always
-v /data/192.168.111.128/ssl:/ssl cesanta/docker_auth /config/docker_auth.yml
3,when i login my private registry,then occur an error:authn #2 returned error: open /tmp/ldap_password.txt: no such file or directory,my system has the file,why it occur this problem?and how to write the password file?
4,by the way ,after docker ps -a
137c2b765f2e cesanta/docker_auth "/docker_auth/auth..." 15 seconds ago Up 14 seconds 0.0.0.0:5001->5001/tcp docker_auth

@xiaonizi-github
Copy link
Author

i have solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant