-
Notifications
You must be signed in to change notification settings - Fork 113
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
Enable service account authentication #1040
Conversation
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder to not forget about changelog entry, either in v3.9.0 or v3.10.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless, I missed it, we need more docs :)
It might be convenient to provide a similar script (https://registry.terraform.io/providers/vmware/vcd/latest/docs#shell-script-to-obtain-a-bearer-token) to get the Service Account active. I also have a consideration that maybe it would be less friction to accept initial token as an attribute in |
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
I created the script
I agree that it's less friction for the user, but is there a nice way of making it work? How would the provider know about the file the next time it is run? Also I feel like having files as the default just provides more flexibility to the user as to how they would want to make use multiple service account tokens |
Yes. It could probably live in The script itself is great - thanks. IMO this makes it so much easier to start with service accounts for those who don't have any infrastructure around them. My only wish (up to discussion) is probably to add
Agreed. Can live like that and then see if there is any demand to shape it in future |
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Token rotation and script to get service account worked in my testing.
Good to approve without an actual test because we do not have Go code to handle service account creation at the moment
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Original issue: #995
Depends on: vmware/go-vcloud-director#562
This PR adds a
service_account
field to the provider schema that allows providing a file containing a Service Account API token as described in the blog post.For now it only supports using Service Accounts in
Active Stage
and the overall implementation is not set in stone, as maybe there are better solutions.