-
Notifications
You must be signed in to change notification settings - Fork 1
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
Sets Azure Storage authentication method from Access Key to Entra User Account #5
base: main
Are you sure you want to change the base?
Conversation
…r Account (WIP) - Also refreshes main and backend tfstates with the changes WIP: I have temporarily set role principal_id to a group my az-cli user is a member of but not a preferred group. Need better options..
…ning two entra users as owners (part of a possible Azure user groups behavior/bug linked in the source code), but even this fails to authorize my same-user to read/write that resource, and it cannot be run twice.
https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/privileged#owner Owner's (TIL) |
Alright, I'll play a bit more: Maybe I've been and continue to be bitten by
"can take up to 10 minutes" (but not likely the "up to 12 hours") bullet
points in the second Learning article you linked. Further, I wonder if
using such privileged account affects that "time delay," meaning a less
privileged user might be more instantaneous...?
I'll start with working from the subscription access mentioned. That would
be ideal anyway, I think.
Thanks..!
…On Tue, Nov 12, 2024, 1:14 AM Joseph Rafferty ***@***.***> wrote:
https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/privileged#owner
Owner's DataActions == none. Simply having the Owner role assignment over
the entire subscription does not grant you any permissions to access the
data as an Entra ID user. Viable role assignments listed here:
https://learn.microsoft.com/en-us/azure/storage/blobs/assign-azure-role-data-access
(TIL)
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR5KZX32NEBLJOW6EK5OW32AGTE5AVCNFSM6AAAAABRSEFM72VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRZG43DIOBZHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
…ng access to the newly created or the inherited backend resource.
@joraff Ready for your eyes again. See my string of commits/messages and where I ultimately landed 8ddb05a. Please review for:
Note that this resumes idempotency of the module. I plan to use this commit in actual project work in the meantime, because it has finally given me the distance I needed. Update LOL: I see that after all the string of experimentation, I did not actually change codebase other than to add one more convenience |
Description
Since we don't want to access Azure Storage for terraform backend storage via Access Keys, I had to do a little dance to enable Entra User Authentication.
principal_id
to a group that my az-cli user is a member of for convenience, but either we need a more appropriate group or some other approach.Another idea is to create and apply a Managed Identity. Would this work for "anyone running the parent terraform" (who ultimately needs access to read tfstate stored in the container).
Update: Each of the commits on this PR is another slightly different stab and none better than the previous. I fail to end up with an idempotent (can rerun
![image](https://private-user-images.githubusercontent.com/2348390/385111090-aadef6fa-ad25-4a03-9f20-ff5c81a528eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTI5MTMsIm5iZiI6MTczOTA5MjYxMywicGF0aCI6Ii8yMzQ4MzkwLzM4NTExMTA5MC1hYWRlZjZmYS1hZDI1LTRhMDMtOWYyMC1mZjVjODFhNTI4ZWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMDkxNjUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZmZiZjk3MGRhMDhhMjU4OGEyNWI2YTJlMjIxMjdmMTQ2ZTM4ZGVjMmFhOWVmY2EwMzkzY2E5ZDE3NTRhNDZmNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.aBqEmgF_DuQ0GgJGM-cVtGbftETFRNfiyCa-n6UFSkg)
![image](https://private-user-images.githubusercontent.com/2348390/385111223-62efb411-d4a6-48e8-b7ed-a8eb73f54d2b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTI5MTMsIm5iZiI6MTczOTA5MjYxMywicGF0aCI6Ii8yMzQ4MzkwLzM4NTExMTIyMy02MmVmYjQxMS1kNGE2LTQ4ZTgtYjdlZC1hOGViNzNmNTRkMmIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMDkxNjUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTVlZWQ5YTZmMzIxNGRjMzcwY2QyNjdlZWQzODhiODBjMmI4N2UyNjU5NDY2YWMwODIwOGM0NDcxMzMwMmI4MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.l1sBjYeLLBqYb30rFLAQSyRkIHRWfefk4GZCHRqsDGA)
![image](https://private-user-images.githubusercontent.com/2348390/385111552-a2379ab4-e116-4a26-b969-399ea7fe6976.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTI5MTMsIm5iZiI6MTczOTA5MjYxMywicGF0aCI6Ii8yMzQ4MzkwLzM4NTExMTU1Mi1hMjM3OWFiNC1lMTE2LTRhMjYtYjk2OS0zOTllYTdmZTY5NzYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMDkxNjUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDI4Yjg0NWEzZjhjNWYwOWMwYmUzZjM0YWJjYzI1NDY1ZWE5NzMyNDJjZWFhNGI2YTAzZWZkMWYxZGM2ZjkzOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.y2ZVCDm0wA44uVbL0viD-xrOPoisOBhLF2p2J8hpTIk)
apply
and either first-time create or detect no differences) outcome: I always get either duplicate resources:or failure:
or failure:
I am probably out of ideas. What I am going for is: