I am administering a single (now) ec2 instance which will provide some tools to our users. I am using Ansible to manage it. I have it set to create users using a mix of a Cron-job and Ansible (by creating a list of users and having a playbook ensure they are present).
My main question is this; I am trying to create a way for each user (new and old) to be able to access the instance with their key that they uploaded to EC2 AWS. I have been hitting a dead end in my thoughts on this.. Is there a way to make a call to the AWS api that would return the text of each public key (since they are public I don't see a reason why this shouldn't exist..?) so that I can ensure that a copy of it exists in their respective "~/.ssh/authorized_keys" file?
Other than that I have thought that uploading the keys to an S3 bucket would work for having Ansible read them. The only problem with this is that the users would have to upload their keys to S3.
Any feedback is appreciated-
And if I am attacking this the wrong way please let me know.