首页 \ 问答 \ AzureAD身份验证只适用于本地(AzureAD authentication only works on local)

AzureAD身份验证只适用于本地(AzureAD authentication only works on local)

我在门户中设置了我的AzureAD,以及使用AD来验证来自Microsoft的以下指令的appservice。

我制作了一个使用此授权的.net核心应用程序。 它适用于我的本地主机。 但是当我发布它时,我得到这个错误

AADSTS50011:请求中指定的回复URL与为应用程序配置的回复URL不匹配:'614f66a9-xxxx-483a-8bc7-xxxxxxx'

我应该改变什么,以及它如何在我的本地工作,但不是在发布时才起作用?

这是应用的当前配置:

 {
  "AzureAd": {
    "Instance": "https://login.microsoftonline.com/",
    "Domain": "lmyName.onmicrosoft.com",
    "TenantId": "******-ebd5-40d8-829b-*********",
    "ClientId": "*****-8eef-483a-8bc7-********",
    "CallbackPath": "/signin-oidc"
  },
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Warning"
    }
  }
}

当我关注在线入侵时,我被指示配置门户中的appservice以使用回复URL:/.auth/login/aad/callback

这可能与回调路径相同吗?


Ive set up my AzureAD in the portal, and an appservice that uses the AD to authenticate following instructions from microsoft.

Ive made a .net core app that uses this authorisation. It works on my localhost. But when i publish it i get this error

AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: '614f66a9-xxxx-483a-8bc7-xxxxxxx'

What should i change and how come it works in my local but not when published?

This is current configuration of app:

 {
  "AzureAd": {
    "Instance": "https://login.microsoftonline.com/",
    "Domain": "lmyName.onmicrosoft.com",
    "TenantId": "******-ebd5-40d8-829b-*********",
    "ClientId": "*****-8eef-483a-8bc7-********",
    "CallbackPath": "/signin-oidc"
  },
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Warning"
    }
  }
}

When i followed the online intructions i was directed to configure the appservice in the portal to use reply URL: /.auth/login/aad/callback

Could that be the same as callbackPath?


原文:https://stackoverflow.com/questions/49923017
更新时间:2022-08-18 20:08

最满意答案

改编我以前的答案之一:

有几种方法可以“激活”复制的软件,以试图停止应用程序的随意复制。

在最简单的情况下,可能通过您的网站向您购买注册码(“CD key”),并将其发送给将其输入程序或安装程序的用户。 整个过程基本上可以离线完成; 程序本身确定代码是有效的还是无效的。

这很好,很容易,但它极易受密钥共享的影响 - 因为没有“打电话回家”,那么应用程序无法知道成千上万不同的人都使用了他们从互联网或串行库或他们的朋友下载的相同密钥。 制作一些从未真正由开发人员发布的有效密钥的“密钥”也是相当容易的。

然后我们进入在线注册。 你仍然有一些代码,但程序会回到服务器,以确定代码是否有效并且通常是唯一的。 这阻止了基本的密钥共享,因为该公司知道来自世界各地的太多人都在使用相同的密钥。 也许还有一些使用MAC地址的身份识别,在同一硬件上允许无限注册,但似乎是另一台计算机的数量可能有限。

这仍然非常简单,并停止简单的密钥共享。 人们实际上将不得不破解软件或伪装服务器响应以通过它。

有时程序本身部分/大部分是加密的,只能通过在线注册步骤解密。 根据混淆程度如何,那么破解可能非常困难并且非常耗时。 生化奇兵是这方面的一个高调例子 - 首次推出全新的加密/复制保护方案,从发布到破解大约两周。

最后,特别谨慎的应用程序可能会与服务器保持不断的联系,如果连接中断,则拒绝工作。

如果您确定所有的用户都会拥有可靠的互联网连接,那么它可以被认为是保护应用程序的一种强有力的方式,但这是以隐私和一些用户对间谍软件的不信任为代价的。

在这种情况下,为了避开激活,他们需要伪装服务器本身。 蒸汽模拟器和私人WoW服务器就是一个例子。 最后,没有什么是不可破解的。


Adaption of one of my previous answers:

There are a few ways to "activate" copied software to try to stop casual copying of the application.

In the most simplistic case, a registration code ("CD key") purchased from you, possibly via your website, and it is sent to the user who enters it into the program or installer. The whole process can basically be done offline; the program itself locally determines that the code is valid or invalid.

This is nice and easy, but it extremely vulnerable to key sharing - since there's no "phoning home" then the application cannot know that thousands of different people are all using the same key that they got off the internet or a serial library or their friend. It's also reasonably easy to make "keygens" which generate valid-seeming keys that were never actually issued by the developers.

Then we get into online registration. You still have some kind of code, but the program will phone home back to the server to determine whether the code is valid and usually unique. This stops basic key sharing, because the company knows if too many people from all over the world are all using the same key. Perhaps there is some kind of identification involved using MAC address, too, with infinite registrations allowed on the same hardware but maybe a limited number on what appears to be a different computer.

This is still pretty easy and stops simple key sharing. People will actually have to get into cracking the software or faking the server response to get past it.

Sometimes the program itself is partially/mostly encrypted and is only decrypted by the online registration step. Depending on how well this is obfuscated then it can be pretty difficult and time consuming to crack. Bioshock was a high-profile example of this - debuting with a brand new encryption/copy protection scheme that took around two weeks from release to be broken.

Finally, a particularly guarded application might stay in constant contact with the server, refusing to work at all if the connection is severed.

If you know for sure that all your users will all have reliable internet connections then it can be considered quite a strong way to protect the app, at the cost of privacy and some user distrust of the spyware.

In this case to get around the activation they would need to fake the server itself. Steam emulators and private WoW servers are an example of this. And in the end, nothing is uncrackable.

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)