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] Blobs in my Storage Account not being read by latest version of nuget package #47510

Open
philipcj opened this issue Dec 11, 2024 · 4 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@philipcj
Copy link

Library name and version

Azure.Storage.Blobs 12.23.0

Describe the bug

I have .NET 4.8 web application (a legacy app yet to be converted to .NET core)
I am using 12.21.0 of Azure.Storage.Blobs and it works, if I upgrade to the latest it silently fails. Its Microsoft code thats failing. I have a .NET Core Login app that uses asp.net identity to login and create the cookies.
If I use the latest version of the blob nuget package, it silently fails and I can't login. It just redirects to the login page.

Expected behavior

Reading keys.xml from the blob storage.

Actual behavior

It fails silently.

Reproduction Steps

Code that we are using that works on the previous versions and has done for the past couple of years.

        app.UseCookieAuthentication(new CookieAuthenticationOptions
        {
            AuthenticationType = "Identity.Application",
            LoginPath = new PathString("/Account/Login"),
            Provider = new CookieAuthenticationProvider(),
            CookieName = ".MyCookieName",
            CookieDomain = authorityDomain,
            CookieSameSite = SameSiteMode.Lax,
            CookieSecure = CookieSecureOption.Always,
            TicketDataFormat = new AspNetTicketDataFormat(
                new DataProtectorShim(
                    //DataProtectionProvider.Create(new DirectoryInfo(@"c:\temp\common"),
                    DataProtectionProvider.Create(new DirectoryInfo(@"\"),
                    (builder) =>
                    {
                        builder.SetApplicationName("MyApplicationName")
                            .PersistKeysToAzureBlobStorage(masterStorageConnectionString, "authkeys", $"keys{authorityDomain}.xml");

                        var idsCertificateThumbprint = ConfigurationManager.AppSettings["IdsCertificateThumbprint"];
                        if (!string.IsNullOrEmpty(idsCertificateThumbprint))
                            builder.ProtectKeysWithCertificate(idsCertificateThumbprint);
                    })
                    .CreateProtector(
                        "Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware",
                        // Must match the Scheme name used in the ASP.NET Core app, i.e. IdentityConstants.ApplicationScheme
                        "Identity.Application",
                        "v2"))),
            CookieManager = new IdsCookieManager(authorityDomain, authorityUrls),
            SlidingExpiration = true,
            CookieHttpOnly = true

        });

Environment

.NET 4.8 (code above)
Cookie created by a .NET 8 Asp.NET core mvc web app (ASP.NET Identity core)

@philipcj
Copy link
Author

I have also raised Bug #47467 also related to package versions but 47467 relates to a .NET Core function app.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 11, 2024
@jsquire jsquire added Storage Storage Service (Queues, Blobs, Files) Service Attention Workflow: This issue is responsible by Azure service team. Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Dec 11, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@seanmcc-msft
Copy link
Member

@philipcj what type of authentication are you using?

@philipcj
Copy link
Author

philipcj commented Feb 7, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

3 participants