当前位置: 首页 > news >正文

网站手机采集湖南关键词优化首选

网站手机采集,湖南关键词优化首选,哪个视频网站做视频最赚钱的,手机移动网站设计总结: 设置匿名访问,只需要设置xpack.security.authc.anonymous.username和xpack.security.authc.anonymous.roles参数就行,设置好后,可以匿名访问也可以非匿名访问,但是非匿名访问的情况下必须保证用户名和密码正确 取…

总结:
设置匿名访问,只需要设置xpack.security.authc.anonymous.username和xpack.security.authc.anonymous.roles参数就行,设置好后,可以匿名访问也可以非匿名访问,但是非匿名访问的情况下必须保证用户名和密码正确
取消https模式即取消TLS只用http的情况下,必须xpack.security.enabled和xpack.security.http.ssl.enabled和xpack.security.transport.ssl.enabled三个参数一起设置为false,这种模式下,不管是否设置匿名访问,都可以匿名访问,也可以非匿名访问并且用户名和密码错误也可以访问,也就是说取消https模式即取消TLS只用http的情况下,是完全的不要认证更不会管是否匿名访问还是不匿名访问了

ES如果直接不需要输入账号密码就能实现curl查询集群状态的话,那么可以使用设置匿名访问的方式,在三个节点上的/etc/elasticsearch/elasticsearch.yml设置下面2个参数,以实现匿名访问
xpack.security.authc.anonymous.username: anonymous_user
The username (principal) of the anonymous user. Defaults to _es_anonymous_user.
匿名用户的用户名(主体)

xpack.security.authc.anonymous.roles: superuser
The roles to associate with the anonymous user. Required.
与匿名用户关联的角色。必需的。

下面3个参数设置与否对匿名访问没有影响
xpack.security.authc.token.enabled: false
Set to false to disable the built-in token service. Defaults to true unless xpack.security.http.ssl.enabled is false. This prevents sniffing the token from a connection over plain http.
设置为 false 以禁用内置令牌服务。默认为 true,除非 xpack.security.http.ssl.enabled 为 false。这可以防止通过普通http连接嗅探令牌

xpack.security.http.ssl.client_authentication
Controls the server’s behavior in regard to requesting a certificate from client connections. Valid values are required, optional, and none. required forces a client to present a certificate, while optional requests a client certificate but the client is not required to present one. Defaults to none.
控制服务器在从客户端连接请求证书方面的行为。有效值是必需的、可选的和无。必需的强制客户端提供证书,而可选的则请求客户端证书但不要求客户端提供证书。默认为无。
–这个参数不是说配置为none就是客户端浏览器不用输入账号密码就能访问,而是说客户端浏览器访问服务器web时,服务器web端是否也需要客户端浏览器提供证书才能允许客户端浏览器连接服务器web端,就类似网银一样客户端那边的浏览器需要安装控件什么的才能正常访问银行网站。

xpack.security.authc.anonymous.authz_exception
When true, an HTTP 403 response is returned if the anonymous user does not have the appropriate permissions for the requested action. The user is not prompted to provide credentials to access the requested resource. When set to false, an HTTP 401 response is returned and the user can provide credentials with the appropriate permissions to gain access. Defaults to true.
如果为 true,则如果匿名用户没有所请求操作的适当权限,则会返回 HTTP 403 响应。系统不会提示用户提供访问所请求资源的凭据。当设置为 false 时,将返回 HTTP 401 响应,并且用户可以提供具有适当权限的凭据来获取访问权限。默认为 true。

设置如下

xpack.security.authc.anonymous.username: anonymous_user
xpack.security.authc.anonymous.roles: superuser

验证结果,用密码和不用密码都可以正常访问,但是用错误密码无法访问

root@woncnesdbtest1:~# curl -XGET "https://woncnesdbtest1:9200/_cat/health?v" -k
root@woncnesdbtest1:~# curl -XGET -uelastic:rightpassword "https://woncnesdbtest1:9200/_cat/health?v" -k
root@woncnesdbtest1:~# curl -XGET -uelastic:wrongpassword "https://woncnesdbtest1:9200/_cat/health?v" -k
{"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [elastic] for REST request [/_cat/health?v]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}}],"type":"security_exception","reason":"unable to authenticate user [elastic] for REST request [/_cat/health?v]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}},"status":401}

如何设置http,即如何取消https,只需要把下面三个参数设置为false并重启即可

xpack.security.enabled: false
xpack.security.http.ssl:enabled: false
xpack.security.transport.ssl:enabled: false

xpack.security.enabled
(Static) Defaults to true, which enables Elasticsearch security features on the node. This setting must be enabled to use Elasticsearch’s authentication, authorization and audit features.
默认为 true,这会在节点上启用 Elasticsearch 安全功能。必须启用此设置才能使用 Elasticsearch 的身份验证、授权和审核功能。

xpack.security.http.ssl.enabled
(Static) Used to enable or disable TLS/SSL on the HTTP networking layer, which Elasticsearch uses to communicate with other clients. The default is false.
用于启用或禁用 HTTP 网络层上的 TLS/SSL,Elasticsearch 使用该网络层与其他客户端进行通信。默认为 false。

xpack.security.transport.ssl.enabled
(Static) Used to enable or disable TLS/SSL on the transport networking layer, which nodes use to communicate with each other. The default is false.
用于启用或禁用传输网络层上的 TLS/SSL,节点使用该层相互通信。默认为 false。

如果只是xpack.security.transport.ssl.enabled把设置为false,但是xpack.security.enabled还是true会有如下报错
bootstrap check failure [1] of [1]: Transport SSL must be enabled if security is enabled. Please set [xpack.security.transport.ssl.enabled] to [true] or disable security by setting [xpack.security.enabled] to [false]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.17/bootstrap-checks-xpack.html#bootstrap-checks-tls]

设置为不启用SSL并且非匿名访问,发现最后还是可以匿名访问并且非匿名访问时用错误的密码可以正常连接

xpack.security.enabled: false
xpack.security.http.ssl:enabled: false
xpack.security.transport.ssl:enabled: false
#xpack.security.authc.anonymous.username: anonymous_user
#xpack.security.authc.anonymous.roles: superuser

验证

root@woncnesdbtest1:~# curl -XGET "https://woncnesdbtest1:9200/_cat/health?v" -k
curl: (35) error:0A00010B:SSL routines::wrong version number
root@woncnesdbtest1:~# 
root@woncnesdbtest1:~# curl -XGET -uelastic:rightpassword "https://woncnesdbtest1:9200/_cat/health?v" -k
curl: (35) error:0A00010B:SSL routines::wrong version number
root@woncnesdbtest1:~# 
root@woncnesdbtest1:~# curl -XGET "http://woncnesdbtest1:9200/_cat/health?v" -k
epoch      timestamp cluster          status node.total node.data shards pri relo init unassign unassign.pri pending_tasks max_task_wait_time active_shards_percent
1735899387 10:16:27  dailaesdbcluster green           4         4     14   6    0    0        0            0             0                  -                100.0%
root@woncnesdbtest1:~# 
root@woncnesdbtest1:~# curl -XGET -uelastic:rightpassword "http://woncnesdbtest1:9200/_cat/health?v" -k
epoch      timestamp cluster          status node.total node.data shards pri relo init unassign unassign.pri pending_tasks max_task_wait_time active_shards_percent
1735899393 10:16:33  dailaesdbcluster green           4         4     14   6    0    0        0            0             0                  -                100.0%
root@woncnesdbtest1:~# 
root@woncnesdbtest1:~# curl -XGET -uelastic:wrongpassword "http://woncnesdbtest1:9200/_cat/health?v" -k
epoch      timestamp cluster          status node.total node.data shards pri relo init unassign unassign.pri pending_tasks max_task_wait_time active_shards_percent
1735899409 10:16:49  dailaesdbcluster green           4         4     14   6    0    0        0            0             0                  -                100.0%

设置为不启用SSL并且匿名访问,发现最后还是可以匿名访问并且非匿名访问时用错误的密码可以正常连接

xpack.security.enabled: false
xpack.security.http.ssl:enabled: false
xpack.security.transport.ssl:enabled: false
xpack.security.authc.anonymous.username: anonymous_user
xpack.security.authc.anonymous.roles: superuser

验证

root@woncnesdbtest1:~# curl -XGET "https://woncnesdbtest1:9200/_cat/health?v" -k
curl: (35) error:0A00010B:SSL routines::wrong version number
root@woncnesdbtest1:~#
root@woncnesdbtest1:~# curl -XGET -uelastic:rightpassword "https://woncnesdbtest1:9200/_cat/health?v" -k
curl: (35) error:0A00010B:SSL routines::wrong version number
root@woncnesdbtest1:~#
root@woncnesdbtest1:~# curl -XGET "http://woncnesdbtest1:9200/_cat/health?v" -k
epoch      timestamp cluster          status node.total node.data shards pri relo init unassign unassign.pri pending_tasks max_task_wait_time active_shards_percent
1735900832 10:40:32  dailaesdbcluster green           4         4     14   6    0    0        0            0             0                  -                100.0%
root@woncnesdbtest1:~#
root@woncnesdbtest1:~# curl -XGET -uelastic:rightpassword "http://woncnesdbtest1:9200/_cat/health?v" -k
epoch      timestamp cluster          status node.total node.data shards pri relo init unassign unassign.pri pending_tasks max_task_wait_time active_shards_percent
1735900849 10:40:49  dailaesdbcluster green           4         4     14   6    0    0        0            0             0                  -                100.0%
root@woncnesdbtest1:~#
root@woncnesdbtest1:~# curl -XGET -uelastic:wrongpassword "http://woncnesdbtest1:9200/_cat/health?v" -k
epoch      timestamp cluster          status node.total node.data shards pri relo init unassign unassign.pri pending_tasks max_task_wait_time active_shards_percent
1735900861 10:41:01  dailaesdbcluster green           4         4     14   6    0    0        0            0             0                  -                100.0%
root@woncnesdbtest1:~#
http://www.shuangfujiaoyu.com/news/55674.html

相关文章:

  • 东莞现在好找工作吗seo搜索优化技术
  • 企业网站建设应该怎么做开发定制软件公司
  • 珠海做网站费用深圳网站建设三把火科技
  • 长春网站建设电话国家高新技术企业名单
  • 美工设计素材网站厦门百度seo
  • 免费做网站支持绑定seo网站优化工具
  • 蚌埠网站开发网站竞价推广都有哪些
  • 2022最新的旅游资讯seo工资待遇怎么样
  • 企业网站建设实训建议搜索引擎有哪些平台
  • 展示型网站建设价格交换友情链接的渠道
  • 广西省建设厅建委网站天津关键词排名推广
  • 襄阳头条新闻淘宝关键词优化
  • 网站开发用C营销手段和营销方式
  • 网站建设青岛手机版谷歌浏览器入口
  • 互动性网站网络优化工程师主要做什么
  • 云南网站备案系统关键词什么意思
  • 提示危险网站软文平台有哪些
  • 帝国 cms 网站关键字可以免费发广告的网站
  • 保险网站建设平台app推广注册从哪里接单
  • 网站建设公司上海做网站公司哪家好写软文
  • 体育彩票网站开发方案东营网站建设哪家更好
  • 怎么制作网站首页网站seo关键词优化排名
  • 石家庄做网站科技公司广州优化疫情防控举措
  • 工商银行门户网站是什么意思河南今日头条新闻
  • 上饶有哪些做网站的店性能优化工具
  • 响应式潍坊网站建设朝阳seo排名优化培训
  • 怎么直接做免费网站吗百度百家号官网
  • 嘉定网站建设网页制作天堂网长尾关键词挖掘网站
  • 做爰 网站如何查看网站收录情况
  • 做导购网站网络营销策划书怎么写