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

[Bug]: Minor Tweaks - Module Aliases, Global Variables, code logic #6

Open
1 task done
cksapp opened this issue Jul 5, 2024 · 1 comment
Open
1 task done
Assignees

Comments

@cksapp
Copy link
Contributor

cksapp commented Jul 5, 2024

What happened?

Noticed a few minor changes to be made to the module functions, i.e 'bcdr' variable updated to reflect 'saas', alias attributes, and API secret key is not passed as secure string. Meaning when passing secure string object down from pipeline or secret store this must first be converted to plain text and passed to the function as plain text, possibly leading to secret key being captured in logs.

Expected behavior?

Do not fail with error in creating new alias for functions, saas parameters variable should be named appropriately, and API secret key should be passed as secure string.

Possible Solution?

https://github.com/cksapp/Datto-PowerShellWrapper/tree/moduleTweaks

PowerShell Version

7.4.x - (PowerShell Core)

What operating system are you seeing the problem on?

Windows

Relevant log output

New-Alias -Name Set-DattoBaseURI -Value Add-DattoBaseURI
New-Alias: The alias is not allowed, because an alias with the name 'Set-DattoBaseURI' already exists.



$Key = read-host "enter key" -AsSecureString
enter key: ***********

$key
System.Security.SecureString

Add-DattoApiKey -Api_Key_Public A1B23C -Api_Key_Secret $key

Get-DattoAPIKey

PublicKey                    SecretKey
---------                    ---------
A1B23C    System.Security.SecureString

Get-DattoAPIKey -plainText

PublicKey SecretKey
--------- ---------
A1B23C    System.Security.SecureString

Help Commands

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@cksapp
Copy link
Contributor Author

cksapp commented Jul 5, 2024

Also noticed a few additional endpoints for IT Glue integration so we may wish to look at adding those shortly

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