diff --git a/controls/bigip.rb b/controls/bigip.rb index 95ed655..78b33a4 100644 --- a/controls/bigip.rb +++ b/controls/bigip.rb @@ -9,6 +9,7 @@ DO_VERSION = input('do_version') AS3_VERSION = input('as3_version') TS_VERSION = input('ts_version') +FAST_VERSION = input('fast_version') control "bigip-connectivity" do impact 1.0 @@ -24,7 +25,6 @@ # is the declarative onboarding end point available? describe http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/declarative-onboarding/info", auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD}, - params: {format: 'html'}, method: 'GET', ssl_verify: false) do its('status') { should cmp 200 } @@ -37,7 +37,6 @@ title "BIG-IP has specified version of Declarative Onboarding" describe json(content: http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/declarative-onboarding/info", auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD}, - params: {format: 'html'}, method: 'GET', ssl_verify: false).body) do its([0,'version']) { should eq DO_VERSION } @@ -50,7 +49,6 @@ # is the declarative onboarding end point available? describe http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/appsvcs/info", auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD}, - params: {format: 'html'}, method: 'GET', ssl_verify: false) do its('status') { should cmp 200 } @@ -63,7 +61,6 @@ title "BIG-IP has specified version of Application Services" describe json(content: http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/appsvcs/info", auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD}, - params: {format: 'html'}, method: 'GET', ssl_verify: false).body) do its('version') { should eq AS3_VERSION } @@ -72,11 +69,10 @@ control "bigip-telemetry-streaming" do impact 1.0 - title "BIG-IP has Application Services" + title "BIG-IP has Telemetry Streaming" # is the declarative onboarding end point available? describe http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/telemetry/info", auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD}, - params: {format: 'html'}, method: 'GET', ssl_verify: false) do its('status') { should cmp 200 } @@ -86,10 +82,9 @@ control "bigip-telemetry-streaming-version" do impact 1.0 - title "BIG-IP has specified version of Application Services" + title "BIG-IP has specified version of Telemetry Streaming" describe json(content: http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/telemetry/info", auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD}, - params: {format: 'html'}, method: 'GET', ssl_verify: false).body) do its('version') { should eq TS_VERSION } @@ -97,6 +92,30 @@ end end +control "bigip-fast" do + impact 1.0 + title "BIG-IP has F5 Application Service Templates" + # is the declarative onboarding end point available? + describe http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/fast/info", + auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD}, + method: 'GET', + ssl_verify: false) do + its('status') { should cmp 200 } + its('headers.Content-Type') { should match 'application/json' } + end +end + +control "bigip-fast-version" do + impact 1.0 + title "BIG-IP has specified version of F5 Application Service Templates" + describe json(content: http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/fast/info", + auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD}, + method: 'GET', + ssl_verify: false).body) do + its('version') { should eq FAST_VERSION } + end +end + control "bigip-licensed" do impact 1.0 title "BIG-IP has an active license" diff --git a/inspec.yml b/inspec.yml index 42dd9be..f677aa0 100644 --- a/inspec.yml +++ b/inspec.yml @@ -9,27 +9,29 @@ version: 0.1.0 supports: platform: os inputs: -- name: bigip_address - description: ip address of the BIG-IP to test - required: true -- name: bigip_port - description: management port on the BIG-IP - value: 443 - required: false -- name: user - description: user to connect to the BIG-IP as - value: admin - required: false -- name: password - description: password to connect to the BIG-IP with - required: true -- name: do_version - description: required version of declarative onboarding - required: false -- name: as3_version - description: required version of application services (AS3) - required: false -- name: ts_version - description: required version of telemetry streaming - required: false - \ No newline at end of file + - name: bigip_address + description: ip address of the BIG-IP to test + required: true + - name: bigip_port + description: management port on the BIG-IP + value: 443 + required: false + - name: user + description: user to connect to the BIG-IP as + value: admin + required: false + - name: password + description: password to connect to the BIG-IP with + required: true + - name: do_version + description: required version of declarative onboarding + required: false + - name: as3_version + description: required version of application services (AS3) + required: false + - name: ts_version + description: required version of telemetry streaming + required: false + - name: fast_version + description: required version of F5 application services templates + required: false