[VCDA-3509] Tkgm cluster create fix for vapp view forbidden error #1360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for
Error:Status code: 403/ACCESS_TO_RESOURCE_IS_FORBIDDEN, [ dd88ceaa-47f2-46c1-a158-0fb9072d28ad ] Either you need some or all of the following rights [Base] to perform operations [VAPP_VIEW] for 75b5b162-35a4-444b-bdab-faab5d71cd6b or the target entity is invalid. (request id: dd88ceaa-47f2-46c1-a158-0fb9072d28ad)
Power on operation on a vm is a special operation where authorization check to access the vm is done multiple times. Since in our case the security context is getting wiped out during the power on operation, the secondary authorization checks are failing and that results in the 403 error.
Fix description: CSE service account to its absolute minimum during cluster deployment. Use service account client and vapp only for accessing and updating extra config for post boot customization.
Cluster create with control plane and worker node tested
Cluster resize with worker node scale up tested
Tested as Cluster Admin (Clone of Org admin + special rights)
Tested as Cluster Author (Clone of vApp Author + special rights )
Resize tested thru UI plugin and CLI with latest master branch
This change is