otto 2.12.0 → 2.13.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 +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.github/workflows/claude-code-review.yml +1 -1
- data/.github/workflows/claude.yml +1 -1
- data/.github/workflows/code-smells.yml +2 -2
- data/.github/workflows/release-gem.yml +1 -1
- data/.github/workflows/ruby-lint.yml +1 -1
- data/.github/workflows/yardoc.yml +1 -1
- data/AGENTS.md +4 -2
- data/CHANGELOG.rst +692 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +6 -1
- data/docs/README.md +4 -0
- data/docs/audits/2026-09-28-v2.12.0-code-audit.md +732 -0
- data/docs/audits/README.md +63 -0
- data/docs/guides/authentication.md +329 -0
- data/docs/guides/forwarded-authority.md +80 -4
- data/docs/guides/mcp.md +40 -4
- data/docs/guides/privacy.md +23 -2
- data/docs/guides/routing.md +8 -4
- data/docs/guides/testing-guide.md +31 -3
- data/docs/migrating/v2.3.0.md +13 -7
- data/docs/reference/authentication.md +70 -22
- data/examples/lambda_handlers/README.md +4 -4
- data/examples/lambda_handlers/handlers.rb +4 -5
- data/examples/lambda_handlers/routes +2 -2
- data/examples/mcp_demo/README.md +65 -27
- data/examples/mcp_demo/app.rb +8 -5
- data/examples/mcp_demo/config.ru +50 -3
- data/examples/mcp_demo/routes +10 -6
- data/examples/security_features/README.md +2 -2
- data/lib/otto/caddy_tls/server.rb +8 -4
- data/lib/otto/core/option_hash.rb +124 -0
- data/lib/otto/core/redacted_inspect.rb +149 -0
- data/lib/otto/core/router.rb +41 -14
- data/lib/otto/core.rb +2 -0
- data/lib/otto/env_keys.rb +30 -7
- data/lib/otto/logging_helpers.rb +1 -1
- data/lib/otto/mcp/auth/token.rb +12 -1
- data/lib/otto/mcp/protocol.rb +3 -3
- data/lib/otto/mcp/registry.rb +28 -2
- data/lib/otto/mcp/route_parser.rb +20 -8
- data/lib/otto/mcp/server.rb +17 -9
- data/lib/otto/privacy/config.rb +12 -1
- data/lib/otto/privacy/ip_privacy.rb +109 -3
- data/lib/otto/privacy/redacted_fingerprint.rb +8 -10
- data/lib/otto/request.rb +34 -0
- data/lib/otto/route_definition.rb +3 -2
- data/lib/otto/security/authentication/route_auth_wrapper.rb +10 -3
- data/lib/otto/security/config.rb +358 -46
- data/lib/otto/security/csrf.rb +17 -2
- data/lib/otto/security/csrf_validation.rb +13 -7
- data/lib/otto/security/middleware/csrf_middleware.rb +203 -37
- data/lib/otto/security/middleware/ip_privacy_middleware.rb +127 -38
- data/lib/otto/static.rb +63 -0
- data/lib/otto/utils.rb +105 -28
- data/lib/otto/version.rb +1 -1
- data/lib/otto.rb +37 -9
- metadata +6 -2
data/Gemfile
CHANGED
|
@@ -10,6 +10,7 @@ source 'https://rubygems.org'
|
|
|
10
10
|
gemspec
|
|
11
11
|
|
|
12
12
|
group :test do
|
|
13
|
+
gem 'rack-session', '~> 2.1' # Real session stores for the CSRF binding specs
|
|
13
14
|
gem 'rack-test'
|
|
14
15
|
gem 'rspec', '~> 3.13'
|
|
15
16
|
gem 'user_agent_parser', '~> 2.18' # Validate anonymized UAs preserve semantic info
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
otto (2.
|
|
4
|
+
otto (2.13.0)
|
|
5
5
|
concurrent-ruby (~> 1.3, < 2.0)
|
|
6
6
|
logger (~> 1, < 2.0)
|
|
7
7
|
loofah (~> 2.20)
|
|
@@ -11,6 +11,7 @@ GEM
|
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
13
|
ast (2.4.3)
|
|
14
|
+
base64 (0.2.0)
|
|
14
15
|
benchmark (0.5.0)
|
|
15
16
|
bigdecimal (4.1.1)
|
|
16
17
|
concurrent-ruby (1.3.8)
|
|
@@ -107,6 +108,9 @@ GEM
|
|
|
107
108
|
rack (3.2.7)
|
|
108
109
|
rack-attack (6.8.0)
|
|
109
110
|
rack (>= 1.0, < 4)
|
|
111
|
+
rack-session (2.1.2)
|
|
112
|
+
base64 (>= 0.1.0)
|
|
113
|
+
rack (>= 3.0.0)
|
|
110
114
|
rack-test (2.2.0)
|
|
111
115
|
rack (>= 1.3)
|
|
112
116
|
rackup (2.3.1)
|
|
@@ -218,6 +222,7 @@ DEPENDENCIES
|
|
|
218
222
|
maxmind-db (~> 1.5)
|
|
219
223
|
otto!
|
|
220
224
|
rack-attack (~> 6.7)
|
|
225
|
+
rack-session (~> 2.1)
|
|
221
226
|
rack-test
|
|
222
227
|
rackup
|
|
223
228
|
rake (~> 13.4)
|
data/docs/README.md
CHANGED
|
@@ -87,6 +87,7 @@ docs/
|
|
|
87
87
|
│ └── runtime-and-dependency-security.md
|
|
88
88
|
├── migrating/ # release-specific upgrade guides
|
|
89
89
|
├── adr/ # accepted architecture decision records
|
|
90
|
+
├── audits/ # point-in-time code audits; leads, not contracts
|
|
90
91
|
└── maintainers/
|
|
91
92
|
└── investigations/ # local working notes; untracked by design
|
|
92
93
|
```
|
|
@@ -111,6 +112,9 @@ docs/
|
|
|
111
112
|
to infer the current contract from a proposal.
|
|
112
113
|
- **Maintainer investigations** preserve unfinished exploration separately from
|
|
113
114
|
accepted decisions and application documentation.
|
|
115
|
+
- **Audits** record a review of the code at a named commit, with the follow-up
|
|
116
|
+
pull request for each finding. They are leads for maintainers and do not
|
|
117
|
+
define behavior; see [audits](audits/README.md).
|
|
114
118
|
|
|
115
119
|
## Migration plan for the current directory
|
|
116
120
|
|