你好,游客 登录 注册 搜索
背景:
阅读新闻

我们要不要为Oracle listener设置密码

[日期:2017-01-24] 来源:Linux社区  作者:黎俊杰 [字体: ]

在各种论坛中,以及一些数据库安全加固规范中,经常还看到有人强列建议为Oracle listener设置密码的说法,最近,笔者在帮一个单位审核所编制的一份oracle安全加固策略时,发现文中仍然在以不分版本情况下要求为listener设置密码。

随着oracle版本的升级变迁,当今运行的oracle数据库,是否真的还需要设置listener密码呢?是否还能在各类标准规范文档中不分版本的区别就直接将listener设置密码作为标准规范之一呢?

1、看看10g以前版本如何远程管理listener

先来看一篇metalink上的文档 ID 460666.1(How To Remotely Administer a Listener),这是一篇关于如何远程管理listener的文章,文章的APPLIES TO部分,指出适应版本为“Oracle Net Services- Version: 8.1.7.4.0 to 9.2.0.8.0”,文章的GOAL部分,指出,在10g以前版本中,listener程序可以管理远程机器的listener,文中还给出在远程客户机器上关闭listener的方法,方法有两种:

第一种:客户端机器上直接以lsnrctl <command><ip_address>:<port>的方式实现,非常简单,如下所示:

lsnrctl status 192.168.1.100

lsnrctl stop 192.168.1.100:1522

--192.168.1.100就是被远程管理的服务器IP地址,1522为其端口

第二种:客户端机器上的listner.ora文件中配置远程机器的listener信息,如下:

Remote_lsnr =

      (DESCRIPTION =

              (ADDRESS =

                    (PROTOCOL = TCP) 

                    (Host = remote host)

                    (Port = listener port) 

      ) 

Where "remote host" and "listener port" are the host and port where the remote listener is running.

然后,在客户端机器上,就象管理本地listener方式一样管理远端listener,如:

LSNRCTL> set current_listener Remote_lsnr

LSNRCTL> stop Remote_lsnr

从460666.1这篇文档中,其实已经看出来,在10g以前版本中,为listener设置密码的重要性。

2、再来看一篇8i/9i版本如何防止远程关闭listener的文档

Metalink上的文档 ID 361738.1(How To PreventRemote Shutdown of the Oracle 8i/9i Listener),这是一篇关于如何防止listener被远程关闭的文章,该文中的APPLIES TO中明确指出:


Oracle Net Services - Version: 8.1.5.0.0 to 9.2.0.8.0
 Information in this document applies to any platform.
 This article applies only to listener versions prior to 10g.

该方法,只适合于Version: 8.1.5.0.0 to 9.2.0.8.0,而不适合于10以上版本。

文中SOLUTION中的描述,对于10g以前版本,当然就是为listener设置密码了,这样,远程管理listener时,就必须要输入正确的密码才能完成操作。

3、那么10g以后listener不设置密码还安全吗?

再来看一篇metalink上的文档 ID 364388.1(How To NetworkSecure Your Oracle Database Listener in Intranet / Internet)  ,这篇文档中的SOLUTION中,对于10g以上和11gR2版本对listener password的描述如下:

For 10g and higher listeners, no listener password is needed (starting with 11gr2 listener password is deprecated), instead we are using by default OS authentication mechanism - see  Note 260986.1 Setting Listener Passwords With an Oracle 10g or Newer Listener and Note 1328725.1 Deprecation of Listener Password in Oracle Database 11g Release

在10g以上版本中已经不需要为listener设置password,在11gR2上,更是不赞成与反对设置listener密码,而是采用的默认本地主机操作系统认证。

4、那oracle 10g为什么还要保留change password功能呢。

再来看一篇上文中提到的metalink文档 ID 260986.1(SettingListener Passwords With an Oracle 10g or Newer Listener),这篇文档中的GOAL部分内容:

If the TNSListener is started as the "oracle" user and the user "sales" attempts
 to administer the listener, or if "oracle" on a different node attempts to
 administer the listener, the following error will be returned:

TNS-01190: The user is not authorized to execute the requested listener command

当listener是以oracle用户启动时,如果使用OS上的其它用户,例如,使用sales用户来管理listener,如stop等操作,则会遇到”TNS-01190 “ 信息,这时,sales用户需要输入listener的password后才能操作本地listener。

其实也可以控制本地启动listener的用户强制要求使用密码登陆,只需要在listener.ora文件中增加LOCAL_OS_AUTHENTICATION_listener_name = OFF,但是只要是已经登入了OS的管理员或对listener.ora文件有权限的用户,都可以修改该文件去掉该行,所以该操作并不具有意义。

5、oracle 11gR2不赞成与反对再为listener设置密码

再来看一篇Metalink文档 ID 1328725.1 (Deprecationof Listener Password in Oracle Database 11g Release 2) ,这是一篇关于11gR2已经刻弃listener设置密码的文章,该文章中的DETAILS中描述如下:

In Oracle Database 11g Release 2 (11.2), the password feature is being deprecated. This does not cause a loss of security because authentication is enforced through local operating system authentication.

Oracle11gR2废弃listener设置密码,认为已经通过了本地操作系统的认证,所以是安全的。

文中ACTIONS部分列出,如果要使用远程管理listener,只能通过SSH登陆到运行listener的本地主机,通过认证,然后本地管理listener,或使用oracle OEM方式进行管理。

6、oracle 11gR2官方对listener的安全说明与管理方式建议

Local listener administration is secure through local operating system authentication,

which restricts listener administration to the user who started the listener or to the

super user. By default, remote listener administration is disabled.

Oracle recommends that you perform listener administration in the default mode, and

access the system remotely using a remote login. When you administer the listener

remotely, use Oracle Enterprise Manager or Secure Shell (SSH) to access the remote

host.

本地listener管理默认为本地系统认证,这样限制了listener的管理者。默认情况下远程listener程序管理被禁用,建议采用OEM或ssh方式登陆目标端主机后进行管理。

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址http://www.linuxidc.com/Linux/2017-01/139921.htm

linux
相关资讯       Oracle Listener  Oracle listener设置密码 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款