Comments (3)
I Solved it by deploy a Proxy service for the Service fabric service, that handles the authentication for us.
private const int StreamCopyBufferSize = 81920;
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
// send every request to Service fabric api
app.MapWhen(ctx => true, appBuilder =>
{
appBuilder.Run(async context =>
{
var requestMessage = context.Request.ToHttpRequestMessage("localhost",19080);
try
{
var response = await Client.SendAsync(requestMessage);
using (var responseStream = await response.Content.ReadAsStreamAsync())
{
await responseStream.CopyToAsync(context.Response.Body, StreamCopyBufferSize, context.RequestAborted);
}
}
catch (Exception e)
{
await context.Response.WriteAsync(e.ToString());
context.Response.StatusCode = 500;
}
});
});
}
private static readonly HttpClient Client = new HttpClient(
new HttpClientHandler
{
UseDefaultCredentials = true,
})
{
BaseAddress = new Uri("http://localhost:19080")
};
And I changed the clustermanagementurl to the new Proxy Service Url
from traefik-extra-service-fabric.
Please refer to this issue for more details.
In summary it's a known limitation of the integration, it only supports certificate authentication.
from traefik-extra-service-fabric.
To build on @pregress's answer, this is now even simpler with the Microsoft.AspNetCore.Proxy
package (assuming you're using ASP.NET Core):
<PackageReference Include="Microsoft.AspNetCore.Proxy" Version="0.2" />
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.RunProxy(new ProxyOptions
{
Host = "localhost",
Port = "19080",
Scheme = "http",
BackChannelMessageHandler = new HttpClientHandler() { UseDefaultCredentials = true }
});
}
}
from traefik-extra-service-fabric.
Related Issues (20)
- v1.6rc docs reference v1.5 label HOT 2
- Stateful service documentation or example HOT 1
- Grouped backend labels are incorrect
- Traefik fails to register any services when a service has a bad label HOT 4
- Support for multiple front-end rule sets HOT 3
- Key Already Exist Error with Stateless Service with Multiple Named Partitions HOT 4
- Support for non-http backends HOT 8
- SF endpoint resolution HOT 7
- Load Shedding with SF and Traefik
- Consolidate code and docs
- Service Fabric endpoint selection not working when listening on multiple ports HOT 2
- Traefik fails to parse extension labels containing newline characters HOT 1
- Azure Service Fabric ACME Clustering HOT 1
- passTLSClientCert/Infos for Azure Service Fabric provider
- Traefik URL - How to set the ApplicationName and ServiceName HOT 1
- How to add custom headers to some responses
- Documentation request: Labels required to utilize Error Pages functionality HOT 1
- Support for Traefik v2 HOT 7
- Error retrieving serviceExtensionMap using ServiceFabric. "Version" not properly encoded when added to the URL. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traefik-extra-service-fabric.