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

Added ability to create service clients anonymously #7421

Merged
merged 5 commits into from
Jan 15, 2020

Conversation

gapra-msft
Copy link
Member

@gapra-msft gapra-msft commented Jan 14, 2020

Resolves #6575

@alzimmermsft
Copy link
Member

Just want to make sure I understand the reasoning behind this change, given that making a call to checkAccess in every API and passing along anonymousAccess feel like an anti-pattern.

Scenario

I have multiple contains which allow public access and I want to generate clients to interact with them.

Option 1

I create a BlobServiceClient which doesn't have authentication information and begin creating BlobContainerClients with getBlobContainerClient.

Option 2

I configure a BlobContainerClientBuilder which doesn't have authentication information and begin creating BlobContainerClients by setting container name and calling buildClient.

This PR is to add support for option 1, correct? Would it be better to push on using option 2 as that falls in-line with the reason why the builder pattern was chosen?

@gapra-msft
Copy link
Member Author

Just want to make sure I understand the reasoning behind this change, given that making a call to checkAccess in every API and passing along anonymousAccess feel like an anti-pattern.

Scenario

I have multiple contains which allow public access and I want to generate clients to interact with them.

Option 1

I create a BlobServiceClient which doesn't have authentication information and begin creating BlobContainerClients with getBlobContainerClient.

Option 2

I configure a BlobContainerClientBuilder which doesn't have authentication information and begin creating BlobContainerClients by setting container name and calling buildClient.

This PR is to add support for option 1, correct? Would it be better to push on using option 2 as that falls in-line with the reason why the builder pattern was chosen?

Option 2 was suggested to the customer but it looks like option 1 is more along the lines of what they wanted as a solution.

@mitchdenny
Copy link
Contributor

/check-enforcer evaluate

@mitchdenny
Copy link
Contributor

/check-enforcer reset

@mitchdenny
Copy link
Contributor

/check-enforcer evaluate

@gapra-msft gapra-msft merged commit 62ceaf6 into Azure:master Jan 15, 2020
@gapra-msft gapra-msft deleted the storage/serviceClient branch January 15, 2020 19:18
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.

[QUERY] Anonymous requests to storage blobs
4 participants