Tcp在Azure上使用的高性能服务器/框架和配置(Tcp high performance server/framework and configuration to use on Azure)
我们需要编写高性能的tcp服务器并使用azure作为托管。 我们有几种选择:
在c#中描述的Wrte自定义tcp服务器如http://blog.maartenballiauw.be/post/2010/01/17/Creating-an-external-facing-Azure-Worker-Role-endpoint.aspx 。 但我们不想重新发明轮子。
使用WCF(可能是最好的方式)。 在这种情况下,我们需要很好地了解如何配置它,因为有很多配置选项。 有人可以推荐一些配置吗? 我们应该使用wroker角色托管还是IIS托管?
信号/ R。 据我所知,它有第一版,目前已准备就绪,可用作tcp服务器。 哪个更好,性能更高的signalR或WCF? 我们应该使用wroker角色托管还是IIS托管?
零/ C ICE。 有人用吗?
使用ZeroMQ C#绑定,如http://zguide.zeromq.org/cs:asyncsrv所述
不幸的是,我们仍然不知道有关我们协议的一些细节(但它将是二进制的)等等。 因此,我们需要有可能轻松地更改某些服务器行为,而无需更改代码。
知道azure的负载平衡器如何影响服务器行为也很棒。
We need to write high performance tcp server and using azure as a hosting. We have several options:
Wrte custom tcp server in c# like described there http://blog.maartenballiauw.be/post/2010/01/17/Creating-an-external-facing-Azure-Worker-Role-endpoint.aspx. But we don't want to reinvent a wheel.
Use WCF(probably best way). In that case we need good knowledge of how to configure it because there are a lot of configuration options. Could somebody recommend some configuration? And should we use wroker role hosting or IIS hosting?
Signal/R. As I understand it has version one and currently is production ready and can be used as tcp server. Which is better and more performant signalR or WCF? Should we use wroker role hosting or IIS hosting?
Zero/C ICE. Do somebody use it?
Use ZeroMQ C# bindings like described here http://zguide.zeromq.org/cs:asyncsrv
Unfortunately we still don't know some details about our protocol(but it will be binary) and so on. So we need a possibility to easilly change some server behaviour without big code changes.
Also it would be great to know how azure's load ballancer might affect server behaviour.
原文:https://stackoverflow.com/questions/15113184
最满意答案
这实际上是一个非常常见的架构。
核心身份和令牌平台由您拥有 - 这是唯一的理想事情。
然后,您可以使用任何机制(在您的情况下为Azure B2C)进行身份验证。 您可能希望将来添加具有用户或其他身份验证机制的本地数据库。 这完全没问题。
重要的一点是 - 您的应用程序不关心这一点。 他们所知道的只是你的平台(在使用身份服务器构建的情况下)。 如果您决定有一天需要更改身份验证提供程序 - 那没关系。 您的应用程序不受此限制。
此时,您的应用和服务只需要信任来自身份服务器的令牌 - 身份服务器负责与外部各方进行信任交流。
This is actually a very common architecture.
The core identity and token platform is owned by you - and that is the only sane thing to do.
You can then use whatever mechanism (in your case Azure B2C) to do authentication. You might want to add a local database with users or some other authentication mechanism in the future. And that's totally fine.
The important point is - your applications don't care about that. All they know is your platform (in your case built using identityserver). If you decide one day you need to change your authentication provider - that's fine. Your applications are shielded from that fact.
At this point, your apps and services only need to trust the tokens coming from identityserver - identityserver takes care of brokering the trust with the external parties.
相关问答
更多-
在IdentityServer3注册后自动登录本地用户(Automatically login local user after registration with IdentityServer3)[2022-03-27]
使用LoginPageLinks将注册链接添加到登录页面: var authOptions = new Thinktecture.IdentityServer.Core.Configuration.AuthenticationOptions { IdentityProviders = ConfigureIdentityProviders, EnableLocalLogin = true, EnablePostSignOutAutoRedirect = true, LoginP ... -
这一切都是通过配置客户端来完成的。 每个客户端都有一个EnableLocalLogin选项,用于控制基于表单的身份验证。 此外,每个客户端都有一个IdentityProviderRestrictions列表,用于控制哪些外部IdP可用。 检查文档: https : //identityserver.github.io/Documentation/docsv2/configuration/clients.html This is all done by configuring the clients. Eve ...
-
您似乎想要使用OAuth 2.0资源所有者流 - 这意味着 - 您的应用程序将凭据发布到令牌端点并获取访问令牌。 这完全有可能 - 你会错过联邦和SSO等一些功能。 但这些是这种流程的已知限制因素。 如果您想使用基于重定向的流程(它为您提供SSO和Google登录等) - 您需要重定向。 您可以使用自己的任何IdentityServer视图替换它们。 文档和示例有很多信息,如何做到这一点。 https://identityserver.github.io/Documentation/docsv2/advan ...
-
将用户名预先认证并转发给默认身份验证提供程序(Preauthenticate and forward username to default authentication provider)[2023-10-07]
问题是, AuthenticationProvider中的AuthenticationManager通过提供的身份验证凭据类(通常是AbstractAuthenticationToken的子类)在AuthenticationProvider中选择的。 您的PreAuthenticationProcessingFilter将创建一个PreAuthenticatedAuthenticationToken ,它由PreAuthenticatedAuthenticationProvider正常“消耗”。 所以要么: ... -
尝试这个: 在您的客户端(MVC应用程序)中,在配置OpenIdConnectAuthenticationOptions的启动中,在Notifications您应该拥有: RedirectToIdentityProvider = n => { // if signing out, add the id_token_hint if (n.ProtocolMessage.RequestType == OpenIdConnec ...
-
用户的浏览器必须能够访问身份服务器。 这可以通过代理。 The user's browser must be able to access the identity server. This can be via a proxy though.
-
我的问题是我的客户端的设置,我的客户端只接受授予类型的客户端凭证,我还需要包含ResourceOwnerPassword。 我需要在客户端中更改我的格兰特类型,看起来像这样 new Client { ClientId = "oauthClient", ClientName = "Example Client Credentials Client Application", AllowedGrantTypes = GrantTypes.ResourceOwnerPasswordAndC ...
-
您将需要在UserService中实现AuthenticateExternalAsync方法。 您可以使用提供的ExternalIdentity按您自己的机制查找本地用户,然后设置AuthenticateResult。 以下是自定义UserService外部身份验证的一个很好的示例。 You will want to implement the AuthenticateExternalAsync method in the UserService. You can use the ExternalIdent ...
-
我已经开始在IdentityServer4问题中搜索“chrome”和“csp”关键字并找到了这个: https : //github.com/IdentityServer/IdentityServer4/issues/659 事实证明,需要更改授权响应的表单操作CSP,并且1.0.1版本的IdentityServer4版本放宽了此策略指令。 我将IdentityServer4从1.0.0更新到1.0.2,它解决了这个问题。 I've started searching for "chrome" and " ...
-
这实际上是一个非常常见的架构。 核心身份和令牌平台由您拥有 - 这是唯一的理想事情。 然后,您可以使用任何机制(在您的情况下为Azure B2C)进行身份验证。 您可能希望将来添加具有用户或其他身份验证机制的本地数据库。 这完全没问题。 重要的一点是 - 您的应用程序不关心这一点。 他们所知道的只是你的平台(在使用身份服务器构建的情况下)。 如果您决定有一天需要更改身份验证提供程序 - 那没关系。 您的应用程序不受此限制。 此时,您的应用和服务只需要信任来自身份服务器的令牌 - 身份服务器负责与外部各方进行 ...