manageiq-appliance_console 5.5.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +7 -7
- data/.rubocop.yml +3 -3
- data/.rubocop_cc.yml +3 -4
- data/.rubocop_local.yml +1 -1
- data/.travis.yml +2 -2
- data/Gemfile +1 -1
- data/README.md +1 -2
- data/lib/manageiq/appliance_console/cli.rb +1 -0
- data/lib/manageiq/appliance_console/messaging_configuration.rb +1 -1
- data/lib/manageiq/appliance_console/oidc_authentication.rb +27 -1
- data/lib/manageiq/appliance_console/version.rb +1 -1
- data/manageiq-appliance_console.gemspec +1 -1
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ece17b25e041baf4584ff5c45cc651e5e911b5d09d94c413550908e132485c69
|
4
|
+
data.tar.gz: 6f367021492f89812cb0b704312b1398e7b2c74989d036e2b29e56e1a82bc8e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 611619aa58fc0783538bf1ab80fd057f3316ff9c420c3df4abca6fbb15214e9555bed2f2f5239b491d472bda7d2c641f4e2904a3941785582441ef5d86bc804a
|
7
|
+
data.tar.gz: 51fdbbde3921c74a5c07341100e7b2f4eca78f8b6a509b861594d31952a5faf112f5b643bd161b48d7fcc8fa49fd7780e3d290ff06fc39320543e4ef47c1ed22
|
data/.codeclimate.yml
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
---
|
2
1
|
exclude_paths:
|
3
2
|
- ".git/"
|
4
3
|
- "**.xml"
|
@@ -27,18 +26,19 @@ engines:
|
|
27
26
|
enabled: false
|
28
27
|
markdownlint:
|
29
28
|
enabled: false
|
30
|
-
rubocop:
|
31
|
-
enabled: true
|
32
|
-
config: ".rubocop_cc.yml"
|
33
|
-
channel: rubocop-0-69
|
34
29
|
prepare:
|
35
30
|
fetch:
|
36
|
-
- url: https://raw.githubusercontent.com/ManageIQ/
|
31
|
+
- url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_base.yml
|
37
32
|
path: ".rubocop_base.yml"
|
38
|
-
- url: https://raw.githubusercontent.com/ManageIQ/
|
33
|
+
- url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_cc_base.yml
|
39
34
|
path: ".rubocop_cc_base.yml"
|
40
35
|
ratings:
|
41
36
|
paths:
|
42
37
|
- Gemfile.lock
|
43
38
|
- "**.rake"
|
44
39
|
- "**.rb"
|
40
|
+
plugins:
|
41
|
+
rubocop:
|
42
|
+
enabled: true
|
43
|
+
config: ".rubocop_cc.yml"
|
44
|
+
channel: rubocop-0-82
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
+
inherit_gem:
|
2
|
+
manageiq-style: ".rubocop_base.yml"
|
1
3
|
inherit_from:
|
2
|
-
-
|
3
|
-
# put all local rubocop config into .rubocop_local.yml as it will be loaded by .rubocop_cc.yml as well
|
4
|
-
- .rubocop_local.yml
|
4
|
+
- ".rubocop_local.yml"
|
data/.rubocop_cc.yml
CHANGED
data/.rubocop_local.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
# GlobalVars:
|
1
|
+
# Style/GlobalVars:
|
2
2
|
# AllowedVariables:
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source 'http://rubygems.manageiq.org'
|
2
2
|
source 'https://rubygems.org'
|
3
3
|
|
4
|
-
# Specify your gem's dependencies in manageiq-
|
4
|
+
# Specify your gem's dependencies in manageiq-appliance_console.gemspec
|
5
5
|
gemspec
|
6
6
|
|
7
7
|
gem "manageiq-gems-pending", :git => "https://github.com/ManageIQ/manageiq-gems-pending", :branch => "master"
|
data/README.md
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# ManageIQ::ApplianceConsole
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/manageiq-appliance_console.svg)](http://badge.fury.io/rb/manageiq-appliance_console)
|
4
|
-
[![Build Status](https://travis-ci.
|
4
|
+
[![Build Status](https://travis-ci.com/ManageIQ/manageiq-appliance_console.svg?branch=master)](https://travis-ci.com/ManageIQ/manageiq-appliance_console)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/ManageIQ/manageiq-appliance_console.svg)](https://codeclimate.com/github/ManageIQ/manageiq-appliance_console)
|
6
6
|
[![Test Coverage](https://codeclimate.com/github/ManageIQ/manageiq-appliance_console/badges/coverage.svg)](https://codeclimate.com/github/ManageIQ/manageiq-appliance_console/coverage)
|
7
|
-
[![Dependency Status](https://gemnasium.com/ManageIQ/manageiq-appliance_console.svg)](https://gemnasium.com/ManageIQ/manageiq-appliance_console)
|
8
7
|
[![Security](https://hakiri.io/github/ManageIQ/manageiq-appliance_console/master.svg)](https://hakiri.io/github/ManageIQ/manageiq-appliance_console/master)
|
9
8
|
|
10
9
|
[![Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ManageIQ/manageiq-appliance_console?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
@@ -169,6 +169,7 @@ module ApplianceConsole
|
|
169
169
|
opt :oidc_client_host, "Optional Appliance host used for OpenID-Connect Authentication", :type => :string
|
170
170
|
opt :oidc_client_id, "The OpenID-Connect Provider Client ID", :type => :string
|
171
171
|
opt :oidc_client_secret, "The OpenID-Connect Provider Client Secret", :type => :string
|
172
|
+
opt :oidc_insecure, "OpenID-Connect Insecure No SSL Verify (development)", :type => :boolean, :default => false
|
172
173
|
opt :oidc_introspection_endpoint, "The OpenID-Connect Provider Introspect Endpoint", :type => :string
|
173
174
|
opt :oidc_enable_sso, "Optionally enable SSO with OpenID-Connect Authentication", :type => :boolean, :default => false
|
174
175
|
opt :oidc_unconfig, "Unconfigure Appliance OpenID-Connect Authentication", :type => :boolean, :default => false
|
@@ -82,7 +82,7 @@ module ManageIQ
|
|
82
82
|
def save(settings = nil)
|
83
83
|
settings ||= settings_from_input
|
84
84
|
|
85
|
-
settings["password"] =
|
85
|
+
settings["password"] = ManageIQ::Password.try_encrypt(settings.delete("password"))
|
86
86
|
|
87
87
|
require 'yaml'
|
88
88
|
File.write(MESSAGING_YML, YAML.dump("production" => settings))
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require "net/http"
|
2
|
+
require "uri"
|
3
|
+
|
1
4
|
module ManageIQ
|
2
5
|
module ApplianceConsole
|
3
6
|
class OIDCAuthentication
|
@@ -62,6 +65,13 @@ module ManageIQ
|
|
62
65
|
:oidc_client_id => options[:oidc_client_id],
|
63
66
|
:oidc_client_secret => options[:oidc_client_secret],
|
64
67
|
:oidc_introspection_endpoint => options[:oidc_introspection_endpoint])
|
68
|
+
|
69
|
+
if options[:oidc_insecure]
|
70
|
+
File.open("#{HTTPD_CONFIG_DIRECTORY}/manageiq-external-auth-openidc.conf", "a") do |f|
|
71
|
+
f.write("\nOIDCSSLValidateServer Off\n")
|
72
|
+
f.write("OIDCOAuthSSLValidateServer Off\n")
|
73
|
+
end
|
74
|
+
end
|
65
75
|
end
|
66
76
|
|
67
77
|
def remove_apache_oidc_configfiles
|
@@ -85,10 +95,26 @@ module ManageIQ
|
|
85
95
|
def derive_introspection_endpoint
|
86
96
|
return if options[:oidc_introspection_endpoint].present?
|
87
97
|
|
88
|
-
options[:oidc_introspection_endpoint] =
|
98
|
+
options[:oidc_introspection_endpoint] = fetch_introspection_endpoint
|
89
99
|
raise INTROSPECT_ENDPOINT_ERROR if options[:oidc_introspection_endpoint].blank?
|
90
100
|
end
|
91
101
|
|
102
|
+
def fetch_introspection_endpoint
|
103
|
+
uri = URI.parse(options[:oidc_url])
|
104
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
105
|
+
http.use_ssl = (uri.scheme == "https")
|
106
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if options[:oidc_insecure]
|
107
|
+
|
108
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
109
|
+
request.basic_auth(options[:oidc_client_id], options[:oidc_client_secret])
|
110
|
+
response = http.request(request)
|
111
|
+
|
112
|
+
JSON.parse(response.body)["introspection_endpoint"]
|
113
|
+
rescue => err
|
114
|
+
say("Failed to fetch introspection endpoint - #{err}")
|
115
|
+
nil
|
116
|
+
end
|
117
|
+
|
92
118
|
# Appliance Settings
|
93
119
|
|
94
120
|
def configure_auth_settings_oidc
|
@@ -33,10 +33,10 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_runtime_dependency "optimist", "~> 3.0"
|
34
34
|
spec.add_runtime_dependency "pg"
|
35
35
|
spec.add_runtime_dependency "rbnacl", ">= 3.2", "< 5.0"
|
36
|
-
spec.add_runtime_dependency "rbnacl-libsodium"
|
37
36
|
|
38
37
|
spec.add_development_dependency "bundler"
|
39
38
|
spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
|
39
|
+
spec.add_development_dependency "manageiq-style"
|
40
40
|
spec.add_development_dependency "rake"
|
41
41
|
spec.add_development_dependency "rspec", "~> 3.0"
|
42
42
|
spec.add_development_dependency "rubocop"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manageiq-appliance_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -205,13 +205,13 @@ dependencies:
|
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '5.0'
|
207
207
|
- !ruby/object:Gem::Dependency
|
208
|
-
name:
|
208
|
+
name: bundler
|
209
209
|
requirement: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
211
|
- - ">="
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
|
-
type: :
|
214
|
+
type: :development
|
215
215
|
prerelease: false
|
216
216
|
version_requirements: !ruby/object:Gem::Requirement
|
217
217
|
requirements:
|
@@ -219,33 +219,33 @@ dependencies:
|
|
219
219
|
- !ruby/object:Gem::Version
|
220
220
|
version: '0'
|
221
221
|
- !ruby/object:Gem::Dependency
|
222
|
-
name:
|
222
|
+
name: codeclimate-test-reporter
|
223
223
|
requirement: !ruby/object:Gem::Requirement
|
224
224
|
requirements:
|
225
|
-
- - "
|
225
|
+
- - "~>"
|
226
226
|
- !ruby/object:Gem::Version
|
227
|
-
version:
|
227
|
+
version: 1.0.0
|
228
228
|
type: :development
|
229
229
|
prerelease: false
|
230
230
|
version_requirements: !ruby/object:Gem::Requirement
|
231
231
|
requirements:
|
232
|
-
- - "
|
232
|
+
- - "~>"
|
233
233
|
- !ruby/object:Gem::Version
|
234
|
-
version:
|
234
|
+
version: 1.0.0
|
235
235
|
- !ruby/object:Gem::Dependency
|
236
|
-
name:
|
236
|
+
name: manageiq-style
|
237
237
|
requirement: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
|
-
- - "
|
239
|
+
- - ">="
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
241
|
+
version: '0'
|
242
242
|
type: :development
|
243
243
|
prerelease: false
|
244
244
|
version_requirements: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
|
-
- - "
|
246
|
+
- - ">="
|
247
247
|
- !ruby/object:Gem::Version
|
248
|
-
version:
|
248
|
+
version: '0'
|
249
249
|
- !ruby/object:Gem::Dependency
|
250
250
|
name: rake
|
251
251
|
requirement: !ruby/object:Gem::Requirement
|
@@ -303,7 +303,7 @@ dependencies:
|
|
303
303
|
- !ruby/object:Gem::Version
|
304
304
|
version: '0'
|
305
305
|
description: ManageIQ Appliance Console
|
306
|
-
email:
|
306
|
+
email:
|
307
307
|
executables:
|
308
308
|
- appliance_console
|
309
309
|
- appliance_console_cli
|
@@ -364,7 +364,7 @@ homepage: https://github.com/ManageIQ/manageiq-appliance_console
|
|
364
364
|
licenses:
|
365
365
|
- Apache-2.0
|
366
366
|
metadata: {}
|
367
|
-
post_install_message:
|
367
|
+
post_install_message:
|
368
368
|
rdoc_options: []
|
369
369
|
require_paths:
|
370
370
|
- lib
|
@@ -379,8 +379,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
379
379
|
- !ruby/object:Gem::Version
|
380
380
|
version: '0'
|
381
381
|
requirements: []
|
382
|
-
rubygems_version: 3.0.
|
383
|
-
signing_key:
|
382
|
+
rubygems_version: 3.0.3
|
383
|
+
signing_key:
|
384
384
|
specification_version: 4
|
385
385
|
summary: ManageIQ Appliance Console
|
386
386
|
test_files: []
|