- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
在我的 weblogic 服务器中,我有启用了基本身份验证的应用程序(web.xml
和 weblogic.xml
)。现在我正在将 spring-boot 应用程序从 tomcat 移植到 weblogic,weblogic 也是基本身份验证,但在应用程序层。因此,当我移植它时它不起作用,我需要将 enforce-valid-basic-auth-credentials
设置为 false
。现在我希望我应该重构我在同一域上运行的第一个应用程序(它在虚拟主机上运行),但似乎身份验证仍在该应用程序中工作。那么,当我在生产服务器上设置此选项时会产生什么后果?
最佳答案
The
enforce-valid-basic-auth-credentials
flag effects the entire domain. So, it will work for both of your project.
默认情况下,enforce-valid-basic-auth-credentials 标志为 true,并执行 WebLogic Server 身份验证。如果身份验证失败,请求将被拒绝。因此,WebLogic Server 必须知道用户和密码。
如果您依赖备用身份验证机制,您可能想要更改默认行为。例如,您可以使用后端 Web 服务对客户端进行身份验证,而 WebLogic Server 不需要了解用户。启用默认身份验证实现后,Web 服务可以进行自己的身份验证,但前提是 WebLogic Server 身份验证首先成功。
如果您显式设置 enforce-valid-basic-auth-credentials
标记为 false,WebLogic Server 不对目标资源未启用访问控制的 HTTP BASIC 身份验证客户端请求执行身份验证。
Oracle WebLogic Server authentication is enabled by default. However, this configuration prevents Oracle WebLogic Server from using application managed authentication. You must disable Oracle WebLogic Server authentication by setting the enforce-valid-basic-auth-credentials parameter to false.
Procedure
To disable Oracle WebLogic Server authentication:
- In a text editor, open the
config.xml
file for the domain where you deployed IBM CMIS for Content Manager OnDemand. Theconfig.xml
file is in the Oracle/Middleware/user_projects/domains/domain_name/config directory.- Locate the
<security-configuration>
element.Add the following argument to the end of the element:
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth
-credentials>Start or restart all of the servers in the domain.
Whether or not the system should allow requests with invalid Basic Authentication credentials to access unsecure resources. (Interface=weblogic.management.configuration.SecurityConfigurationMBean Attribute=getEnforceValidBasicAuthCredentials)
实际上,您需要在这里做两件事。
connect('weblogicUser','weblogicPassword','t3://localhost:7001')
edit()
startEdit()
cd('SecurityConfiguration/Your_Domain')
set('EnforceValidBasicAuthCredentials','false')
save()
activate()
注意:(不要忘记在“cd”命令中使用您的 weblogicUser、weblogicPassword、weblogic url 和您的域进行编辑...)。如果你成功地完成了这些事情,那么它将影响你的配置文件。
重启服务器后,如果你查看config.xml
文件,并添加了另一个标签。现在,config.xml
文件看起来像这样:
.........
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
<use-kss-for-demo>true</use-kss-for-demo>
</security-configuration>
............
但是这个use-kss-for-demo
标记可能取决于您的 weblogic 配置。所以Val Bonn强烈建议使用 WSLT 方式更新此标志。
https://stackoverflow.com/a/39619242/2293534
那么,您想知道影响是什么?
默认情况下,WebLogic Server 查看身份验证 header ,即使您的代码和应用程序设置为允许匿名访问,如果有任何 HTTP 身份验证 header ,WebLogic 也无法处理请求并抛出浏览器登录对话框:
Publisher Web 服务默认使用身份验证 header ,因此 Publisher 身份验证 header 会发送到您的 portlet 代码。幸运的是,对此的修复非常简单,并记录为将 enforce-valid-basic-auth-credentials 设置为 false。
关于java - 在 weblogic 服务器上将 enforce-valid-basic-auth-credentials 设置为 false 会产生什么后果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40397917/
当我尝试输入时,我正在关注 Ray Wenderlich ( https://videos.raywenderlich.com/screencasts/545-server-side-swift-wi
我正在使用 javax.validation.Validation 来验证 jpa 实体。我总是针对相同的实体进行验证。 我想知道是对所有验证使用一个 validator 更好,还是每次验证时实例化一
Controller : @RequestMapping(...) public void foo(@Valid Parent p){ } class Parent { @NotNull // j
在 login.phtml 中,validator 和 validate 之间有什么区别 - 有人可以解释下面每一行的含义 function onepageLogin(button)
我有一个 java bean 用于将 JSON 消息发送到 spring @RestController 并且我有 bean 验证设置并使用 @Valid 运行得很好。但我想转移到 Protobuf/
我正在使用 vee-validate 来验证注册表单,我编写了如下代码,
使用 有什么区别属性和 标签? 我应该什么时候使用哪一种? 最佳答案 validator属性允许您引用独立的托管 bean 方法,而不仅仅是像这样的验证器
我们有这个 Alamofire 错误处理: Alamofire.request(.GET, getUrl("mystuff")).responseData { response in guar
以下代码创建了两个单选按钮。每个选项都包含一个日期值,该日期值已成功转换为格式为“yyyy-MM-dd”的标签。一旦我做出选择并单击下一步按钮,我就会收到以下错误“j_idt12:comDateCho
是否有类似的验证: req.checkBody('property', 'should be present').isPresent(); 值本身并不重要。 现在我使用这个解决方案: .isLengt
系列文章: 1、async-validator 源码学习(一):文档翻译 2、async-validator 源码学习笔记(二):目录结构 3、async-validator 源码学习笔记(三):ru
我正在使用 Backbone.Validation插入。我有一个模型可以在服务器端进行唯一性检查。我如何让 backbone.validation 识别错误并运行我设置的回调以显示返回的错误消息? t
我有一个 Knockout.Validation 场景,我认为该场景相当普遍,但尚未通过在网络上搜索和本网站上的各种答案找到解决方案。 我正在验证的属性在 ajax 调用之后才会添加到可观察到的 kn
我是 Knockout JS 的新手。我需要一个验证器来验证用户将在文本框中输入的日期。为此编写了如下代码 ko.validation.rules['date'] = { validator:
如何在 JSF 验证器中比较两个字符串是否相等? if (!settingsBean.getNewPassword().equals(settingsBean.getConfirmPassword()
我有简单的域: package app class Customers { String CUSTOMER String NOTE static mapping = {
我正在使用 ember-validations 来验证表单中的模型。 如果我使用 createRecord 创建记录,则模型的实例已经过验证,因此在用户输入值之前表单已经显示验证错误。 我只想在提交表
我有两种不同的服务:第一个是将对象保存到数据库,第二个是更新现有对象。 我正在对我的对象使用验证约束,例如(@NotBlank、@Size、@Pattern 等),在第一种情况下,我需要验证对象的所有
我有 2 个 ensure - 验证装饰器用于 2 个字段:password 和 retypePassword。我想在填写 retypePassword 字段时检查这两个字段是否相等。 问题是,当我在
I'm aware that it's a bug ,但是在域类上调用 validate() 会覆盖之前放入的任何拒绝: def save = { def assignment = new A
我是一名优秀的程序员,十分优秀!