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

Support CNAME dns records #967

Open
nitrocode opened this issue Jul 19, 2021 · 2 comments
Open

Support CNAME dns records #967

nitrocode opened this issue Jul 19, 2021 · 2 comments

Comments

@nitrocode
Copy link
Contributor

I have a a CNAME that points to ip-snip.snip.compute.internal

$ dig bastion.snip.com

;; QUESTION SECTION:
;bastion.snip.com. IN	A

;; ANSWER SECTION:
bastion.snip.com. 77 IN	CNAME	ip-snip.snip.compute.internal.

I can ssm directly to ip-snip.snip.compute.internal

aws-gate session ip-snip.snip.compute.internal

but I cannot do this

aws-gate session bastion.snip.com
@xen0l
Copy link
Owner

xen0l commented Jan 3, 2022

Hey @nitrocode, unfortunately, this is not easy. aws-gate requires that the resulting name identifier translates to instance iD or something that we can use to search EC2 API for instance.

If we added support for DNS query, we wouldn't be able to always guarantee that the CNAME record points to an AWS-managed record. With that in mind, I don't see how to implement this without breaking the current semantic. Thoughts?

@nitrocode
Copy link
Contributor Author

if it's in a form that doesn't match the ip.*compute.internal (and similar regexes) then we could assume a dns entry is passed in, no? or perhaps there could be an additional option for --dns which could then run a dig on the dns record and search for the ec2 instance id. This way it's backwards compatible if the switch is unspecified.

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