Skip to content
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

ConnectionString as output param is secure? #479

Open
patelriki13 opened this issue Mar 22, 2023 · 1 comment
Open

ConnectionString as output param is secure? #479

patelriki13 opened this issue Mar 22, 2023 · 1 comment

Comments

@patelriki13
Copy link

patelriki13 commented Mar 22, 2023

I read your article. https://johnnyreilly.com/output-connection-strings-and-keys-from-azure-bicep and its good but I have question if am passing ConnectionString as output param is secure way?

I found two way to do it. I just adding details just for your reference, you may be already known.

option 1:

listKeys(resourceId('Microsoft.EventHub/namespaces/authorizationRules', eventHubNamespace, eventHubListenPolicy), '2021-11-01').primaryConnectionString

option 2:

resource rule 'Microsoft.EventHub/namespaces/eventhubs/authorizationRules@2022-01-01-preview' existing = {
  name: '${eventHubNS}/${eventHubName}/${eventHubSendPolicyName}'
}

rule.listkeys().primaryConnectionString

If not secure, then can you please update your blog?

Ref:
azure-quickstart-templates
azure-quickstart-templates

@johnnyreilly
Copy link
Owner

Yup I agree it's less secure - see the second paragraph:

Please note that exporting keys / connection strings etc from Bicep / ARM templates is generally considered to be a less secure approach. This is because these values will be visible inside the deployments section of the Azure Portal. Anyone who has access to this will be able to see them. An alternative approach would be permissioning our pipeline to access the resources directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants