问题
How do I give someone permission to publish an ASP.NET MVC website to Azure without just handing over my personal credentials?
回答1:
Using the new Azure Resource Manager (ARM) you can use Role Based Access Control (RBAC) to grant a user a certain access on a certain Azure resource that you own.
There are 3 default RBAC roles: Owner
, Contributor
and Reader
.
If you want a user to be able to publish to a site without giving them your personal creds you should be able to add then as a Contributor
to that particular site and they will be able to see that site in portal and use their own publishing credentials.
This is a much more granular approach than co-admin where the co-admin will have access to your entire subscription.
Read more about how to setup RBAC in Azure Websites and Publishing here
回答2:
Your options depend on:
- Azure Websites: you can utilise traditional FTP for uploads and set username / password as required; use deploy from source control systems such as Github (the deployer doesn't even need to know your site details - just the repository to check into); deploy from Dropbox; deploy from Visual Studio using a Publishing Profile (certificate based). Full details listed on the Azure site.
- Azure Cloud Services (Web Role): Publishing Profile.
Websites have a bit more flexibility than Cloud Services and if you use the Publishing Profile approach the user will need to be added to your Azure Subscription as a co-admin (this will change in future but is a restriction today).
来源:https://stackoverflow.com/questions/28442998/how-do-i-give-permission-to-publish-websites-to-azure