jjzjj

java - 在 weblogic 服务器上将 enforce-valid-basic-auth-credentials 设置为 false 会产生什么后果

coder 2024-03-08 原文

在我的 weblogic 服务器中,我有启用了基本身份验证的应用程序(web.xmlweblogic.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 身份验证客户端请求执行身份验证。

资源链接:

  1. Understanding BASIC Authentication with Unsecured Resources
  2. WebLogic bypass basic authentication

Oracle 对 enforce-valid-basic-auth-credentials 有何看法?

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:

  1. In a text editor, open the config.xml file for the domain where you deployed IBM CMIS for Content Manager OnDemand. The config.xml file is in the Oracle/Middleware/user_projects/domains/domain_name/config directory.
  2. Locate the <security-configuration> element.
  3. Add the following argument to the end of the element:

    <enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth -credentials>

  4. Start or restart all of the servers in the domain.

资源链接:

  1. Disabling Oracle WebLogic Server authentication for IBM CMIS for Content Manager OnDemand

更新#1:

为什么做成false?

Whether or not the system should allow requests with invalid Basic Authentication credentials to access unsecure resources. (Interface=weblogic.management.configuration.SecurityConfigurationMBean Attribute=getEnforceValidBasicAuthCredentials)

实际上,您需要在这里做两件事。

  1. 有时仅仅使它为假是不够的。
  2. 因此,您需要通过 WLST 添加标志:
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


更新#2:

那么,您想知道影响是什么?

默认情况下,WebLogic Server 查看身份验证 header ,即使您的代码和应用程​​序设置为允许匿名访问,如果有任何 HTTP 身份验证 header ,WebLogic 也无法处理请求并抛出浏览器登录对话框:

Publisher Web 服务默认使用身份验证 header ,因此 Publisher 身份验证 header 会发送到您的 portlet 代码。幸运的是,对此的修复非常简单,并记录为将 enforce-valid-basic-auth-credentials 设置为 false。

资源链接:

  1. http://blog.integryst.com/webcenter-interaction/2010/03/24/setting-config-xml-for-weblogic-in-oracles-jdeveloper/

关于java - 在 weblogic 服务器上将 enforce-valid-basic-auth-credentials 设置为 false 会产生什么后果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40397917/

有关java - 在 weblogic 服务器上将 enforce-valid-basic-auth-credentials 设置为 false 会产生什么后果的更多相关文章

  1. ruby - 使用 RubyZip 生成 ZIP 文件时设置压缩级别 - 2

    我有一个Ruby程序,它使用rubyzip压缩XML文件的目录树。gem。我的问题是文件开始变得很重,我想提高压缩级别,因为压缩时间不是问题。我在rubyzipdocumentation中找不到一种为创建的ZIP文件指定压缩级别的方法。有人知道如何更改此设置吗?是否有另一个允许指定压缩级别的Ruby库? 最佳答案 这是我通过查看ruby​​zip内部创建的代码。level=Zlib::BEST_COMPRESSIONZip::ZipOutputStream.open(zip_file)do|zip|Dir.glob("**/*")d

  2. ruby - 使用 ruby​​ 和 savon 的 SOAP 服务 - 2

    我正在尝试使用ruby​​和Savon来使用网络服务。测试服务为http://www.webservicex.net/WS/WSDetails.aspx?WSID=9&CATID=2require'rubygems'require'savon'client=Savon::Client.new"http://www.webservicex.net/stockquote.asmx?WSDL"client.get_quotedo|soap|soap.body={:symbol=>"AAPL"}end返回SOAP异常。检查soap信封,在我看来soap请求没有正确的命名空间。任何人都可以建议我

  3. ruby-openid:执行发现时未设置@socket - 2

    我在使用omniauth/openid时遇到了一些麻烦。在尝试进行身份验证时,我在日志中发现了这一点:OpenID::FetchingError:Errorfetchinghttps://www.google.com/accounts/o8/.well-known/host-meta?hd=profiles.google.com%2Fmy_username:undefinedmethod`io'fornil:NilClass重要的是undefinedmethodio'fornil:NilClass来自openid/fetchers.rb,在下面的代码片段中:moduleNetclass

  4. ruby - 具有身份验证的私有(private) Ruby Gem 服务器 - 2

    我想安装一个带有一些身份验证的私有(private)Rubygem服务器。我希望能够使用公共(public)Ubuntu服务器托管内部gem。我读到了http://docs.rubygems.org/read/chapter/18.但是那个没有身份验证-如我所见。然后我读到了https://github.com/cwninja/geminabox.但是当我使用基本身份验证(他们在他们的Wiki中有)时,它会提示从我的服务器获取源。所以。如何制作带有身份验证的私有(private)Rubygem服务器?这是不可能的吗?谢谢。编辑:Geminabox问题。我尝试“捆绑”以安装新的gem..

  5. ruby-on-rails - 如何使用 instance_variable_set 正确设置实例变量? - 2

    我正在查看instance_variable_set的文档并看到给出的示例代码是这样做的:obj.instance_variable_set(:@instnc_var,"valuefortheinstancevariable")然后允许您在类的任何实例方法中以@instnc_var的形式访问该变量。我想知道为什么在@instnc_var之前需要一个冒号:。冒号有什么作用? 最佳答案 我的第一直觉是告诉你不要使用instance_variable_set除非你真的知道你用它做什么。它本质上是一种元编程工具或绕过实例变量可见性的黑客攻击

  6. ruby-on-rails - 启动 Rails 服务器时 ImageMagick 的警告 - 2

    最近,当我启动我的Rails服务器时,我收到了一长串警告。虽然它不影响我的应用程序,但我想知道如何解决这些警告。我的估计是imagemagick以某种方式被调用了两次?当我在警告前后检查我的git日志时。我想知道如何解决这个问题。-bcrypt-ruby(3.1.2)-better_errors(1.0.1)+bcrypt(3.1.7)+bcrypt-ruby(3.1.5)-bcrypt(>=3.1.3)+better_errors(1.1.0)bcrypt和imagemagick有关系吗?/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ru

  7. ruby-on-rails - date_field_tag,如何设置默认日期? [ rails 上的 ruby ] - 2

    我想设置一个默认日期,例如实际日期,我该如何设置?还有如何在组合框中设置默认值顺便问一下,date_field_tag和date_field之间有什么区别? 最佳答案 试试这个:将默认日期作为第二个参数传递。youcorrectlysetthedefaultvalueofcomboboxasshowninyourquestion. 关于ruby-on-rails-date_field_tag,如何设置默认日期?[rails上的ruby],我们在StackOverflow上找到一个类似的问

  8. ruby-on-rails - s3_direct_upload 在生产服务器中不工作 - 2

    在Rails4.0.2中,我使用s3_direct_upload和aws-sdkgems直接为s3存储桶上传文件。在开发环境中它工作正常,但在生产环境中它会抛出如下错误,ActionView::Template::Error(noimplicitconversionofnilintoString)在View中,create_cv_url,:id=>"s3_uploader",:key=>"cv_uploads/{unique_id}/${filename}",:key_starts_with=>"cv_uploads/",:callback_param=>"cv[direct_uplo

  9. ruby - 用 Ruby 编写一个简单的网络服务器 - 2

    我想在Ruby中创建一个用于开发目的的极其简单的Web服务器(不,不想使用现成的解决方案)。代码如下:#!/usr/bin/rubyrequire'socket'server=TCPServer.new('127.0.0.1',8080)whileconnection=server.acceptheaders=[]length=0whileline=connection.getsheaders想法是从命令行运行这个脚本,提供另一个脚本,它将在其标准输入上获取请求,并在其标准输出上返回完整的响应。到目前为止一切顺利,但事实证明这真的很脆弱,因为它在第二个请求上中断并出现错误:/usr/b

  10. ruby-on-rails - 在 Rails 开发环境中为 .ogv 文件设置 Mime 类型 - 2

    我正在玩HTML5视频并且在ERB中有以下片段:mp4视频从在我的开发环境中运行的服务器很好地流式传输到chrome。然而firefox显示带有海报图像的视频播放器,但带有一个大X。问题似乎是mongrel不确定ogv扩展的mime类型,并且只返回text/plain,如curl所示:$curl-Ihttp://0.0.0.0:3000/pr6.ogvHTTP/1.1200OKConnection:closeDate:Mon,19Apr201012:33:50GMTLast-Modified:Sun,18Apr201012:46:07GMTContent-Type:text/plain

随机推荐