Azure / SAP-on-Azure-Scripts-and-Utilities

This repository hosts scripts and utilities that can be used to streamline deployment and operations for SAP on Azure customers
MIT License
155 stars 93 forks source link

Start-Stop-Automation and RunAs accounts #88

Closed kpervan closed 1 year ago

kpervan commented 2 years ago

RunAs account in no longer created when an automation account is created (but it can be added later) as it's no longer a recommended way to authenticate in the runbooks

From the Automation account documentation (https://docs.microsoft.com/en-us/azure/automation/automation-security-overview):

A managed identity from Azure Active Directory (Azure AD) allows your runbook to easily access other Azure AD-protected resources. The identity is managed by the Azure platform and doesn't require you to provision or rotate any secrets. For more information about managed identities in Azure AD, see Managed identities for Azure resources.

Managed identities are the recommended way to authenticate in your runbooks, and is the default authentication method for your Automation account.

Can the scripts for Start-Stop-Automation be updated to use managed identities?

MartinPankraz commented 2 years ago

@kpervan does this PR solve your request?

kpervan commented 2 years ago

@kpervan does this PR solve your request?

Hi! Yes, this solves the request

sparevermicelli commented 4 months ago

Hi, it seems the RunAs account authentication (which is no longer supported) was re-introduced by mistake in Start-Stop-Automation/Automation-Backend/Runbooks/Stop-SAPSystem.ps1 (lines 93-94)

goraco commented 3 months ago

Hi, it seems the RunAs account authentication (which is no longer supported) was re-introduced by mistake in Start-Stop-Automation/Automation-Backend/Runbooks/Stop-SAPSystem.ps1 (lines 93-94)

hello @sparevermicelli , the code which is loaded as per documentation is located on PowerShell Gallery, and it is OK e.g. using managed identity.

You can check it Here https://www.powershellgallery.com/packages?q=Tag-SAP

I need to refresh a copy of a code on Github as well

best Goran