mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
update port description
This commit is contained in:
parent
dc1959327f
commit
d44a917385
1 changed files with 2 additions and 22 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue