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

Fix ListPath as resourceURI and sasToken #606

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

KnifMelti
Copy link
Contributor

Proposed Changes

Get -ListPath from Private Azure Container using URL protected with SAS token

#579

@KnifMelti KnifMelti marked this pull request as draft April 12, 2024 02:04
@KnifMelti
Copy link
Contributor Author

KnifMelti commented Apr 12, 2024

Can't figure out how to install WAU with the parameter -ListPath like:
-ListPath https://storagesample.blob.core.windows.net/sample-container?v=2023-11-31&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DIxe6cIRCgOVOICGSP%3A377&sp=rcw

? and & are the culprits - my knowledge of PS has come to an end (help wanted)!

@AndrewDemski-ad-gmail-com
Copy link
Contributor

I recommend setting the SAS token as a separate parameter and declaring a required structure on the azure blob container

https://{SOME_STORAGE_BLOB}.azure.com/{PATH_TO_WAU_FOLDER}/WAU/{LIST_TYPE}.txt?{TOKEN_HERE}

That will produce all necessary URIs:

https://someblob.azurestorage.azure.com/WAU/whitelist.txt?{TOKEN_HERE}
https://someblob.azurestorage.azure.com/WAU/blacklinst.txt?{TOKEN_HERE}
https://someblob.azurestorage.azure.com/WAU/graylist.txt?{TOKEN_HERE}

That way the token will be assigned to a folder and we will be operating on string -joins rather than parameterized URIs.
Methink, that one token should be enough to access all resources in that 'WAU' folder.

@KnifMelti
Copy link
Contributor Author

KnifMelti commented Apr 14, 2024

Escaping special characters in parameter -ListPath at installation time explained in README.md

@KnifMelti KnifMelti marked this pull request as ready for review April 14, 2024 05:22
@Romanitho Romanitho merged commit a6eb973 into Romanitho:main Apr 15, 2024
2 checks passed
@KnifMelti KnifMelti deleted the AzurePrivateContainer branch April 16, 2024 14:57
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.

3 participants