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

Mismatch between docs and code for keymaker_id_resolver_role #36

Closed
renaudhager opened this issue Mar 1, 2018 · 1 comment
Closed

Comments

@renaudhager
Copy link
Contributor

renaudhager commented Mar 1, 2018

Hi,

Thanks for your work :-)

I tried to setup cross account authentication, I followed the documentation and added this to the description of the IAM role configured on the instance profile :

keymaker_id_resolver_account=11111111111
keymaker_id_resolver_role=test-ssh

But I got the following error :

root@ip-10-104-52-43:/etc/pam.d# /usr/sbin/keymaker-get-public-keys user1
Traceback (most recent call last):
  File "/usr/local/bin/keymaker", line 125, in <module>
    locals()[args.command](args)
  File "/usr/local/lib/python2.7/dist-packages/keymaker/__init__.py", line 133, in get_authorized_keys
    resource="role/" + config["keymaker_id_resolver_iam_role"])
KeyError: u'keymaker_id_resolver_iam_role'

After a quick look to the code, it appears that the key : keymaker_id_resolver_role is not used.
I fixed the issue by updating the role description using keymaker_id_resolver_iam_role instead of keymaker_id_resolver_role.

I think the documentation should be updated to avoid any confusion.

Cheers,

Renaud Hager

@kislyuk kislyuk closed this as completed in 15d1579 Apr 9, 2018
@kislyuk
Copy link
Owner

kislyuk commented Apr 9, 2018

Thank you for reporting!

This should be fixed in master now.

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

2 participants