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

Issue with working with OTP #34

Closed
coolacid opened this issue Jul 16, 2015 · 12 comments
Closed

Issue with working with OTP #34

coolacid opened this issue Jul 16, 2015 · 12 comments

Comments

@coolacid
Copy link

There seems to be major issues when implementing OTP. First problem is the systemd file :: /usr/lib/systemd/system/ipa-otpd@.service --the enviromentfile this is pointing at /etc/ipa/default.conf. This breaks when the systemd attempts to add the [global] tag.

Attempted to patch that and point to the same file without the [global] tag however all OTP still fails with no real indication as to why.

@coolacid
Copy link
Author

-- edit --

This did not actually fix the problem.

@adelton
Copy link
Collaborator

adelton commented Jul 17, 2015

There seems to be major issues when implementing OTP. First problem is the systemd file :: /usr/lib/systemd/system/ipa-otpd@.service --the enviromentfile this is pointing at /etc/ipa/default.conf. This breaks when the systemd attempts to add the [global] tag.

In the FreeIPA container, no systemd is running. Could you please be more specific about the functional issue?

@coolacid
Copy link
Author

This is related to using the One Time Password function. Removing the [global] tag (or pointing the @.service file directly to the ldap server) causes the otp service to start - so something is allowing it to run.

Because we couldn't get IPA with OTP working within Docker, we had to scrap and go bare metal, so can't look into it any further.

@dmcnaught
Copy link

I'm seeing the same issue (with centos-7) trying to use OTP-TOTP. Set up all goes fine in the GUI, but then when I try to login after successfully syncing OTP token, I see this in the logs:
==> /var/log/krb5kdc.log <==
Jul 22 21:47:01 ip-172-31-28-101.ec2.internal krb5kdc2035: AS_REQ (6 etypes {18 17 16 23 25 26}) 172.17.0.16: NEEDED_PREAUTH: tuser@EC2.INTERNAL for krbtgt/EC2.INTERNAL@EC2.INTERNAL, Additional pre-authentication required
Jul 22 21:47:01 ip-172-31-28-101.ec2.internal krb5kdc2035: closing down fd 12
==> /var/log/systemctl.log <==
[start ipa-otpd@.service]
Running [export host=ip-172-31-28-101.ec2.internal; export basedn=dc=ec2,dc=internal; export realm=EC2.INTERNAL; export domain=ec2.internal; export xmlrpc_uri=https://ip-172-31-28-101.ec2.internal/ipa/xml; export ldap_uri=ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket; export enable_ra=True; export ra_plugin=dogtag; export dogtag_version=10; export mode=production; /usr/libexec/ipa-otpd $ldap_uri]
Marked pid [2913] for [ipa-otpd@.service]
LDAP: ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket
Socket closed, shutting down...
[start ipa-otpd@.service]
Running [export host=ip-172-31-28-101.ec2.internal; export basedn=dc=ec2,dc=internal; export realm=EC2.INTERNAL; export domain=ec2.internal; export xmlrpc_uri=https://ip-172-31-28-101.ec2.internal/ipa/xml; export ldap_uri=ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket; export enable_ra=True; export ra_plugin=dogtag; export dogtag_version=10; export mode=production; /usr/libexec/ipa-otpd $ldap_uri]
Marked pid [2916] for [ipa-otpd@.service]
LDAP: ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket
Socket closed, shutting down...
[start ipa-otpd@.service]
Running [export host=ip-172-31-28-101.ec2.internal; export basedn=dc=ec2,dc=internal; export realm=EC2.INTERNAL; export domain=ec2.internal; export xmlrpc_uri=https://ip-172-31-28-101.ec2.internal/ipa/xml; export ldap_uri=ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket; export enable_ra=True; export ra_plugin=dogtag; export dogtag_version=10; export mode=production; /usr/libexec/ipa-otpd $ldap_uri]
Marked pid [2919] for [ipa-otpd@.service]
LDAP: ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket
Socket closed, shutting down...
[start ipa-otpd@.service]
Running [export host=ip-172-31-28-101.ec2.internal; export basedn=dc=ec2,dc=internal; export realm=EC2.INTERNAL; export domain=ec2.internal; export xmlrpc_uri=https://ip-172-31-28-101.ec2.internal/ipa/xml; export ldap_uri=ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket; export enable_ra=True; export ra_plugin=dogtag; export dogtag_version=10; export mode=production; /usr/libexec/ipa-otpd $ldap_uri]
Marked pid [2922] for [ipa-otpd@.service]
LDAP: ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket
Socket closed, shutting down...

==> /var/log/krb5kdc.log <==
Jul 22 21:47:07 ip-172-31-28-101.ec2.internal krb5kdc2036: preauth (otp) verify failure: Connection timed out
Jul 22 21:47:07 ip-172-31-28-101.ec2.internal krb5kdc2036: AS_REQ (6 etypes {18 17 16 23 25 26}) 172.17.0.16: PREAUTH_FAILED: tuser@EC2.INTERNAL for krbtgt/EC2.INTERNAL@EC2.INTERNAL, Preauthentication failed
Jul 22 21:47:07 ip-172-31-28-101.ec2.internal krb5kdc2036: closing down fd 12

@dmcnaught
Copy link

I also commented out the first line in /data/etc/ipa/default.conf
otherwise this was the log output:
[start ipa-otpd@.service]
Running [export [global]; export host=ip-172-31-28-101.ec2.internal; export basedn=dc=ec2,dc=internal; export realm=EC2.INTERNAL; export domain=ec2.internal; export xmlrpc_uri=https://ip-172-31-28-101.ec2.internal/ipa/xml; export ldap_uri=ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket; export enable_ra=True; export ra_plugin=dogtag; export dogtag_version=10; export mode=production; /usr/libexec/ipa-otpd $ldap_uri]
Marked pid [2826] for [ipa-otpd@.service]
sh: line 0: export: `[global]': not a valid identifier
LDAP: ldapi://%2fvar%2frun%2fslapd-EC2-INTERNAL.socket
Socket closed, shutting down...

@dmcnaught
Copy link

Some more info: When I use google authenticator I get this error message when adding the token. (centos-7 and fedora-22). Authy allows me to add the token.
img_3250

@dmcnaught
Copy link

Also tried adding the token with FreeOTP - can't login to the admin tools or onto an ipa client with password+token after setup.

@npmccallum
Copy link

@dmcnaught The "invalid barcode" issue is related to this bug: https://www.redhat.com/archives/freeipa-devel/2015-June/msg00505.html

@dmcnaught
Copy link

Notes from mailing list:
@adelton : Can we run systemd in the centos-7 container so that ipa-otp will work?

On Mon, 2015-09-21 at 16:49 -0600, Duncan McNaught wrote:

Dear freeipa-users,

I'm having an issue with otp in freeipa. I can set up the service as
described in the blog post for TOTP or HOTP, and sync the token fine.
When I try to login to the admin tools or an ipa-managed client
(with ) , I get a password incorrect message.
Here are some more details: https://github.com/adelton/docker-freeipa
/issues/34
Can anyone help me to debug/get this working?

I'm very unclear as to what you are trying to do. Are you trying to
run FreeIPA in a container? If so, Jan is probably your man. AFAIK,
ipa-otpd will require systemd in the container.

If you are trying to run this on CentOS 7.1 (not a container), it
seems to me that your LDAP server isn't running or something is wrong
with ldapi.

Can you explain your setup in more detail?

@adelton
Copy link
Collaborator

adelton commented Sep 25, 2015

Notes from mailing list:
@adelton : Can we run systemd in the centos-7 container so that ipa-otp will work?

Not yet, it should be possible with Docker 1.9.

@adelton
Copy link
Collaborator

adelton commented Sep 26, 2015

Fix for the issue was now pushed to the master branch and also to the rhel-7 and centos-7 branches. The automated builds on the hub are running and updated images should be available shortly.

Sorry it took me so long to resolve the problem.

@adelton adelton closed this as completed Sep 26, 2015
@dmcnaught
Copy link

Great - thanks @adelton

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

4 participants