Repository navigation
feat: pergunta ownership ao serviço da app no Unix socket - #16
Merged
Merged
Conversation
JWT bindings já conferem claim == path/body; o proxy não inventa se o
objeto pertence ao principal. Rotas opt-in com authorization = { socket,
action, resource, fail_mode } POSTam { principal, action, resource,
tenant? } no Unix socket (50 ms, teto 200 ms) e honram { allow: true|false }.
1. Sem o bloco a rota continua como hoje — bindings JWT se existirem, senão nada de IDOR.
2. fail_mode=closed: socket caído/timeout → 403 + evento authz_unavailable.
3. fail_mode=open: log + deixa passar, métrica sobe; recurso ou principal ausente continua 403 (não é "serviço caído").
4. URI com percent indecifrável não pula o bloco; HTTP/TCP para PDP remoto é recusado no TOML.
5. Evento sem token e sem body. Sem OPA embarcado.
Prova: cargo test --lib (381 ok); cargo test --lib authz (7 ok); cargo clippy --all-targets -- -D warnings; cargo test --test jwt (8 ok). Suite Unix em tests/authz.rs não correu neste host Windows (cfg(unix)).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Callback de authz opt-in por rota via Unix socket. O proxy manda principal + action + resource; o serviço da app responde allow/deny.
Sem bloco
authorizationa rota não fala com socket. Timeout/queda emfail_mode=closed→ 403. Não promete acabar com IDOR sozinho. Sem OPA embarcado.