Azure / Azure/bicep-registry-modules
[AVM Module Issue]: Authentication (Easy auth) secret on the app settings
@pankajagrawal16 is already working on this.
Since Sep 3, 2025.
- Dominant language
- Bicep
- Stars
- 737
- Forks
- 564
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 30
Description
### Check for previous/existing GitHub issues
- [x] I have checked for previous/existing GitHub issues
### Issue Type?
I'm not sure
### Module Name
avm/res/web/site
### (Optional) Module Version
0.11.1
### Description
Hi!
I am using the site module and trying to add the client secret of the app to the app settings (environment variables) since I want to use the built-in Azure authentication middleware.
I tried to pass the `EASYAUTH_SECRET` in to the appsettings object as in the [example](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/web/site#example-2-function-app-using-large-parameter-set) . This works fine when I have a hardcoded secret but if I am going to follow security best practices I will need to have it in a more secure place like a Keyvault. The `.getSecret('secretName')` method of the Keyvault is allowed only for passing the value to a module parameter that has the `@secure()` decorator.
Example:
```
module app 'br/public:avm/res/web/site:0.11.1' = {
name: 'app'
params: {
appSettingsKeyValuePairs: {
EASYAUTH_SECRET : existingKeyvault.getSecret('MyAppClientSecret')
}
...
```
Is there a "secure" way to pass in the Easy auth secret to the app settings using the verified module?
I am trying to resolve this now by manually appending the appsettings with a custom module where I unify existing appsettings with the secret but I would like to be able to send this value in the verified module directly instead, especially when the example states that this should be a possible configuration.
Appreciate any responses.
### (Optional) Correlation Id
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.