-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature: EdgeRC information from a vault #26
Comments
Interesting suggestion! Might be easier to make the session function simply set environment variables, since this method is used a lot with other tools (e.g. Docker). This might interfere with users who assume subsequent functions are using .edgerc files but we could write a warning to the shell if that were the case. What do you think? |
I hesitate to store anything in the registry that is not encrypted. It would be better to store in in the Credential store when in windows, and some other keyring in other OSes. |
I have most of this already written. I can check it in an do a pull request if you agree that it would be a good enhancement. |
Sure, I'd be keen to see what you've designed. I will likely implement support for environment variables anyway, since it is in line with other Akamai tools we are developing, but there is no harm in additional methods. I could add support for specifying the host, access token, client token and client secret as parameters, but it would require editing all 600+ functions to support it, which is the only reason I am hesitant to do so. |
Fix for issue akamai#26 Adds an Akamai session variable to be used by Invoke-AkamaiRestMethod Add session auth management via a script variable
Can you rebase your PR please? I merged in some fairly large changes to the Invoke-AkamaiRestMethod function, though it shouldn't change your logic |
Fix for issue akamai#26 Adds an Akamai session variable to be used by Invoke-AkamaiRestMethod Add session auth management via a script variable
Merge in A2S/akamaipowershell from cam to master * commit '0d1e8f364063ad917b63ce257775c26708469884': Adding tests Final endpoints Access Key functions
A feature for consideration: Get all the authentication information from a script level variable that was set from a vault or passed in from the calling application.
Use case:
Passing the credential could be as simple as giving a setter function like
Which would set the $Script:AkamaiSession variable to the variable information or optionally return session variable containing the info. This script wide variable could be used by the Invoke-AkamaiRestMethod instead of the .edgerc file if the EdgeRCFile variable is intentionally left null.
To make the process more flexible, the New-AkamaiSession function could use a -PassThrough that would not set the script scoped variable, but only return a new variable in the right format. Also a function Set-AkamaiSession could be used to switch session context with a variable containing the return of a New-AkamaiSession -Passthrough
New code to be introduced with change
The text was updated successfully, but these errors were encountered: