skip to Main Content

I have a rather (hopefully) theoretical question regarding the secure usage of Service Pricipals in Azure (Enterprise Applications)

Introduction

we currently deploy our DevOps Code via Azure Service Principals.

  • AppRegistration/Enterprise App is created
  • Secret is generated
  • Permission (i.e. Contributor) to the Ressource Group is granted in Azure
  • Service Connection is made in Devops
    everything works fine.

Assumption

By default the Service Principal (Enterprise Application) is not restricted to a specific user/group (Assignment Required => "no").

My assumption is now, that every user in the AAD-Tenant is able to login to the Enterprise Application as well.

I i.e. do this by using the "Graph Powershell API"-EnterpriseApp.
I can either use a Secret or use my User Credentials to access the Service Principal and its permissions

Security issue?

coming back to our DevOps configuration:

  • The Service Principal has Contributor Permission on the dedicated Resource Group
  • Assignment Required is set to no (default configuration)

if I (as a malicious user) have the Application ID, i could simply logon to the Service Principal and receive the Token.
Question:
With this token and my login to the App, do i also have the Contributor Permissions of the App and could now manipulate the whole Resource Group?

Since i’m not an Azure Developer – but only an Azure AD Admin – my knowledge regarding this is limited,
so i’m not able to test it.

Can someone maybe either provide code or prove that my assumptions are wrong or correct?!

Thanks

2

Answers


  1. Login or Signup to reply.
  2. My assumption is now, that every user in the AAD-Tenant is able to login to the Enterprise Application as well.

    No. They would need the client secret or the rights to generate a new one. Which requires that they are owners of the App Registration. In the App Registration on the Owners tab it says:

    The users listed here can view and edit this application registration. Additionally, any user (may not be listed here) with administrative privileges to manage any application (e.g., Global Administrator, Cloud App Administrator etc.) can view and edit the application registrations.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search