rack_jwt_aegis 0.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d2d574fb0978ebcc27c003f09163d7485e04ff9af359fbfacaaae62bb04ed484
4
+ data.tar.gz: d9569601beeb497265025ab704860aaa9bb35f88e94d929ad2561ffc0a5f225a
5
+ SHA512:
6
+ metadata.gz: 876bbe061f88ba9258b0d7c766984a71e09bd4043352b00b57f760d7910e1cbc8786898346a37d3eba7d0e9ba2bfbc0c3e5d3b0a4b129c4bcfb404eb25c06c57
7
+ data.tar.gz: 94717f98a46ca598112b76084568ae1cf10c17518ef2305d611a45e672cb5f413bff70254b65411d5dfdcbfc81e0251ba36a85f390d6173b17d24d8e1fcd902f
data/.rubocop.yml ADDED
@@ -0,0 +1,160 @@
1
+ plugins:
2
+ - rubocop-performance
3
+ - rubocop-minitest
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 3.2
7
+ NewCops: enable
8
+ SuggestExtensions: false
9
+ Exclude:
10
+ - 'adrs/**/*'
11
+ - 'coverage/**/*'
12
+ - '.github/**/*'
13
+ - '.vscode/**/*'
14
+ - '.history/**/*'
15
+
16
+ # Layout and Formatting
17
+ Layout/LineLength:
18
+ Max: 120
19
+ AllowedPatterns: ['\A\s*#.*\z'] # Allow long comments
20
+
21
+ Layout/MultilineMethodCallIndentation:
22
+ EnforcedStyle: indented
23
+
24
+ Layout/FirstArrayElementIndentation:
25
+ EnforcedStyle: consistent
26
+
27
+ Layout/FirstHashElementIndentation:
28
+ EnforcedStyle: consistent
29
+
30
+ # Style Guidelines
31
+ Style/Documentation:
32
+ Enabled: false # Disable for now during development
33
+
34
+ Style/StringLiterals:
35
+ EnforcedStyle: single_quotes
36
+ ConsistentQuotesInMultiline: true
37
+
38
+ Style/StringLiteralsInInterpolation:
39
+ EnforcedStyle: single_quotes
40
+
41
+ Style/FrozenStringLiteralComment:
42
+ Enabled: true
43
+ EnforcedStyle: always
44
+
45
+ Style/TrailingCommaInArguments:
46
+ EnforcedStyleForMultiline: comma
47
+
48
+ Style/TrailingCommaInArrayLiteral:
49
+ EnforcedStyleForMultiline: comma
50
+
51
+ Style/TrailingCommaInHashLiteral:
52
+ EnforcedStyleForMultiline: comma
53
+
54
+ Style/HashSyntax:
55
+ EnforcedStyle: ruby19_no_mixed_keys
56
+
57
+ Style/Lambda:
58
+ EnforcedStyle: literal
59
+
60
+ Style/ClassAndModuleChildren:
61
+ Enabled: false # Allow both compact and nested styles
62
+
63
+ Style/NumericLiterals:
64
+ MinDigits: 6
65
+
66
+ Style/SymbolArray:
67
+ EnforcedStyle: brackets
68
+
69
+ Style/WordArray:
70
+ EnforcedStyle: brackets
71
+
72
+ # Naming Conventions
73
+ Naming/VariableNumber:
74
+ EnforcedStyle: snake_case
75
+
76
+ Naming/PredicatePrefix:
77
+ ForbiddenPrefixes:
78
+ - is_
79
+
80
+ # Metrics and Complexity
81
+ Metrics/BlockLength:
82
+ Exclude:
83
+ - 'spec/**/*'
84
+ - 'test/**/*'
85
+ - 'lib/tasks/**/*'
86
+ - 'config/**/*'
87
+
88
+ Metrics/ModuleLength:
89
+ Max: 200
90
+ Exclude:
91
+ - 'spec/**/*'
92
+ - 'test/**/*'
93
+
94
+ Metrics/ClassLength:
95
+ Max: 150
96
+ Exclude:
97
+ - 'spec/**/*'
98
+ - 'test/**/*'
99
+
100
+ Metrics/MethodLength:
101
+ Max: 20
102
+ Exclude:
103
+ - 'spec/**/*'
104
+ - 'test/**/*'
105
+
106
+ Metrics/AbcSize:
107
+ Max: 20
108
+ Exclude:
109
+ - 'spec/**/*'
110
+ - 'test/**/*'
111
+
112
+ Metrics/CyclomaticComplexity:
113
+ Max: 8
114
+
115
+ Metrics/PerceivedComplexity:
116
+ Max: 8
117
+
118
+ # Performance Rules
119
+ Performance/CollectionLiteralInLoop:
120
+ Enabled: true
121
+
122
+ Performance/StringReplacement:
123
+ Enabled: true
124
+
125
+ Performance/UnfreezeString:
126
+ Enabled: true
127
+
128
+ # Security Rules
129
+ Security/Open:
130
+ Enabled: true
131
+
132
+ Security/YAMLLoad:
133
+ Enabled: true
134
+
135
+ Security/JSONLoad:
136
+ Enabled: true
137
+
138
+ # Lint Rules
139
+ Lint/AmbiguousBlockAssociation:
140
+ Exclude:
141
+ - 'test/**/*'
142
+
143
+ Lint/SuppressedException:
144
+ AllowComments: true
145
+
146
+ # Minitest-specific Rules
147
+ Minitest/MultipleAssertions:
148
+ Enabled: false # Allow multiple assertions in tests
149
+
150
+ Minitest/AssertTruthy:
151
+ Enabled: true
152
+
153
+ Minitest/AssertWithExpectedArgument:
154
+ Enabled: true
155
+
156
+ Minitest/RefuteFalse:
157
+ Enabled: true
158
+
159
+ Minitest/RefuteNil:
160
+ Enabled: true
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Ken C. Demanawa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,215 @@
1
+ # Rack JWT Aegis
2
+
3
+ JWT authentication middleware for hierarchical multi-tenant Rack applications with 2-level tenant support.
4
+
5
+ **Note: This is version 0.0.0 - a placeholder release to reserve the gem name. Implementation is in progress.**
6
+
7
+ ## Features
8
+
9
+ - JWT token validation with configurable algorithms
10
+ - 2-level multi-tenant support (Company-Group → Company, Organization → Department, etc.)
11
+ - Subdomain-based tenant isolation for top-level tenants
12
+ - Company slug access control for sub-level tenants
13
+ - Configurable path exclusions for public endpoints
14
+ - Custom payload validation
15
+ - Debug mode for development
16
+
17
+ ## Installation
18
+
19
+ Add this line to your application's Gemfile:
20
+
21
+ ```ruby
22
+ gem 'rack_jwt_aegis'
23
+ ```
24
+
25
+ And then execute:
26
+
27
+ ```bash
28
+ bundle install
29
+ ```
30
+
31
+ Or install it yourself as:
32
+
33
+ ```bash
34
+ gem install rack_jwt_aegis
35
+ ```
36
+
37
+ ## Quick Start
38
+
39
+ ### Rails Application
40
+
41
+ ```ruby
42
+ # config/application.rb
43
+ config.middleware.insert_before 0, RackJwtAegis::Middleware, {
44
+ jwt_secret: ENV['JWT_SECRET'],
45
+ company_header_name: 'X-Company-Group-Id',
46
+ skip_paths: ['/api/v1/login', '/api/v1/refresh', '/health']
47
+ }
48
+ ```
49
+
50
+ ### Sinatra Application
51
+
52
+ ```ruby
53
+ require 'rack_jwt_aegis'
54
+
55
+ use RackJwtAegis::Middleware, {
56
+ jwt_secret: ENV['JWT_SECRET'],
57
+ company_header_name: 'X-Company-Group-Id',
58
+ skip_paths: ['/login', '/health']
59
+ }
60
+ ```
61
+
62
+ ### Pure Rack Application
63
+
64
+ ```ruby
65
+ require 'rack_jwt_aegis'
66
+
67
+ app = Rack::Builder.new do
68
+ use RackJwtAegis::Middleware, {
69
+ jwt_secret: ENV['JWT_SECRET'],
70
+ validate_subdomain: true,
71
+ validate_company_slug: true
72
+ }
73
+
74
+ run YourApp.new
75
+ end
76
+ ```
77
+
78
+ ## Configuration Options
79
+
80
+ ### Basic Configuration
81
+
82
+ ```ruby
83
+ RackJwtAegis::Middleware.new(app, {
84
+ # JWT Settings (Required)
85
+ jwt_secret: ENV['JWT_SECRET'],
86
+ jwt_algorithm: 'HS256', # Default: 'HS256'
87
+
88
+ # Multi-Tenant Settings
89
+ company_header_name: 'X-Company-Group-Id', # Default: 'X-Company-Group-Id'
90
+ validate_subdomain: true, # Default: false
91
+ validate_company_slug: true, # Default: false
92
+
93
+ # Path Configuration
94
+ skip_paths: ['/health', '/api/v1/login', '/api/v1/refresh'],
95
+ company_slug_pattern: /^\/api\/v1\/([^\/]+)\//, # Default pattern
96
+
97
+ # Response Customization
98
+ unauthorized_response: { error: 'Authentication required' },
99
+ forbidden_response: { error: 'Access denied' },
100
+
101
+ # Debugging
102
+ debug_mode: Rails.env.development? # Default: false
103
+ })
104
+ ```
105
+
106
+ ### Advanced Configuration
107
+
108
+ ```ruby
109
+ RackJwtAegis::Middleware.new(app, {
110
+ jwt_secret: ENV['JWT_SECRET'],
111
+
112
+ # Custom Payload Validation
113
+ custom_payload_validator: ->(payload, request) {
114
+ # Return true if valid, false if invalid
115
+ payload['role'] == 'admin' || payload['permissions'].include?('read')
116
+ },
117
+
118
+ # Flexible Payload Mapping
119
+ payload_mapping: {
120
+ user_id: :sub, # Map 'sub' claim to user_id
121
+ company_group_id: :company_id, # Map 'company_id' claim
122
+ company_group_domain: :domain, # Map 'domain' claim
123
+ company_slugs: :accessible_companies # Map array of accessible companies
124
+ },
125
+
126
+ # Custom Tenant Extraction
127
+ tenant_strategy: :custom,
128
+ tenant_extractor: ->(request) {
129
+ # Extract tenant from custom header or logic
130
+ request.get_header('HTTP_X_TENANT_ID')
131
+ }
132
+ })
133
+ ```
134
+
135
+ ## Multi-Tenant Support
136
+
137
+ Rack JWT Aegis provides multiple strategies for multi-tenant authentication:
138
+
139
+ ### Subdomain Validation
140
+
141
+ ```ruby
142
+ # Validates that the JWT's domain matches the request subdomain
143
+ config.validate_subdomain = true
144
+ ```
145
+
146
+ ### Company Slug Validation
147
+
148
+ ```ruby
149
+ # Validates that the requested company slug is accessible to the user
150
+ config.validate_company_slug = true
151
+ config.company_slug_pattern = /^\/api\/v1\/([^\/]+)\//
152
+ ```
153
+
154
+ ### Header-Based Validation
155
+
156
+ ```ruby
157
+ # Validates the X-Company-Group-Id header against JWT payload
158
+ config.company_header_name = 'X-Company-Group-Id'
159
+ ```
160
+
161
+ ## JWT Payload Structure
162
+
163
+ The middleware expects JWT payloads with the following structure:
164
+
165
+ ```json
166
+ {
167
+ "user_id": 12345,
168
+ "company_group_id": 67890,
169
+ "company_group_domain": "acme.example.com",
170
+ "company_slugs": ["acme", "acme-corp"],
171
+ "roles": ["admin", "user"],
172
+ "exp": 1640995200,
173
+ "iat": 1640991600
174
+ }
175
+ ```
176
+
177
+ You can customize the payload mapping using the `payload_mapping` configuration option.
178
+
179
+ ## Security Features
180
+
181
+ - JWT signature verification
182
+ - Token expiration validation
183
+ - Company/tenant access control
184
+ - Subdomain validation
185
+ - Request path filtering for public endpoints
186
+
187
+ ## Performance
188
+
189
+ - Skip paths are checked before JWT processing
190
+ - Low memory footprint
191
+
192
+ ## Error Handling
193
+
194
+ The middleware returns appropriate HTTP status codes:
195
+
196
+ - **401 Unauthorized** - Missing, invalid, or expired JWT
197
+ - **403 Forbidden** - Valid JWT but insufficient permissions/access
198
+
199
+ ## Development
200
+
201
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
202
+
203
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
204
+
205
+ ## Contributing
206
+
207
+ Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](CODE_OF_CONDUCT.md).
208
+
209
+ ## License
210
+
211
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
212
+
213
+ ## Code of Conduct
214
+
215
+ Everyone interacting in the Rack JWT Aegis project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rake/testtask'
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << 'test'
8
+ t.libs << 'lib'
9
+ t.test_files = FileList['test/**/*_test.rb']
10
+ end
11
+
12
+ task default: :test
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative '../lib/rack_jwt_aegis'
5
+ require 'jwt'
6
+ require 'json'
7
+ require 'rack'
8
+
9
+ # Example: Basic JWT authentication middleware usage
10
+
11
+ # 1. Create a simple Rack app
12
+ class SimpleApp
13
+ def call(env)
14
+ # Access authenticated user data
15
+ if RackJwtAegis::RequestContext.authenticated?(env)
16
+ user_id = RackJwtAegis::RequestContext.user_id(env)
17
+ company_slugs = RackJwtAegis::RequestContext.company_slugs(env)
18
+
19
+ response = {
20
+ message: 'Hello authenticated user!',
21
+ user_id: user_id,
22
+ company_access: company_slugs,
23
+ }
24
+
25
+ [200, { 'Content-Type' => 'application/json' }, [JSON.generate(response)]]
26
+ else
27
+ [401, {}, ['Unauthorized']]
28
+ end
29
+ end
30
+ end
31
+
32
+ # 2. Configure the middleware
33
+ Rack::Builder.new do
34
+ use RackJwtAegis::Middleware, {
35
+ jwt_secret: 'demo-secret-key',
36
+
37
+ # Multi-tenant features
38
+ validate_subdomain: true,
39
+ validate_company_slug: true,
40
+
41
+ # Skip authentication for health check
42
+ skip_paths: ['/health'],
43
+
44
+ # Debug mode for demonstration
45
+ debug_mode: true,
46
+ }
47
+
48
+ run SimpleApp.new
49
+ end
50
+
51
+ # 3. Generate a demo JWT token
52
+ payload = {
53
+ 'user_id' => 123,
54
+ 'company_group_id' => 456,
55
+ 'company_group_domain' => 'acme-corp.example.com',
56
+ 'company_slugs' => ['widgets-division', 'services-division'],
57
+ 'exp' => Time.now.to_i + 3600, # 1 hour from now
58
+ }
59
+
60
+ token = JWT.encode(payload, 'demo-secret-key', 'HS256')
61
+
62
+ puts "\nšŸ›”ļø Rack JWT Aegis Demo"
63
+ puts '=' * 50
64
+ puts "\nšŸ“‹ Configuration:"
65
+ puts '- JWT Secret: demo-secret-key'
66
+ puts '- Multi-tenant: Subdomain + Company Slug validation'
67
+ puts '- Skip paths: /health'
68
+ puts '- Debug mode: enabled'
69
+
70
+ puts "\nšŸŽ« Generated JWT Token:"
71
+ puts "#{token[0..50]}..." if token.length > 50
72
+
73
+ puts "\nšŸ“Š JWT Payload:"
74
+ puts JSON.pretty_generate(payload)
75
+
76
+ puts "\nāœ… Middleware initialized successfully!"
77
+ puts "\nšŸ’” To test this middleware:"
78
+ puts '1. Start a Rack server with this configuration'
79
+ puts '2. Send requests with Authorization: Bearer <token>'
80
+ puts '3. Try different subdomains and company slugs'
81
+ puts '4. Check /health endpoint (should work without auth)'
82
+
83
+ puts "\nšŸ“ Example curl commands:"
84
+ puts "curl -H 'Authorization: Bearer #{token}' -H 'Host: acme-corp.example.com' http://localhost:3000/api/v1/widgets-division/data"
85
+ puts 'curl http://localhost:3000/health'