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

AAD integration script unable to parse space based STDIN arguments and parameters position issue #185

Open
sanjaymantoor opened this issue Jul 27, 2022 · 4 comments

Comments

@sanjaymantoor
Copy link
Member

  • AAD integration script fails in parsing space based arguments like adPrincipal, adUserBaseDN and adGroupBaseDN when it is passed via STDIN
  • adUserBaseDN and adGroupBaseDN arguments were wrongly accpted at shell script from ARM template. Value of adUserBaseDN is received by adGroupBaseDN and value adGroupBaseDN is by adUserBaseDN
@sanjaymantoor
Copy link
Member Author

AAD nested template is accepting parameters like below

"const_aadParameters": "[concat(parameters('wlsUserName'),' ',parameters('wlsPassword'),' ',parameters('wlsDomainName'),' ',parameters('wlsLDAPProviderName'), ' ', parameters('aadsServerHost'), ' ', parameters('aadsPortNumber'), ' ', concat('"',parameters('wlsLDAPPrincipal'),'"'), ' ', parameters('wlsLDAPPrincipalPassword'), ' ', concat('"',parameters('wlsLDAPUserBaseDN'),'"'), ' ', concat('"',parameters('wlsLDAPGroupBaseDN'),'"'), ' ', variables('const_wlsHome'),' ',parameters('adminVMName'),' ',variables('const_wlsAdminPort'),' ',parameters('wlsLDAPSSLCertificate'), ' ', parameters('aadsPublicIP'), ' ', variables('const_adminServerName'), ' ', variables('const_wlsDomainPath'),' ',parameters('enableCustomSSL'),' ',base64(parameters('keyVaultCustomTrustKeyStorePassPhrase')),'',base64(parameters('keyVaultCustomTrustKeyStoreType')))]"

Now it is modified with
"const_aadParameters": "[concat(parameters('wlsUserName'),' ',parameters('wlsPassword'),' ',parameters('wlsDomainName'),' ',parameters('wlsLDAPProviderName'), ' ', parameters('aadsServerHost'), ' ', parameters('aadsPortNumber'), ' ', base64(parameters('wlsLDAPPrincipal')), ' ', parameters('wlsLDAPPrincipalPassword'),' ', base64(parameters('wlsLDAPUserBaseDN')),' ', base64(parameters('wlsLDAPGroupBaseDN')),' ', variables('const_wlsHome'),' ',parameters('adminVMName'),' ',variables('const_wlsAdminPort'),' ',parameters('wlsLDAPSSLCertificate'),' ', parameters('aadsPublicIP'),' ',variables('const_adminServerName'),' ', variables('const_wlsDomainPath'),' ',parameters('enableCustomSSL'),' ',base64(parameters('keyVaultCustomTrustKeyStorePassPhrase')),' ',base64(parameters('keyVaultCustomTrustKeyStoreType')))]",

@sanjaymantoor
Copy link
Member Author

At shell script arguments are changed from
read wlsUserName wlsPassword wlsDomainName adProviderName adServerHost adServerPort adPrincipal adPassword adGroupBaseDN adUserBaseDN oracleHome wlsAdminHost wlsAdminPort wlsADSSLCer wlsLDAPPublicIP wlsAdminServerName wlsDomainPath isCustomSSLEnabled customTrustKeyStorePassPhrase customTrustKeyStoreType

Now position of parameters adUserBaseDN and adGroupBaseDN is changed as per ARM template passing.
read wlsUserName wlsPassword wlsDomainName adProviderName adServerHost adServerPort adPrincipal adPassword adUserBaseDN adGroupBaseDN oracleHome wlsAdminHost wlsAdminPort wlsADSSLCer wlsLDAPPublicIP wlsAdminServerName wlsDomainPath isCustomSSLEnabled customTrustKeyStorePassPhrase customTrustKeyStoreType

@edburns
Copy link
Contributor

edburns commented Jul 27, 2022

@sanjaymantoor I am glad to see this is under control. I look forward to reviewing the PR.

@sanjaymantoor
Copy link
Member Author

Created PR #187 . Refer 813b3c3

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