flightdeck 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/app/assets/flightdeck/{flightdeck-c02e38040ddb.js → flightdeck-8fc2423da15f.js} +2 -2
- data/app/assets/flightdeck/manifest.json +3 -3
- data/app/controllers/flightdeck/application_controller.rb +15 -1
- data/lib/flightdeck/configuration.rb +2 -0
- data/lib/flightdeck/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 064d345ecfc11586c696e3e1e1386b230a87b305553c733aa1891e2cde0669ec
|
|
4
|
+
data.tar.gz: 5f756e10c2d75f90fd464ce271c35322f1d4824bd7db746e4f7f7e907deb8b2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 639a81f396abc9732f1bab417793eaab73b3016bd346fa595f6cb05c97fb3e749e21d7120381fe5fd6da57973102cc8caa749c54fa566cce242e2de29acc44be
|
|
7
|
+
data.tar.gz: 00d08eaecb9c8746d3ea3d6243abea53f1e86c8a0c80015e23b786152d35fbcfe007d471da5160e6774ef61382ce638135b9e544e763d749e8823cf7f949ac9b
|
data/README.md
CHANGED
|
@@ -103,12 +103,28 @@ request, never memoized at boot.
|
|
|
103
103
|
In **API-only** apps there is no host session for Devise to use, so use
|
|
104
104
|
Flightdeck's own HTTP Basic there.
|
|
105
105
|
|
|
106
|
+
### Disabling authentication entirely
|
|
107
|
+
|
|
108
|
+
```ruby
|
|
109
|
+
# config/initializers/flightdeck.rb
|
|
110
|
+
Flightdeck.configure do |config|
|
|
111
|
+
config.skip_authentication = true
|
|
112
|
+
end
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This serves the dashboard — which can retry, discard and delete jobs — to
|
|
116
|
+
anyone who can reach the mount. It exists for deployments where something
|
|
117
|
+
upstream already guards it: a routing constraint, a VPN, a reverse proxy. The
|
|
118
|
+
routing-constraint caveat above still applies unless you set this: without it,
|
|
119
|
+
the engine answers 401 behind your constraint.
|
|
120
|
+
|
|
106
121
|
## Configuration
|
|
107
122
|
|
|
108
123
|
| Option | Default | Purpose |
|
|
109
124
|
| --- | --- | --- |
|
|
110
125
|
| `base_controller_class` | `nil` | Controller (a String) to inherit from, to reuse your app's authentication. |
|
|
111
126
|
| `http_basic` | `nil` | `{ username:, password: }` or a callable. Falls back to `ENV`, then credentials. |
|
|
127
|
+
| `skip_authentication` | `false` | Serve without any authentication. For mounts guarded upstream (routing constraint, VPN, proxy). |
|
|
112
128
|
| `poll_interval` | `5.seconds` | Refresh rate for list and stat panels. |
|
|
113
129
|
| `chart_poll_interval` | `30.seconds` | Refresh rate for charts. |
|
|
114
130
|
| `per_page` | `25` | Rows per page in job lists. |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Flightdeck 0.5.
|
|
1
|
+
/* Flightdeck 0.5.1 — bundled @hotwired/turbo + @hotwired/stimulus. Generated by `rake assets:build`; do not edit. */
|
|
2
2
|
(function(){
|
|
3
3
|
/**
|
|
4
4
|
* Minified by jsDelivr using Terser v5.39.0.
|
|
@@ -408,7 +408,7 @@ class ToastController extends Stimulus.Controller {
|
|
|
408
408
|
application.register("theme", ThemeController)
|
|
409
409
|
application.register("toast", ToastController)
|
|
410
410
|
|
|
411
|
-
window.Flightdeck = { application: application, version: "0.5.
|
|
411
|
+
window.Flightdeck = { application: application, version: "0.5.1" }
|
|
412
412
|
})()
|
|
413
413
|
|
|
414
414
|
})();
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"size": 118411
|
|
8
8
|
},
|
|
9
9
|
"flightdeck.js": {
|
|
10
|
-
"file": "flightdeck-
|
|
11
|
-
"digest": "
|
|
12
|
-
"sha256": "
|
|
10
|
+
"file": "flightdeck-8fc2423da15f.js",
|
|
11
|
+
"digest": "8fc2423da15f",
|
|
12
|
+
"sha256": "8fc2423da15f28fd3fcfd89fa820027ab955bdb902377c58d225b7fd81617b25",
|
|
13
13
|
"content_type": "text/javascript; charset=utf-8",
|
|
14
14
|
"size": 150889
|
|
15
15
|
}
|
|
@@ -33,7 +33,16 @@ module Flightdeck
|
|
|
33
33
|
config.base_controller_class = "Admin::BaseController"
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
5. If something upstream (a routing constraint, VPN, or reverse proxy)
|
|
37
|
+
already guards this mount and you accept the risk, turn Flightdeck's
|
|
38
|
+
gate off entirely:
|
|
39
|
+
|
|
40
|
+
Flightdeck.configure do |config|
|
|
41
|
+
config.skip_authentication = true
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
Flightdeck never serves unauthenticated requests, in any environment,
|
|
45
|
+
unless it is explicitly told to with skip_authentication.
|
|
37
46
|
TEXT
|
|
38
47
|
|
|
39
48
|
protect_from_forgery with: :exception if respond_to?(:protect_from_forgery)
|
|
@@ -73,7 +82,12 @@ module Flightdeck
|
|
|
73
82
|
}.compact
|
|
74
83
|
end
|
|
75
84
|
|
|
85
|
+
# Read per request, like the rest of the auth config, so nothing is
|
|
86
|
+
# resolved at boot. `skip_authentication` is the explicit opt-out for
|
|
87
|
+
# deployments that gate the mount upstream — a routing constraint, a VPN,
|
|
88
|
+
# a reverse proxy — and it wins over every other setting here.
|
|
76
89
|
def authenticate_flightdeck!
|
|
90
|
+
return if Flightdeck.config.skip_authentication
|
|
77
91
|
return if self.class.host_authenticated?
|
|
78
92
|
|
|
79
93
|
credentials = Flightdeck.config.resolve_http_basic
|
|
@@ -4,6 +4,7 @@ module Flightdeck
|
|
|
4
4
|
class Configuration
|
|
5
5
|
attr_accessor :base_controller_class,
|
|
6
6
|
:http_basic,
|
|
7
|
+
:skip_authentication,
|
|
7
8
|
:poll_interval,
|
|
8
9
|
:chart_poll_interval,
|
|
9
10
|
:per_page,
|
|
@@ -16,6 +17,7 @@ module Flightdeck
|
|
|
16
17
|
def initialize
|
|
17
18
|
@base_controller_class = nil
|
|
18
19
|
@http_basic = nil
|
|
20
|
+
@skip_authentication = false
|
|
19
21
|
@poll_interval = 5.seconds
|
|
20
22
|
@chart_poll_interval = 30.seconds
|
|
21
23
|
@per_page = 25
|
data/lib/flightdeck/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flightdeck
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carl Mercier
|
|
@@ -49,7 +49,7 @@ files:
|
|
|
49
49
|
- MIT-LICENSE
|
|
50
50
|
- README.md
|
|
51
51
|
- app/assets/flightdeck/flightdeck-00403457c5d9.css
|
|
52
|
-
- app/assets/flightdeck/flightdeck-
|
|
52
|
+
- app/assets/flightdeck/flightdeck-8fc2423da15f.js
|
|
53
53
|
- app/assets/flightdeck/manifest.json
|
|
54
54
|
- app/controllers/concerns/flightdeck/toasts.rb
|
|
55
55
|
- app/controllers/flightdeck/application_controller.rb
|