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

Possibility to use SAS token instead of connection string #418

Open
jprecuch opened this issue Apr 5, 2024 · 3 comments
Open

Possibility to use SAS token instead of connection string #418

jprecuch opened this issue Apr 5, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jprecuch
Copy link

jprecuch commented Apr 5, 2024

Hi,
Would it be maybe possible to introduce possibility to use SAS Token instead of connection string?

Azure cli supports this

az storage blob upload --account-name $ACCOUNT --container-name $CONTAINER --type block --file delete-me --sas-token $SAS
@LanceMcCarthy
Copy link
Owner

@jprecuch This action uses the javascript SDK (rather than the CLI tooling), but I'm pretty confident there's got to be an overload to use that instead.

Let me research it and get back to you.

@LanceMcCarthy LanceMcCarthy added the enhancement New feature or request label Apr 5, 2024
@LanceMcCarthy LanceMcCarthy self-assigned this Apr 5, 2024
@LanceMcCarthy
Copy link
Owner

LanceMcCarthy commented Apr 5, 2024

It looks like this is definitely possible, can you confirm what type of SAS token it will be? There are three

I'm expecting it will be account or user, so something like this could probably be implemented quickly

const sasToken = $secret.sasToken;
const blobServiceUri = `https://${secret.accountName}.blob.core.windows.net`;

const blobServiceClient = new BlobServiceClient(
  `${blobServiceUri}?${sasToken}`,
  null
);

@LanceMcCarthy
Copy link
Owner

Hi @jprecuch Just wanted to follow up to see if you know which kind of SAS you need to use (see my last reply). If I implement this, I would like to start with the same kind you're using, then build up from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants