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

Update secret handling and configuration in Bicep files #6

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

FrodeHus
Copy link
Owner

Update secret handling and configuration in Bicep files

Updated BeyondTrustCredentialClient to retrieve secret name from
KEYVAULT_SECRET environment variable and handle deserialization
errors. Added keyvaultSecretName property to functionAppConfig
type in main.bicep and updated related modules to use this
property. Updated functionConfig parameter to include
keyvaultSecretName. Added keyvaultSecretName parameter to
functionapp.bicep and secretName parameter to
vault-role-assignment.bicep. Changed roleAssignment scope to
specific secret within Key Vault.

PR Classification

Code enhancement to improve configuration management and error handling.

PR Summary

Updated the BeyondTrustCredentialClient to use an environment variable for the secret name and improved error handling. Modified Bicep files to support the new configuration.

  • BeyondTrustCredentialClient.cs: Read secret name from KEYVAULT_SECRET environment variable and added null-coalescing operator for deserialization.
  • main.bicep: Added keyvaultSecretName property to functionAppConfig and updated functionappModule and vaultSecretUserRoleAssignment modules.
  • functionapp.bicep: Added keyvaultSecretName parameter and set KEYVAULT_SECRET environment variable.
  • vault-role-assignment.bicep: Added secretName parameter, changed roleAssignment scope, and added keyVaultSecret resource.

Updated BeyondTrustCredentialClient to retrieve secret name from
KEYVAULT_SECRET environment variable and handle deserialization
errors. Added keyvaultSecretName property to functionAppConfig
type in main.bicep and updated related modules to use this
property. Updated functionConfig parameter to include
keyvaultSecretName. Added keyvaultSecretName parameter to
functionapp.bicep and secretName parameter to
vault-role-assignment.bicep. Changed roleAssignment scope to
specific secret within Key Vault.
@FrodeHus FrodeHus merged commit b58cd47 into main Dec 18, 2024
2 checks passed
@FrodeHus FrodeHus deleted the configurable-secret branch December 18, 2024 06:24
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

Successfully merging this pull request may close these issues.

1 participant