update port description

This commit is contained in:
Christoph Hartmann 2015-10-31 17:49:58 +01:00 committed by Dominik Richter
parent dc1959327f
commit d44a917385

View file

@ -3179,7 +3179,7 @@ A ``port`` |inspec resource| block declares a port, and then depending on what n
its('process') {should eq 'syslog'}
end
where the ``syslog`` process is tested to see if it's listening on port 514.
where the ``process`` returns the process listening on port 514.
Matchers
-----------------------------------------------------
@ -3193,22 +3193,6 @@ The ``be_listening`` matcher tests if the port is listening for traffic:
it { should be_listening }
be_listening.with()
+++++++++++++++++++++++++++++++++++++++++++++++++++++
The ``be_listening`` matcher can also test if the port is listening for traffic over a specific protocol or on local binding address. Use ``.with()`` to specify a protocol or local binding address. For example, a protocol:
.. code-block:: ruby
it { should be_listening.with('tcp') }
A local binding address:
it { should be_listening.with('127.0.0.1:631') }
A protocol and a local binding address:
it { should be_listening.with('tcp', '127.0.0.1:631') }
pid
+++++++++++++++++++++++++++++++++++++++++++++++++++++
The ``pid`` matcher tests the process identifier (PID):
@ -3261,7 +3245,7 @@ The following examples show how to use this InSpec audit resource.
its('protocol') {should eq 'tcp6'}
end
**Test ports for SSL, then verify ciphers**
**Test ports for HTTPs**
.. code-block:: ruby
@ -3274,10 +3258,6 @@ The following examples show how to use this InSpec audit resource.
its('protocol') {should eq 'tcp'}
end
describe sshd_conf do
its('Ciphers') { should eq('chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr') }
end
postgres_conf
=====================================================
Use the ``postgres_conf`` |inspec resource| to test the contents of the configuration file for |postgresql|, typically located at ``/etc/postgresql/<version>/main/postgresql.conf`` or ``/var/lib/postgres/data/postgresql.conf``, depending on the platform.