Giter Club home page Giter Club logo

Comments (3)

mattchenderson avatar mattchenderson commented on July 16, 2024

@ganiths Can you describe the impact you're seeing as a result of this?

Based on current implementation, there is a separation that would currently prevent customization of that credential from impacting the setup of the extensions. But even if MI probing were still enabled, the system should fall back and use VisualStudioCredential already.

from azure-functions-dotnet-worker.

ganiths avatar ganiths commented on July 16, 2024

@mattchenderson My local machine is currently sitting behind a proxy that requires authentication. When i try to run the application locally, i am getting 407 proxy authentication error when defaultazurecredentials tries to do managedidentity authentication. After the error, its not proceeding in checking the next set of credentials and hence am unable to run the application locally

My application was initially written using .Net6 in process function app and am currently in the process of migrating to .Net 8 isolated worker and due to this error am unable to proceed further with the migration as we cannot test the application locally

in .Net 6 in process function app, i used to disable the managed identity during webjobstartup. But an equivalent one is missing in isolated worker function app.

 public class LocalDevelopmentWebJobsStartup : IWebJobsStartup
    {
        public void Configure(IWebJobsBuilder builder)
        {
            var credOptions = new DefaultAzureCredentialOptions();

            // For Local devlopment, Exclude managed identity authentication from default azure credentials
            // Otherwise it gives 407 Authentication required error
            // Also webjobs startup is required only for local development.
            var isLocalDevelopmentSetting = Environment.GetEnvironmentVariable("IsLocalDevelopment");

            var isConversionSuccess = bool.TryParse(isLocalDevelopmentSetting, out bool isLocalDevelopment);

            if (isConversionSuccess && isLocalDevelopment)
            {
                credOptions.ExcludeManagedIdentityCredential = true;

                builder.Services.AddAzureClients(clientBuilder =>
                {
                    clientBuilder.UseCredential(new DefaultAzureCredential(credOptions));
                });

            }
        }

    }

from azure-functions-dotnet-worker.

phatcher avatar phatcher commented on July 16, 2024

AFAIK The latest Azure Identity packages has some fixes regarding quick failure if it can't get to the MI endpoint

from azure-functions-dotnet-worker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.